IOS app crashes while updating

If I run a clean build and a new installation, my application installs and works fine, however, if I install the previous released version and then overwrite this version with the new version, it will crash the first time it starts.

Playback Steps

  • Install and run the previous version of my application (1.4) on iPhone 4.
  • Close the process of application and destruction.
  • Checkout the latest version (2.0)
  • Delete assembly directory
  • Install and run
  • Crash

I am running Xcode 3.2.5, 4.2 SDK. My iPhone 4 - 4.2.1.

If you look at the crash logs, it looks like I have a bad connection in one of my NIBs, but there is no object trying to connect to the 'view' property in mine AppController. Sometimes an identical failure occurs, except that it will say that this class does not match the key values ​​for the key ActivityIndicator. This is also inconvenient since grep confirmed that I have nothing in my project called activityIndicator.

I have three questions:

  • Why is my application crashing?
  • Does anyone have any further debugging ideas that I can do? I have run out of ideas on how to fix this.
  • (?), Xcode , , , . - , , , , , ?

2011-02-10 06:58:32.115 TheApp[132:307] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<AppController 0x14d680> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x33ac0987 __exceptionPreprocess + 114
    1   libobjc.A.dylib                     0x3347b49d objc_exception_throw + 24
    2   CoreFoundation                      0x33ac0705 -[NSException dealloc] + 0
    3   Foundation                          0x3367db4f -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 182
    4   Foundation                          0x3367d03b _NSSetUsingKeyValueSetter + 90
    5   Foundation                          0x3367eda3 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 194
    6   Foundation                          0x33630b17 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 130
    7   UIKit                               0x3224c60f -[UIRuntimeOutletConnection connect] + 66
    8   CoreFoundation                      0x33a63fc7 -[NSObject(NSObject) performSelector:] + 18
    9   CoreFoundation                      0x33a6cd51 -[NSArray makeObjectsPerformSelector:] + 388
    10  UIKit                               0x3224b577 -[UINib instantiateWithOwner:options:] + 586
    11  UIKit                               0x3224cb39 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 92
    12  UIKit                               0x3209e871 -[UIApplication _loadMainNibFile] + 96
    13  UIKit                               0x3209a1fd -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 180
    14  UIKit                               0x3206648b -[UIApplication handleEvent:withNewEvent:] + 1114
    15  UIKit                               0x32065ec9 -[UIApplication sendEvent:] + 44
    16  UIKit                               0x32065907 _UIApplicationHandleEvent + 5090
    17  GraphicsServices                    0x33b0ef03 PurpleEventCallback + 666
    18  CoreFoundation                      0x33a556ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
    19  CoreFoundation                      0x33a556c3 __CFRunLoopDoSource1 + 166
    20  CoreFoundation                      0x33a47f7d __CFRunLoopRun + 520
    21  CoreFoundation                      0x33a47c87 CFRunLoopRunSpecific + 230
    22  CoreFoundation                      0x33a47b8f CFRunLoopRunInMode + 58
    23  UIKit                               0x32099309 -[UIApplication _run] + 380
    24  UIKit                               0x32096e93 UIApplicationMain + 670
    25  TheApp                              0x00002781 main + 88
    26  TheApp                              0x00002724 start + 40
)

-

, , - , .. application:didFinishLaunchingWithOptions: applicationDidFinishLaunching: .

+3
3

- , . , NIB . , NIB en.lproj. Xcode ( ), , . NIB, .

, NIB, NIB, . .ipa , .

+4

, , , , . - , , , , .

+2

This has nothing to do with file system locations. You have inconsistency with your nib and your application logic. I assume that you did something like changing the type of AppController used in your project without updating your nib or changing one of IBOutlets without updating your nib. What happens during deserialization of the control is trying to connect something like an IBOutlet that previously existed in the old controller type, but no longer exists in the new AppController type.

+1
source

Source: https://habr.com/ru/post/1791209/


All Articles