Error Occurs when Changing UITableView loaded from nib to Subclassing UITableView

Discussion in 'iOS Programming' started by roeik, Dec 26, 2014.

  1. roeik, Dec 26, 2014
    Last edited by a moderator: Dec 29, 2014

    roeik macrumors member

    Joined:
    Dec 25, 2008
    #1
    HI,

    I just modified a class on my iPhone app. It used to load a UITableView from a nib, but now I am just subclassing UITableViewController:

    Code:
    @interface DetailViewController : UITableViewController
    When I build the app on a device that has a previous version installed, the app crashes and I get an error. However, when I delete the app from the simulator/device and build it again the issue is resolved. I tested this on 3 devices running pervious versions of the app. All give the following error, which as I said disappear when I delete the app from the device and rebuild it:

    Code:
    *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "DetailViewController" nib but didn't get a UITableView.'
    *** First throw call stack:
    (0x2fe85f03 0x3a61ace7 0x2fe85e45 0x327ac781 0x326b9895 0x326b9811 0x32845c13 0x3276348f 0x32763299 0x32763231 0x2770ad7 0x326b5305 0x3233131b 0x3232cb3f 0x3232c9d1 0x3232c3e5 0x3232c1f7 0x32325f1d 0x2fe51031 0x2fe4e9bf 0x2fe4ed0b 0x2fdb97a9 0x2fdb958b 0x34d266d3 0x32718891 0x104835 0x3ab18ab7)
    libc++abi.dylib: terminating with uncaught exception of type NSException
    My question is, can I safely submit the new version to the app store without being concerned it will cause a crash to users that update the app?

    Thank you,

    Roei Kashi
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    It's hard to know the answer.

    The way to test this is with an adhoc build. Load your App Store version. Then update it with an adhoc build using iTunes or Xcode. Then see what happens. That is the closest to what a real user will experience.

    Needless to say, you should always do this with new versions to be submitted to the app store.
     

Share This Page