My question is stated above in the title but I’ll write it here again
Is it possible to copy a different plist into the application bundle code wise??
This is actually a bit related on my previous question 😉 Create a dictionary property list programmatically
But since I can write out the plist (and test if I’m doing something wrong ) I was wondering if I can copy my written file
[testBook writeTofile:@/Users/jack/testbook2.plist" atomically:NO];
to my application bundle in code (so that it can read from here with
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *dataPath = [path stringbyAppendingPathcomponent:@"testbook2.plist"];
Another alternative is good as well for instance if I can read my plist directly from another path instead of the mainBundle
Physically, yes it is possible sometimes.
NO, DON’T DO THAT!!
Okay… copying stuff into your App Bundle is bad, your app bundle is not where you keep settings or data. You should think of your app bundle as readonly. You should do this for several reasons:
The correct place to put this sort of stuff is into a sub folder of the Application Support folder