Note that there are some explanatory texts on larger screens.

plurals
  1. POUpdating app on device with .xib removed crashes app
    primarykey
    data
    text
    <p>I have an older version of an app installed on a device. In my new version I no longer had use of a .xib file as it changed from something complex to just a table view and I can instantiate it in code.</p> <p>However, when I build and run on the device it crashes as it still tries to load the controller from the .xib file contained in the older app, and complains about a key/value pair missing for a UILabel.</p> <p>For example:</p> <p>SomeViewController.h (UITableViewController)<br> SomeViewController.m<br> SomeViewController.xib (removed in new version) </p> <pre><code>SomeViewController *controller = [[SomeViewController alloc] initWithStyle:UITableViewStylePlain]; - (id)initWithStyle:(UITableViewStyle)style { self = [super initWithStyle:style]; if (self) { } return self; } </code></pre> <p>Even though I call "initWithStyle" it still tries to load the pre-existing .xib!</p> <p>My current solution is to create SomeViewController.xib with a blank UITableView.</p> <p>I suspect however, that when users update the app from the app store it will overwrite the entire app and not leave anything behind.</p> <p>Is this true? Do app updates overwrite the existing app or does it leave lingering .xib files?</p> <p>Now I have to test the older version with every other view to insure there is no other problems lingering.</p> <p>Reading through the developer text on NIB's: <a href="http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html" rel="nofollow">http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html</a></p> <p>Perhaps I found a bug?</p> <p>Another option is for me to re-name the class to something else like SomeController so as to avoid automatically loading the associated .xib file.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload