How to force update the application settings package?

The Settings.bundle application contains the version number that is automatically generated at build time. From the build log, I see that a new value is written there, also when viewing inside the file itself in MacOS X Finder, I see the correct updated value.

Settings in the iPhone simulator or in the real iPhone shows me the old value . Removing the application and reinstalling is the only way I was able to get a new updated value.

Question: How do I get the iPhone Settings app to read my new updated package file?

Some background information, which may or may not be related: I install the application only through Xcode in both the simulator and the iPhone. This is problem? Just found this in Apple docs , not sure what it actually says. It seems to contradict itself (last chapter) ...

Each time you reinstall the application, iPhone OS performs a clean installation, which removes all previous settings. In other words, creating or running an application from Xcode always installs a new version, replacing any old content. To check preference changes between consecutive launches, you must run your application directly from the simulator interface, not from Xcode.

So, Xcode always replaces old content, but can't I use Xcode to check for changes? What was it? Both were done (after installation through Xcode) and did not see the new values ​​in the settings. Any ideas how this works? Should I always install without Xcode?

+4
source share
4 answers

Try to clean and build. Xcode seems to cache the dates and not notice the changes your script is making. I had similar things, clean always fix it, but it really is a nuisance.

+5
source

Be sure to turn off the Settings application, which runs in the background on the device. It looks like the settings cache settings at the time of its launch - but it retrieves updated values ​​when the settings application restarts.

+1
source

I just tried this and it worked. In Xcode, go to: Window-> Organizer , then view the installed applications on the connected iPad / iPhone, uninstall the application, and then recompile and run the application on the device. I think the problem has something to do with the iPad cache.

0
source

In my case, it seems that my modified root.plist created / edited using the Xcode property list editor just wasn't saved.

There was no problem when the preset was copied to the iPad. Fast cmd-S , followed by restoring and deleting / debugging updated settings on the iPad right away - no application uninstalls / reinstalls. You might think that at least this will be a warning from Xcode, as always, for the source code files.

0
source

Source: https://habr.com/ru/post/1299679/


All Articles