Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to protect iOS bundle files like plist ,image,sqlite,media files

Tags:

I have created sample hello world project and then added Data.plist file to resource folder. Now people can easily get the bundle files by unzipping the .ipa file. Is there any ways to protect the Data.plist file that saved in the application bundle of iPhone app?

 Encryption is a decent method of scrambling the data but i don't know how to implement encription concept.

Do you have any sample code?

enter image description here

    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"Data" ofType:@"plist"];
    NSArray *arrData = [[NSArray alloc]initWithContentsOfFile:filePath];

    NSData *datas = [NSKeyedArchiver archivedDataWithRootObject:arrData];
    [datas writeToFile:filePath atomically:YES];

After extracting IPA file

enter image description here