in my iPhone App i am trying to send data from one device to the other via bluetooth.
Following is my code which i am using for the above said process
NSMutableData *data = [[NSMutableData alloc]init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc]initForWritingWithMutableData:data];
[archiver encodeObject:YOURDICTIONARY forKey: YOURDATAKEY];
archiver finishEncoding];
[data writeToFile:YOURFILEPATH atomically:YES];
[data release];
[archiver release];
Now the problem is if the size of the data is to be as around 220000 bytes, the data gets compressed and transferred successfully without any trouble.
But if it seems to get stored more than or around 230000 bytes via an NSMutableArray, it will cause the NSKeyedArchiver to create a broken plist file.
How to resolve this issue, pls help me friends
If you are using GameKit for the transfer, then the maximum allowed message size is 87KB. If it’s larger than that then you have to split it into multiple messages.
Source: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/GameKitConcepts/GameKitConcepts.html#//apple_ref/doc/uid/TP40008304-CH100-SW1