I have Swift 3 project (using tab bar project template) , and running it in debug mode is fine with iOS 9.2.
However, I tried to archive and ad-hoc distribute my app (and tried in-house distribution also), the app crashes at launch, sometimes crash when tapping on tab bar, happend on iPhone6 plus, iPad with iOS 9.2 only (iOS 10.x, 9.0, 9.3 work fine).
Can anyone help me?
I have set the swift optimization to none (or Fast, Single-File Optimization [-O]) for release mode, still no luck.
My project information as below:
- Using Swift 3, Xcode 8.2.1 (also tried with 8.2, 8.1 also)
- Using Cocoapods with Alamofire 4.0, CryptoSwift, ObjectMapper...
-Using an own *.framework, added to Embeded Binaries
Below is sample log I got from device:
============================ Part of the log ======================
Incident Identifier: 3BA99166-BB2B-4E83-89E1-8AD6982559ED
CrashReporter Key: 18f1e8dc235fc49697977300f246dd70cdbaefe5
Hardware Model: iPad4,2
Process: MyApp [4841]
Path: /private/var/mobile/Containers/Bundle/Application/68835641-AA2A-4C20-9547-432C9995BA6C/MyApp.app/MyApp
Identifier: com.asahi.asahishimbun.iphone.MyApp
Version: 6.0.0.0 (6.0.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2017-02-23 09:50:16.16 +0700
Launch Time: 2017-02-23 09:46:50.50 +0700
OS Version: iOS 9.2 (13C75)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000180
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000181d8dbdc objc_msgSend + 28
1 UIKit 0x00000001879ee654 -[UINibStringIDTable lookupKey:identifier:] + 132
2 UIKit 0x00000001879ea2a4 -[UINibDecoder decodeObjectForKey:] + 48
3 UIKit 0x00000001878c9530 -[UINib instantiateWithOwner:options:] + 1380
4 UIKit 0x00000001878cb92c -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 224
5 AsahiDigital 0x00000001000a52bc 0x100060000 + 283324
6 AsahiDigital 0x00000001003a805c 0x100060000 + 3440732
7 AsahiDigital 0x00000001003a8f4c 0x100060000 + 3444556
8 UIKit 0x00000001874000c0 -[UIViewController loadViewIfRequired] + 996
9 UIKit 0x00000001874bfda8 -[UINavigationController _layoutViewController:] + 72
10 UIKit 0x00000001874bfc80 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 416
11 UIKit 0x00000001874beec8 -[UINavigationController _startTransition:fromViewController:toViewController:] + 144
12 UIKit 0x00000001874bea6c -[UINavigationController _startDeferredTransitionIfNeeded:] + 868
13 UIKit 0x00000001874be694 -[UINavigationController __viewWillLayoutSubviews] + 60
14 UIKit 0x00000001874be5fc -[UILayoutContainerView layoutSubviews] + 208
15 UIKit 0x00000001873fb778 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 656
16 QuartzCore 0x0000000184e0ab2c -[CALayer layoutSublayers] + 148
17 QuartzCore 0x0000000184e05738 CA::Layer::layout_if_needed(CA::Transaction*) + 292
18 QuartzCore 0x0000000184e055f8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
19 QuartzCore 0x0000000184e04c94 CA::Context::commit_transaction(CA::Transaction*) + 252
20 QuartzCore 0x0000000184e049dc CA::Transaction::commit() + 512
21 QuartzCore 0x0000000184dfe0cc CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80
22 CoreFoundation 0x00000001826c4588 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
23 CoreFoundation 0x00000001826c232c __CFRunLoopDoObservers + 372
24 CoreFoundation 0x00000001826c275c __CFRunLoopRun + 928
25 CoreFoundation 0x00000001825f1680 CFRunLoopRunSpecific + 384
26 GraphicsServices 0x0000000183b00088 GSEventRunModal + 180
27 UIKit 0x0000000187468d90 UIApplicationMain + 204
28 AsahiDigital 0x00000001000fb314 0x100060000 + 635668
29 libdyld.dylib 0x00000001821928b8 start + 4
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager