We have an app that is already live on app store.
Now we are planning to reduce the app size by programmatically creating all the views & removing respective NIB (XIB) files.
The problem is even when the nib is deleted & not called for, the updated version of the app still points to the old nib, and the issue like this comes up (this image is just an example, the problem is consistent throughout the app) :
Basically, the views get built up by both IB & code.
The only solution we have come up so far is to delete & re-install the app, but asking all the users to do that is undesirable. Moreover, it would also delete their locally stored app data, which is the main issue we are trying to avoid here.
For the above shown example, following code was used to load the ViewController:
Earlier (when the view was built using nib):
TheNewVC *theNewVC = [[TheNewVC alloc] initWithNibName:@"TheNewVC" bundle:nil];
[self presentModalViewController:theNewVC animated:YES];
Now (when the view is built programmatically, leading to above issue):
TheNewVC *theNewVC = [[TheNewVC alloc] initWithNibName:nil bundle:nil];
UINavigationController *addNavCon = [[UINavigationController alloc] initWithRootViewController:theNewVC];
[self presentModalViewController:addNavCon animated:YES];
JFYI, even if TheNewVC *theNewVC = [[TheNewVC alloc] initWithNibName:nil bundle:nil];
is replaced by TheNewVC *theNewVC = [[TheNewVC alloc] init];
, the problem remains same.
What solution could be there that doesn't involve re-installation of the app. Any way we could delete the nib cache that iOS is referring to, programmatically? OR in worse case, ask users to do that? Any help would be much appreciated.