Frage

I have been banging my head against the wall trying to figure out how to determine what is actually in the key-value store for a given app. Using the api to detect data seems dubious to me as I am afraid of getting false positives. Also I would have to guess at what else might be there (i.e. from previous versions of the app or whatever). So far as I can tell, the developer test website only shows files in the cloud, and not the key-value store. Does anyone know how to access this data, or where in the filesystem the local .plist file is stored (I assume it is in a .plist anyway)?

War es hilfreich?

Lösung

I finally found it. There is a circuitous route to get there. ~/Library/SyncedPreferences/com.apple.syncedpreferences.plist has a dictionary entry for each application bundle. Inside that dictionary is the key plistPath. This points to the actual plist file that contains the key-value data for your app (on the local device anyway). This file is stored in your app's container at ~/Library/Containers/<bundleName>/Data/Library/SyncedPreferences and appears to be named <bundleName>.plist. Still don't know how to view what is actually in the cloud, so I guess I will have to trust what is in the local file. :)

Andere Tipps

I know this question is old but shows up in google search so it may help others.

In case that the device is a simulator the path are as follows:

Directory for application bundle list is:

~/Library/Developer/CoreSimulator/Devices/<Device-ID>/data/Library/SyncedPreferences/com.apple.syncedpreferences.plist

File with key-value data for your app:

~/Library/Developer/CoreSimulator/Devices/<Device-ID>/data/Containers/Data/Application/<App-ID>/Library/SyncedPreferences/<bundleName>.plist

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top