I have couple of applications alive in Apple store and we have just released updated version of these applications with incremented version numbers. I found that all resources are getting updated correctly(updated splash screen, background image etc) but newly added features are not getting updated. For example, I have included a feature so that iPhone app takes new contents from my website. It doesn't happen when I update the application from Appstore updates list.
...but the other strange thing is if I delete the application from my iPhone and download it again from Apple store then everything works fine!! I am not able to understand what has been going on. Anyone could please help me to debug this?
From this I got following code and added in my AppDelegate. For me it always print Version (null). I could see version number correctly set in my Application-info.plist file though!
#if DDEBUG // debugging/testing
NSString *versionString = [NSString stringWithFormat:@"v%@",[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]];
#else
NSString *versionString = [NSString stringWithFormat:@"Version %@",[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]];
#endif // DDEBUG
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setValue:versionString forKey:@"version"];
printf("Version: = %s\n", [versionString cStringUsingEncoding:NSMacOSRomanStringEncoding]);
[defaults synchronize]; // force immediate saving of defaults.
Following code works though! I mean it prints the correct version available in application-info.plist file! Got it from here
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSLog(@"Version: %@", version);
[defaults setObject:version forKey:@"version_preference"];
[defaults synchronize];
I can confirm if this fixes the issue after resubmitting the application.
Thanks.