How to write to AppName-Info.plist

前端 未结 3 1616
情歌与酒
情歌与酒 2021-01-16 13:23

i added a key called \"App\" to my AppName-Info.plist manually , i can get the value from it by calling this code

NSBundle *mainBundle;
mainBundle = [NSBundl         


        
3条回答
  •  迷失自我
    2021-01-16 14:13

    You should not modify your apps Info.plist file (or anything in your app's bundle) at runtime. This is bad practice and will also break your bundles code signature (which will result in not being able to launch the app anymore!).

    If you want to store settings you should have a look at NSUserDefaults.

提交回复
热议问题