I'm interested to use the keys SBUsesNetworkand UIRequiresPersistentWiFiin my application; however, I would like to enable them only when using a specific set of controllers. Is there a way to programmatically flip these key values while the application is running?
SBUsesNetwork
UIRequiresPersistentWiFi
You cannot change the contents of your package while you work; you do not have the right to write to this directory. I'm not sure there is a way to do exactly what you want.
, info.plist NSDictionary NSBundle :
NSDictionary* infoDictionary = [[NSBundle mainBundle] infoDictionary];
mutableCopy NSDictionary . NSDictionary, info.plist, , .
mutableCopy
NSDictionary
app.plist , (, , , ), .
Info.plist. , Apple , .
I do not think this will work. [NSBundle mainBundle] has a pointer to a specific infoDictionary. Even if you take a mutable copy, NSBundle will not know anything about our new plist. Has anyone else tried?
Info.plist is nothing more than a dictionary. Therefore, it can be edited.