سؤال

I'm testing my app on a jailbroken iPhone. In my code I use [NSUserDefaults standardUserDefaults].

I'm putting my app on the phone via SSH, and so it doesn't generate a folder in /var/mobile/Applications. If the app were there, any use of NSUserDefaults would create a .plist inside of a "Documents" folder. Since my app doesn't generate this folder, I cannot find the .plist.

Where is the Documents folder of a jailbroken app, uploaded over SSH (in a .app, NOT .ipa)?

هل كانت مفيدة؟

المحلول

OP asked for the preferences folder that stores NSUserDefaults. Check /var/mobile/Library/Preferences/ for that, assuming your app is running as mobile user.

(Documents folder is a different thing, and is located in /var/mobile/Documents)


Note that, starting from iOS 8, these plist are cached in memory in the cfprefsd daemon, so overwriting files in this folder will have no effect unless you kill this daemon.

See http://iphonedevwiki.net/index.php/Updating_extensions_for_iOS_8#Preference_saving for detail.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top