Crash When Running on Device After Second Launch

Crash when running on device after second launch

I encountered the same crash issue and then I resolved it. I would like you to share the following my solution, but it might depend on your app. I hope it would help you.

In this thread in Apple's forum, eskimo's comment saved me(By the way, eskimo always helps me in the forum). According to the comment, I knew I had to check console logs of my device in Console app and then I found the following log.

*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named MKMapView because no class named MKMapView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'

Thanks to the log's instruction, I figured out there was a problem to link Maps.framework with my app binary. So I put Maps.framework into "Frameworks, Libraries, and Embedded Content" in Xcode.

Sample Image

As a result, I could resolved the crash issue!(That's weird.) I think this issue should be owned by Xcode 11 and it needs to be fixed by Xcode.

App crashing on second launch only after upgrading from iOS8 to iOS 9.2

It appears to be stemming from a known bug in 9.2 related to SpriteKit particle emitters. Removing the node or lowering the birthrate has stopped the crashing.

Application runs one time but crashes the second time

Your problem may be in not properly releasing your map delegate. I assume that since you create your MKMapView in viewDidLoad, you release it in the viewDidUnload, which most likely gets called when you fast switch the app. If you have set delegate for the MKMapView you created, you have to set the map view's delegate = nil before you release the MKMapView.



Related Topics



Leave a reply



Submit