Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editing Info.plist possible programmatically?

I have set my Facebook-AppId in the Info.plist. But I wish to edit it because its dynamic. How shall I do it programmatically?

like image 719
Ambili B Menon Avatar asked Oct 10 '12 10:10

Ambili B Menon


3 Answers

Probably write in info.plist is not good idea and it doesn't work because you are trying to write the dictionary to a .plist file inside your App bundle, which is read only. Thus it would not work and also would have more rejection chances even if you get it done other way.

BTW why Info.Plist only? I mean why you can not have it in other way e.g nsuserdefaults or sql

like image 117
Jigar Pandya Avatar answered Oct 24 '22 06:10

Jigar Pandya


You can't edit the Info.plist of your app. You don't have write access to that file (assuming you want to release this on the App Store).

like image 32
DrummerB Avatar answered Oct 24 '22 05:10

DrummerB


The only way to write a plist file is to copy it from the bundle to the document folder of your app.

After that you can write. Here is a good tutorial but there are much more. Just google. http://ipgames.wordpress.com/tutorials/writeread-data-to-plist-file/

like image 26
Jordi Kroon Avatar answered Oct 24 '22 05:10

Jordi Kroon