Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue XCode 8, Swift 2.3 Archived Version crashing on launch on IOS 9.2.1 -> IOS 9.0

I updated my application from Swift 2.2 to Swift 2.3 with minimal changes using XCode 8.0

Everything works fine running from XCode in both debug or release build configuration

When testing an exported archive on IOS devices 9.2.1 and lower (Adhoc or development provisioning profile) I get a crash with

SpringBoard[54] <Warning>: BSXPCMessage received error for message: Connection invalid
SpringBoard[54] <Warning>: BSXPCMessage received error for message: Connection invalid
timed[58] <Notice>: (Note ) CoreTime: Current mcc: '0' simulated:'0'.
SpringBoard[54] <Warning>: HW kbd: Failed to set (null) as keyboard focus
<Error>: error evaluating process info - pid: 1038, puniqueid: 1038
(UIKitApplication:) <Notice>: Service exited due to signal: Segmentation fault: 11. 

Which means it is trying to access memory somewhere invalid.

I have tried writing to NSLog and tracing but am unable to find the point where it is crashing.

I suspect it may have to do with the Storyboard changes from XCode 7-8.

I have been searching for the search of this bug too much time already it takes a long time since I have to create an archive each time. 95% of the time it crashes on launch but sometimes I succeed on launching.

I have had no problems launching on devices running IOS 9.3 or IOS 10

----- Update ----

I downloaded XCode 8-1 beta and this resolves my problem also.

So either use Xcode 7.3 or 8.1 beta+ but not 8.0. I went through release notes of 8.1 beta but saw no mention of this issue.

----- Update ----

HatTip to @KoCMoHaBTa when updating to 8.1 , this issue is resolved, unless you also change the deployment target to 9.0 at which point it reoccurs.

like image 877
Ryan Heitner Avatar asked Sep 22 '16 07:09

Ryan Heitner


2 Answers

I might be a bit late to the party, but we've been looking into this bug for 2 days now. The following stackoverflow post fixed it for us : Xcode 8 build crash on iOS 9.2 and below

It also explains what is so different on iOS 9.3 that putting it as the iOS version's deployment target fixes all issues 'magically'

It might be worth checking out ;)

like image 130
Yannick Avatar answered Jan 03 '23 17:01

Yannick


Eventually, for unknown reason, the random crashes started to appear again, even if we had set the deployment target to 8.4.

So at the end we ended raising the deployment target to iOS 9.3 which eliminates the app usage on the affected version.

Unfortunately we were not able to afford to transition to swift 3 at this moment, so this could be an option too.

like image 27
KoCMoHaBTa Avatar answered Jan 03 '23 16:01

KoCMoHaBTa