我的应用程序有一个嵌入式框架,在同一个项目中创建,分析崩溃报告我注意到嵌入式框架的符号不起作用:
Last Exception Backtrace:
0 CoreFoundation 0x23b75856 __exceptionPreprocess + 122
1 libobjc.A.dylib 0x354eadfa objc_exception_throw + 34
2 CoreFoundation 0x23b7b020 -[NSObject(NSObject) doesNotRecognizeSelector:] + 184
3 CoreFoundation 0x23b78c7a ___forwarding___ + 698
4 CoreFoundation 0x23aa81a4 _CF_forwarding_prep_0 + 20
5 MyFramework 0x002d72aa 0x2c9000 + 58026
6 MyFramework 0x002edd12 0x2c9000 + 150802
7 CoreData 0x238f0346 developerSubmittedBlockToNSManagedObjectContextPerform + 174
8 libdispatch.dylib 0x35c0fe16 _dispatch_client_callout + 18
9 libdispatch.dylib 0x35c18e82 _dispatch_barrier_sync_f_slow + 538
10 CoreData 0x238f0242 -[NSManagedObjectContext performBlockAndWait:] + 202
11 MyFramework 0x002edb50 0x2c9000 + 150352
12 MyFramework 0x002ed596 0x2c9000 + 148886
13 MyFramework 0x0030273c 0x2c9000 + 235324
14 MyFramework 0x002e8c52 0x2c9000 + 130130
15 libdispatch.dylib 0x35c0fe2a _dispatch_call_block_and_release + 6
16 libdispatch.dylib 0x35c18840 _dispatch_async_redirect_invoke + 1364
17 libdispatch.dylib 0x35c1b80c _dispatch_root_queue_drain + 1568
18 libdispatch.dylib 0x35c1b1e6 _dispatch_worker_thread3 + 90
19 libsystem_pthread.dylib 0x35da4e08 _pthread_wqthread + 1020
20 libsystem_pthread.dylib 0x35da49f8 start_wqthread + 4
主应用程序没有问题:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x37ee868a objc_retain + 10
1 MyApp 0x000c4ae8 -[LoginManager startupNeedToDisplayOnBoarding] (LoginManager.m:26)
2 MyApp 0x000cd6e2 -[AppDelegate applicationDidBecomeActive:] (AppDelegate.m:65)
3 UIKit 0x2a715098 -[UIApplication _stopDeactivatingForReason:] + 1080
4 UIKit 0x2a92d594 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2344
5 UIKit 0x2a940b54 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3218 + 36
6 UIKit 0x2a92a7a6 -[UIApplication workspaceDidEndTransaction:] + 134
7 FrontBoardServices 0x2e78cca4 -[FBSSerialQueue _performNext] + 232
8 FrontBoardServices 0x2e78cf90 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
9 CoreFoundation 0x2651c7c6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
10 CoreFoundation 0x2651c3b6 __CFRunLoopDoSources0 + 454
11 CoreFoundation 0x2651a71e __CFRunLoopRun + 806
12 CoreFoundation 0x2646d0d8 CFRunLoopRunSpecific + 516
13 CoreFoundation 0x2646cecc CFRunLoopRunInMode + 108
14 UIKit 0x2a6fb606 -[UIApplication _run] + 526
15 UIKit 0x2a6f62dc UIApplicationMain + 144
16 Cinime 0x000af75e main (main.m:14)
17 libdyld.dylib 0x3861c872 start + 2
问题显然出在构建设置中,但“调试信息格式”已经是“带有 dSYM 文件的 DWARF”,并且所有其他调试-条带-dsym 相关设置与主应用程序相同。
甚至 crashlytics 也无法进行符号化。
框架“条形”配置
这里有两个 dSYM 文件:
框架:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.com.MyCompanyAAA.MyFramework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<key>CFBundleVersion</key>
<string>3</string>
</dict>
</plist>
应用程序:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.com.MyCompanyBBB.MyApp</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<key>CFBundleVersion</key>
<string>102</string>
</dict>
</plist>
注意 CFBundleIdentifier:
框架:com.MyCompanyAAA.MyFramework
应用程序:com.MyCompanyBBB.MyApp
是的,公司使用两个不同的公司ID,会不会有问题?
dSYM 包结构: