启动崩溃iOS应用程序

时间:2015-11-23 10:41:43

标签: ios objective-c iphone crash-reports

我正在创建一个应用程序,它使用GCM,后台任务和钥匙串来保存用户的信息。我通过将设备UDID添加到Apple开发者帐户,使用我的开发认证发布了一个版本。但几天之后,我得到了用户的反馈,每当启动时都会崩溃。我查看代码但找不到这些bug。我得到了这个日志:

Nov 23 16:34:51 iPhone securityd[9174] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Nov 23 16:34:51 iPhone securityd[9174] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Nov 23 16:34:51 iPhone amfid[10315] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Nov 23 16:34:51 iPhone securityd[9174] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Nov 23 16:34:51 iPhone securityd[9174] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Nov 23 16:34:51 iPhone amfid[10315] <Error>:  SecTrustEvaluate  [leaf Revocation1]
Nov 23 16:34:51 iPhone amfid[10315] <Notice>: developer cert trust result = 5
Nov 23 16:34:51 iPhone amfid[10315] <Error>: /private/var/mobile/Containers/Bundle/Application/446DE89C-A427-4A51-AEA9-7AC86DFD088A/App.app/App not valid: 0xe8008018: The identity used to sign the executable is no longer valid.
Nov 23 16:34:51 iPhone com.apple.xpc.launchd[1] (UIKitApplication:com.xxxxx.App[0xb005][10966]) <Notice>: Service exited due to signal: Killed: 9
Nov 23 16:34:51 iPhone assertiond[9148] <Warning>: Unable to obtain a task name port right for pid 10966: (os/kern) failure (5)
Nov 23 16:34:51 iPhone SpringBoard[9139] <Warning>: Unable to register for exec notifications: No such process
Nov 23 16:34:51 iPhone SpringBoard[9139] <Warning>: Unable to obtain a task name port right for pid 10966: (os/kern) failure (5)
Nov 23 16:34:51 iPhone SpringBoard[9139] <Warning>: Unable to obtain a task name port right for <FBApplicationProcess: 0x1425836d0; com.xxxx.App; pid: 10966>
Nov 23 16:34:51 iPhone SpringBoard[9139] <Warning>: Application 'UIKitApplication:com.xxxxx.App[0xb005]' exited abnormally via signal.
Nov 23 16:34:51 iPhone SpringBoard[9139] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Nov 23 16:34:51 iPhone SpringBoard[9139] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Nov 23 16:34:51 iPhone SpringBoard[9139] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Nov 23 16:34:51 iPhone SpringBoard[9139] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Nov 23 16:34:51 iPhone SpringBoard[9139] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Nov 23 16:34:51 iPhone SpringBoard[9139] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Nov 23 16:34:51 iPhone SpringBoard[9139] <Warning>: Application '(null)' exited for an unknown reason.

请帮我解决这个问题。谢谢你们。我经常撤销并创建新证书和配置文件,并使用它来编程。好吗?

2 个答案:

答案 0 :(得分:0)

我知道你有一个解决方法,但我更愿意解释为什么会发生这种情况

您的项目需要一个授权文件,并启用APNS进行开发或分发。 Apple Doc

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>aps-environment</key>
    <string>development</string>
</dic>

也许你的文件是这样的,但指向分发,所以使用开发将导致它崩溃

希望这有帮助

答案 1 :(得分:0)

虽然筹码不是很清楚,但它可以将你的崩溃缩小到很少的东西。

  1. 您的证书似乎无效 - 请转到Keychain Access并检查您是否拥有有效证书并附上了密钥对。

  2. 您的配置文件无效。访问developer.apple.com并确保您使用的配置文件有效。

  3. Facebook应用程序权限因某些原因被撤销。请检查您的Facebook应用程序,确保一切正常。