views:

648

answers:

3

Application Settings.bundle contains a version number, which is automatically generated during build. From build log I can see that new value is written there, also when looking inside the file itself in MacOS X Finder I see correct updated value.

Settings in iPhone simulator or in real iPhone shows me the old value. Removing application and reinstalling is so far the only way I've managed to get the new updated value visible.

Question: how can I force iPhone Settings application to read my new latest updated bundle file?

Some background info, which might or might not be related: I install application only via Xcode into both simulator and iPhone. Is this the problem? Just found this in Apple docs, not sure what it actually says. Seems to contradict itself (last chapter)...

Each time you reinstall your application, iPhone OS performs a clean install, which deletes any previous preferences. In other words, building or running your application from Xcode always installs a new version, replacing any old contents. To test preference changes between successive executions, you must run your application directly from the simulator interface and not from Xcode.

So Xcode always replaces old content, but to test changes I cannot use Xcode? What was that? Done both (after installation via Xcode) and didn't see new values in settings. Any ideas how does it actually work? Do I always have to make non-Xcode installation?

A: 

Try cleaning and building. It seems that xcode caches dates and doesn't notice the change that your script is making. I've had similar things happen, clean always fixes it, but it is indeed a nuisance.

Nick Veys
Agreed, there is some caching which is a nuisance. Really Clean build helps sometimes, sometimes got to uninstall first or even remove app files (in simulator)... Btw fixed this by writing some settings by myself at app startup. The problem is that app has to be run once to make sure the updated values are there. Bit better now.
JOM
A: 

In my case, version 1.0 of my app didn't have a Settings Bundle. I added it to version 2.0. If you update your app from 1.0 to 2.0, the Settings Bundle doesn't appear on the device. But if you delete the app and reinstall it, the Settings Bundle shows up.

Any way to force it to appear for those who'll upgrade from version 1.0 to 2.0?

RyeMAC3
A: 

I just tried this and it worked. In Xcode go to : Window->Organizer, then view installed apps on the connected iPad/iPhone, remove the app, then recompile and run your app on the device. I think the issue has something to do with the iPad's cache.

SimonHayre