【问题标题】:App With CocoaPods Distribution AdHoc Crash (uses keychain and keychain returns null)App With CocoaPods Distribution AdHoc Crash(使用钥匙串且钥匙串返回 null)
【发布时间】:2015-03-13 19:27:04
【问题描述】:

xcode swift 项目与几个 cocoapods 框架(如 MQTTClient)一起运行,使用 keychain 并且 keychain 返回 null,在 xcode 上运行良好但在分发 adhoc 上崩溃,我已经完成了重新安装 cocoapods 的所有工作,将 cocoa 的 .a 文件添加到构建阶段,添加库搜索路径,我不知道为什么 keychain 一直返回 nil 以及为什么它一直在 Distribution adhoc 上崩溃,这是崩溃报告

类MQTTManager启动函数访问cocopods MQTTClient.a 并访问钥匙串

Incident Identifier: 4B4B005E-7BC2-487D-9A8A-FEEAB4967CF4
CrashReporter Key:   TODO
Hardware Model:      iPhone7,2
Process:         testProj [494]
Path:            /private/var/mobile/Containers/Bundle/Application      /3A3B094D-FACB-49B9-BE84-5EA6F8F40D2A/testProj.app/testProj

Identifier:      com.test.testProj
Version:         205
Code Type:       ARM-64
Parent Process:  launchd [1]

Date/Time:       2015-03-13 14:28:20 +0000
OS Version:      iPhone OS 8.2 (12D508)
Report Version:  104

Exception Type:  SIGTRAP
Exception Codes: #0 at 0x1002559e4
Crashed Thread:  0

Thread 0 Crashed:
0   testProj                           0x00000001002559e4 _TFC9testProj11MQTTManager5startfS0_FT_T_ + 2000
1   testProj                           0x000000010014a134 _TFFC9testProj16SignInController9checkUserFS0_FT_T_U_FTCSo12NSURLRequestGSqCSo17NSHTTPURLResponse_GSqPSs9AnyObject__GSqCSo7NSError__T_ + 3848
2   testProj                           0x0000000100244b68 _TFFFC9testProj7Request8responseFDS0_FT5queueGSqCSo8NSObject_10serializerFTCSo12NSURLRequestGSqCSo17NSHTTPURLResponse_GSqCSo6NSData__TGSqPSs9AnyObject__GSqCSo7NSError__17completionHandlerFTS2_GSqS3__GSqPS5___GSqS6___T__DS0_U_FT_T_U_FT_T_ + 640
3   libdispatch.dylib                   0x0000000198631994 <redacted> + 24
4   libdispatch.dylib                   0x0000000198631954 <redacted> + 16
5   libdispatch.dylib                   0x000000019863620c _dispatch_main_queue_callback_4CF + 1608
6   CoreFoundation                      0x0000000186fc22ec <redacted> + 12
7   CoreFoundation                      0x0000000186fc0394 <redacted> + 1492
8   CoreFoundation                      0x0000000186eed1f4 CFRunLoopRunSpecific + 396
9   GraphicsServices                    0x000000019030f6fc GSEventRunModal + 168
10  UIKit                               0x000000018b87e10c UIApplicationMain + 1488
11  testProj                           0x00000001001c0c60 main + 116
12  libdyld.dylib                       0x000000019865ea08 <redacted> + 4

【问题讨论】:

    标签: ios xcode cocoapods keychain ad-hoc-distribution


    【解决方案1】:

    在这里找到了解决方案 http://dasdev.de/2014/12/04/assessing-the-keychain-in-swift/

    我发现它没有连接到任何搜索路径的 cocoapods 库

    我不得不将 swift 编译器优化标志更改为 [NONE],花了我 2 天时间才找到答案,就这样,它工作正常

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多