iOS 应用程序在发布时崩溃,但不是在测试中,也不是在 Apple 审核中

iOS app crashes when published, but not in test and not in Apple review

相当奇怪的一个问题,我无从解决。

我的 IOS 应用程序在我所有来自 Xcode 的设备上运行。然后,我将其提交给三个外部人员使用 TestFlight 进行测试。该应用程序按预期工作。然后我提交它在 iTunes 商店上发布,经过三轮拒绝(不是针对应用程序本身,而是针对商店列表),它被接受了。它对 Apple 审阅者有用,因为他们向我发送了屏幕截图和应用程序与我的服务器的连接,如果它不起作用,他们会拒绝它。

该应用程序已发布,但当我、我的测试人员或任何其他人从 iTunes 下载它时,它立即崩溃。显示 LaunchScreen 控股故事板,然后应用程序立即退出。我已经删除了我在 AppDelegate 中设置定期后台任务的所有代码 - 现在那里只有一条调试行(当应用程序崩溃时不会打印)并重新发布但它仍然崩溃。

该应用使用以下 PODs:

pod 'TPInAppReceipt'
pod 'IQKeyboardManagerSwift'
pod 'GRDB.swift'
pod 'Alamofire', '~> 4.0'
pod 'Gloss'
pod 'DLRadioButton', '~> 1.4'
pod 'Cosmos', '~> 7.0'
pod 'SwiftEventBus',  :tag => '2.2.0', :git => 'https://github.com/cesarferreira/SwiftEventBus.git'
pod 'UITextView+Placeholder'

这是控制台日志:

Jul 23 10:53:30 Camerons-iPhone atc(AirTrafficDevice)[31] <Notice>: <ATLegacyMessageLink: 0x16d88330, wifi=0> ---> [Ping Request. id=90, Session=0, params=(null)]
Jul 23 10:53:30 Camerons-iPhone SpringBoard(Security)[49] <Notice>: could not enable test hierarchy: ApplePinningAllowTestCertsiPhoneApplicationSigning not true
Jul 23 10:53:30 Camerons-iPhone SpringBoard(Security)[49] <Notice>: could not enable test hierarchy: ApplePinningAllowTestCertsiPhoneApplicationSigning not true
Jul 23 10:53:30 Camerons-iPhone SpringBoard[49] <Notice>: Running <SBAppToAppWorkspaceTransaction: 0x9cb1b70> for transition request:
<SBMainWorkspaceTransitionRequest: 0x9be8b90; eventLabel: ActivateApplication = com.cbnewham.keyholderi; display: Main; source: HomeScreen> {
    applicationContext = <SBWorkspaceApplicationTransitionContext: 0x9954c70; background: NO> entities = {
        SBLayoutPrimaryRole = <SBWorkspaceApplication: 0x9895490; ID: com.cbnewham.keyholderi; layoutRole: primary>;
    };
}
Jul 23 10:53:30 Camerons-iPhone assertiond[64] <Notice>: Submitted job with label: UIKitApplication:com.cbnewham.keyholderi[0x54c1][64]
Jul 23 10:53:30 Camerons-iPhone SpringBoard(AssertionServices)[49] <Notice>: [com.cbnewham.keyholderi] Bootstrap complete with label: UIKitApplication:com.cbnewham.keyholderi[0x54c1][64]
Jul 23 10:53:30 Camerons-iPhone SpringBoard[49] <Notice>: Disabling home screen icon rotation for reason: SBAppToAppWorkspaceTransaction
Jul 23 10:53:30 Camerons-iPhone SpringBoard[49] <Notice>: Disabling home screen icon rotation for reason: <SBCrossfadeIconZoomAnimator:0x9b2bb60>
Jul 23 10:53:30 Camerons-iPhone SpringBoard(MobileCoreServices)[49] <Notice>: Looking up unclipped icon for app <private>
Jul 23 10:53:30 Camerons-iPhone SpringBoard[49] <Notice>: Dismissing banner for notification (null)
Jul 23 10:53:30 Camerons-iPhone sharingd[32] <Notice>: SystemUI unknown identifier: 'com.cbnewham.keyholderi'
Jul 23 10:53:30 Camerons-iPhone SpringBoard(CoreMotion)[49] <Notice>: Stopping device motion, mode=0x<private>
Jul 23 10:53:30 Camerons-iPhone CommCenter[23] <Notice>: #I CSIAppInfo.AppObserver: observe_block_invoke: FBSDisplayLayoutUpdateHandler: update start
Jul 23 10:53:30 Camerons-iPhone mediaserverd(CoreMedia)[42] <Notice>: -CMSessionMgr- cmsmHandleApplicationStateChange: CMSession: Client com.cbnewham.keyholderi with pid '249' is now Foreground Running. Background entitlement: NO
Jul 23 10:53:30 Camerons-iPhone CommCenter[23] <Notice>: #I CSIAppInfo.AppObserver: observe_block_invoke: FBSDisplayLayoutUpdateHandler: app <private> (UIApplicationElement 1 hasKeyboardFocus 0)
Jul 23 10:53:30 Camerons-iPhone sharingd[32] <Notice>: SystemUI changed: 0x10 -> 0x0
Jul 23 10:53:30 Camerons-iPhone backboardd[63] <Notice>: Turning on orientation events.
Jul 23 10:53:30 Camerons-iPhone backboardd(CoreMotion)[63] <Notice>: fHasSeenACaseLatchCoverOnce, 0
Jul 23 10:53:30 Camerons-iPhone backboardd(CoreMotion)[63] <Notice>: Starting orientation detection with accelFrequency 10.000000, isIpad, 0, decimationRate, 1
Jul 23 10:53:30 Camerons-iPhone backboardd(CoreMotion)[63] <Notice>: Waiting for the first orientation to come in
Jul 23 10:53:30 Camerons-iPhone backboardd(CoreMotion)[63] <Notice>: Notify from, Unexpected -> FaceUp
Jul 23 10:53:30 Camerons-iPhone backboardd(CoreMotion)[63] <Notice>: Received orientation. (Ambiguous to FaceUp) Timestamp 1311.992493
Jul 23 10:53:30 Camerons-iPhone backboardd(CoreMotion)[63] <Notice>: Updating client handler: Orientation FaceUp, Callback mode: -1
Jul 23 10:53:30 Camerons-iPhone backboardd(CoreMotion)[63] <Notice>: Got latest sample: 5 @ 1311.992493
Jul 23 10:53:30 Camerons-iPhone backboardd[63] <Notice>: Effective device orientation changed to: faceUp
Jul 23 10:53:30 Camerons-iPhone itunesstored(iTunesStore)[95] <Error>: Could not load library [21]
Jul 23 10:53:30 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TCP Conn Start [21:0x167317e0]
Jul 23 10:53:30 Camerons-iPhone CommCenter[23] <Notice>: #I CSIAppInfo.AppObserver: observe_block_invoke: 4. app got notification state: pid=249 for <private>
Jul 23 10:53:30 Camerons-iPhone CommCenter[23] <Notice>: #I CSIAppInfo.AppObserver: notifyAboutFrontAppChange: notifyAboutFrontAppChange : app: <private>; pid: 249; net: 0
Jul 23 10:53:30 Camerons-iPhone CommCenter[23] <Notice>: #I CSIAppInfo.AppObserver: observe_block_invoke: 5. app got notification state: new counter=14
Jul 23 10:53:30 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: 249 com.cbnewham.keyholderi: ForegroundRunning (most elevated: ForegroundRunning)
Jul 23 10:53:30 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: Entry, display name com.cbnewham.keyholderi uuid 8FB68BCF-EA10-3E5C-B86C-A3E01F303CF7 pid 249 isFront 1
Jul 23 10:53:30 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: Check for bundle name com.cbnewham.keyholderi returns 0
Jul 23 10:53:30 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: app name com.cbnewham.keyholderi isForeground 1  hasForegroundApps 1, current idea of foreground 0 disp (null)
Jul 23 10:53:30 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: Going to Foreground, new flags 0x0, initial value 0x0, enabled 0
Jul 23 10:53:30 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: Continue with bundle name com.cbnewham.keyholderi, is front 1
Jul 23 10:53:30 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: com.cbnewham.keyholderi: Foreground: true
Jul 23 10:53:30 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: Set appCompactState object 0 for key com.cbnewham.keyholderi
Jul 23 10:53:30 Camerons-iPhone CommCenter[23] <Notice>: #I BundleID: <private> is a foreground app
Jul 23 10:53:31 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: CFSM2 foreground (current/proposed/state) in = (0/1/2)
Jul 23 10:53:31 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: CFSM2 foreground (current/state) out = (1/1)
Jul 23 10:53:31 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: CFSM Current state: idle, changed: systemForeground to 1 for net type 0, eligible for alerted but constraints unsatisfied (1,0,0,0)
Jul 23 10:53:31 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: CFSM Current state: idle, changed: systemForeground to 1 for net type 0, ineligible for committed as nil pred, wifi (0x0) cell (0x0)
Jul 23 10:53:31 Camerons-iPhone symptomsd(SymptomEvaluator)[133] <Notice>: CFSM Relays: cell (active-no/primary-no/knowngood-no/rssithresh-ok/txthresh-ok/arp-ok/dns-ok/tcp-ok/lqm:-2/advisory:0) wifi (active/primary/knowngood/rssithresh-ok/txthresh-ok/arp-ok/dns-ok/tcp-ok/lqm:50/advisory:5)
Jul 23 10:53:31 Camerons-iPhone locationd[67] <Notice>: Client com.cbnewham.keyholderi connected
Jul 23 10:53:31 Camerons-iPhone locationd[67] <Notice>: getClientEffectiveRegistrationResult, /private/var/containers/Bundle/Application/99081F2A-DB4B-4E69-A354-C4F89BAED901/Keyholder.app/Keyholder, com.cbnewham.keyholderi, , CLClientRegistrationResult, kCLClientRegistrationResultFailedUnavailable, CLCommonLocationServicesEnabled, 1
Jul 23 10:53:31 Camerons-iPhone locationd[67] <Notice>: message 'kCLConnectionMessageRegistration' received from client 'com.cbnewham.keyholderi'
Jul 23 10:53:31 Camerons-iPhone locationd[67] <Notice>: getClientEffectiveRegistrationResult, /private/var/containers/Bundle/Application/99081F2A-DB4B-4E69-A354-C4F89BAED901/Keyholder.app/Keyholder, com.cbnewham.keyholderi, , CLClientRegistrationResult, kCLClientRegistrationResultFailedUnavailable, CLCommonLocationServicesEnabled, 1
Jul 23 10:53:31 Camerons-iPhone locationd[67] <Notice>: getClientEffectiveRegistrationResult, /private/var/containers/Bundle/Application/99081F2A-DB4B-4E69-A354-C4F89BAED901/Keyholder.app/Keyholder, com.cbnewham.keyholderi, , CLClientRegistrationResult, kCLClientRegistrationResultFailedUnavailable, CLCommonLocationServicesEnabled, 1
Jul 23 10:53:31 Camerons-iPhone locationd[67] <Notice>: message 'kCLConnectionMessagePausesLocationUpdatesAutomatically' received from client 'com.cbnewham.keyholderi'
Jul 23 10:53:31 Camerons-iPhone geod(CFNetwork)[99] <Notice>: TIC TCP Conn Start [22:0x14e15e80]
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TCP Conn Event [21:0x167317e0]: 1 Err(0)
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TCP Conn Connected [21:0x167317e0]: Err(0)
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC Enabling TLS [21:0x167317e0]
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I New CTServerConnection from pid 249 (conn=0x165047d0)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I  -- connection has entitlements: <private>
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I New CTServerConnection from pid 249 (conn=0x1658c280)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I CTServerConnection from pid 249[<private>] is named '<private>'.
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I   ==== client 249 (<private>) registered for event kCTEventRestrictedForegroundResume(171) (now total 1)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I   ==== client 249 (<private>) registered for event kCTEventPublicCallStatus(174) as alternate to kCTEventCallStatus(1) (now total 2)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I   ==== client 249 (<private>) registered for event kCTEventPublicCallSubType(175) as alternate to kCTEventCallSubType(3) (now total 3)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I   ==== client 249 (<private>) registered for event kCTEventPublicAlternateCallStatus(179) as alternate to kCTEventAlternateCallStatus(116) (now total 4)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I   ==== client 249 (<private>) registered for event kCTEventPublicCallIdentification(176) as alternate to kCTEventCallIdentification(4) (now total 5)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #E Client 249 (<private>) not permitted to register for event kCTEventCallForwarded(5); ignored registration
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I   ==== client 249 (<private>) registered for event kCTEventPublicCallCauseCode(178) as alternate to kCTEventCallCauseCode(7) (now total 6)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I   ==== client 249 (<private>) registered for event kCTEventPublicCallControlError(177) as alternate to kCTEventCallControlError(6) (now total 7)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #E Client 249 (<private>) not permitted to register for event kCTEventCallInputFrequencyLevel(163); ignored registration
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #E Client 249 (<private>) not permitted to register for event kCTEventCallOutputFrequencyLevel(164); ignored registration
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #E Client 249 (<private>) not permitted to register for event kCTEventPullCallIsPossible(165); ignored registration
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I CTServerConnection from pid 249[<private>] is named '<private>'.
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #E Client 249 (<private>) not permitted to register for event kCTEventRegistrationOperatorName(45); ignored registration
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I App state[<private>(249)] is moving from kUnknown to kInForegroundUnknownRestriction
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I App state[<private>(249)] is moving from kInForegroundUnknownRestriction to kInForegroundRestricted
Jul 23 10:53:31 Camerons-iPhone geod(CFNetwork)[99] <Notice>: TIC TCP Conn Event [22:0x14e15e80]: 1 Err(0)
Jul 23 10:53:31 Camerons-iPhone SpringBoard(KeyboardArbiter)[49] <Error>: HW kbd: Failed to set (null) as keyboard focus
Jul 23 10:53:31 Camerons-iPhone locationd[67] <Notice>: Client com.cbnewham.keyholderi disconnected
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I CTServerConnection from pid 249 has closed (conn=0x165047d0)
Jul 23 10:53:31 Camerons-iPhone geod(CFNetwork)[99] <Notice>: TIC TCP Conn Connected [22:0x14e15e80]: Err(0)
Jul 23 10:53:31 Camerons-iPhone CommCenter[23] <Notice>: #I CTServerConnection from pid 249 has closed (conn=0x1658c280)
Jul 23 10:53:31 Camerons-iPhone backboardd[63] <Notice>: Turning off orientation events.
Jul 23 10:53:31 Camerons-iPhone backboardd(CoreMotion)[63] <Notice>: Stopping orientation detection.
Jul 23 10:53:31 Camerons-iPhone backboardd[63] <Notice>: Effective device orientation changed to: unknown
Jul 23 10:53:31 Camerons-iPhone geod(CFNetwork)[99] <Notice>: TIC Enabling TLS [22:0x14e15e80]
Jul 23 10:53:31 Camerons-iPhone ReportCrash(CrashReporterSupport)[250] <Notice>: cr_update: <private>
Jul 23 10:53:31 Camerons-iPhone ReportCrash(CrashReporterSupport)[250] <Notice>: cr_update: <private>
Jul 23 10:53:31 Camerons-iPhone locationd[67] <Notice>: {"msg":"adapter details", "adaperDescription":"usb host", "batteryChargerType":"kChargerTypeUsb"}
Jul 23 10:53:31 Camerons-iPhone locationd[67] <Notice>: {"msg":"battery capacity info", "batteryStatus":"{"level":96.000000, "charged":false, "connected":true, "chargerType":"kChargerTypeUsb", "wasConnected":false", "":"", "currentCapacity":"1440", "maximumCapacity":"1500", "batteryIsDifferent":"1"}
Jul 23 10:53:31 Camerons-iPhone coreduetd[82] <Notice>: CDDBatteryMonitor:  received batterycallback, currentPercentage:96.000000!
Jul 23 10:53:31 Camerons-iPhone coreduetd[82] <Notice>: CDDBatteryMonitor:  Notifying battery change for BON calculation!
Jul 23 10:53:31 Camerons-iPhone powerd[62] <Notice>: Battery capacity change posted with value 0x2b0060
Jul 23 10:53:31 Camerons-iPhone SpringBoard(BatteryCenter)[49] <Notice>: Power sources changed
Jul 23 10:53:31 Camerons-iPhone SpringBoard(BatteryCenter)[49] <Notice>: Query power sources
Jul 23 10:53:31 Camerons-iPhone powerd[62] <Notice>: Battery time remaining posted. Capacity:0x60
Jul 23 10:53:31 Camerons-iPhone SpringBoard(BatteryCenter)[49] <Notice>: Got a list of 1 sources
Jul 23 10:53:31 Camerons-iPhone SpringBoard(BatteryCenter)[49] <Notice>: Found 1 power sources
Jul 23 10:53:31 Camerons-iPhone SpringBoard(BatteryCenter)[49] <Notice>: Found power source: {
    "Battery Provides Time Remaining" = 1;
    BatteryHealth = Good;
    Current = 1000;
    "Current Capacity" = 96;
    DesignCycleCount = 300;
    "Is Charging" = 1;
    "Is Finishing Charge" = 0;
    "Is Present" = 1;
    "Max Capacity" = 100;
    Name = "InternalBattery-0";
    "Power Source ID" = 4063331;
    "Power Source State" = "AC Power";
    "Raw External Connected" = 1;
    "Show Charging UI" = 1;
    "Time to Empty" = 0;
    "Time to Full Charge" = 0;
    "Transport Type" = Internal;
    Type = InternalBattery;
}
Jul 23 10:53:31 Camerons-iPhone SpringBoard(BatteryCenter)[49] <Notice>: Found device: <BCBatteryDevice: 0x6f51b70; vendor = Apple; productIdentifier = 0; parts = (null); identifier = 4063331; matchIdentifier = (null); baseIdentifier = InternalBattery-0; name = iPhone; groupName =InternalBattery-0; percentCharge = 96; lowBattery = NO; connected = YES; charging = YES; internal = YES; powerSource = YES; poweredSoureState = AC Power; transportType = 1 >
Jul 23 10:53:31 Camerons-iPhone coreduetd[82] <Notice>: BatteryConditionChange: device:0, batteryLevel:96, isConnectedToCharger:1
Jul 23 10:53:31 Camerons-iPhone coreduetd[82] <Notice>: No change in Local BON: 101.
Jul 23 10:53:31 Camerons-iPhone securityd[94] <Notice>: cert[0]: NonEmptySubject =(leaf)[]> 0
Jul 23 10:53:31 Camerons-iPhone securityd[94] <Notice>: cert[0]: AnchorTrusted =(leaf)[force]> 0
Jul 23 10:53:31 Camerons-iPhone securityd[94] <Notice>: cert[0]: NonEmptySubject =(leaf)[]> 0
Jul 23 10:53:31 Camerons-iPhone securityd[94] <Notice>: cert[0]: AnchorTrusted =(leaf)[force]> 0
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TLS Event [21:0x167317e0]: 2, Pending(0)
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TLS Event [21:0x167317e0]: 11, Pending(0)
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TLS Event [21:0x167317e0]: 14, Pending(0)
Jul 23 10:53:31 Camerons-iPhone SpringBoard[49] <Notice>: Destination SBNotificationBannerDestination is now ready to receive notifications
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TLS Trust Result [21:0x167317e0]: 0
Jul 23 10:53:31 Camerons-iPhone ReportCrash[250] <Notice>: Formulating report for corpse[249] <private>
Jul 23 10:53:31 Camerons-iPhone securityd[94] <Notice>: cert[0]: NonEmptySubject =(leaf)[]> 0
Jul 23 10:53:31 Camerons-iPhone securityd[94] <Notice>: cert[0]: AnchorTrusted =(leaf)[force]> 0
Jul 23 10:53:31 Camerons-iPhone ReportCrash(MobileCoreServices)[250] <Notice>: notify_register_check() failed with error 1000000
Jul 23 10:53:31 Camerons-iPhone DuetHeuristic-BM(DuetActivitySchedulerDaemon)[91] <Notice>: Trigger: <private> is now [96]
Jul 23 10:53:31 Camerons-iPhone ReportCrash(CrashReporterSupport)[250] <Notice>: Saved type '109(<private>)' report (6 of max 25) at <private>
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TLS Event [21:0x167317e0]: 20, Pending(0)
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TCP Conn Event [21:0x167317e0]: 8 Err(0)
Jul 23 10:53:31 Camerons-iPhone itunesstored(CFNetwork)[95] <Notice>: TIC TLS Handshake Complete [21:0x167317e0]
Jul 23 10:53:32 Camerons-iPhone SpringBoard(FrontBoard)[49] <Notice>: <FBApplicationProcess: 0x9bdf9e0; Keyholder; pid: 249> crashed.
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Process exited: <FBApplicationProcess: 0x9bdf9e0; Keyholder; pid: -1> -> <FBApplicationProcessExitContext: 0x16e0b540; exitReason: crash; terminationReason: (none)>
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Undimming for source: programmatic
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: returning the workspace lock time (180.000000) from _nextLockTimeDuration
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: returning the workspace dim time (160.000000) from _nextIdleTimeDuration
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Setting next idle duration (source:1) to: 160.000000 lockAfterDim: 20.000000
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Setting _lastBKUserEventTimerMode=2 with duration=160.000000
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Undimming for source: programmatic
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: returning the workspace lock time (180.000000) from _nextLockTimeDuration
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: returning the workspace dim time (160.000000) from _nextIdleTimeDuration
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Setting next idle duration (source:1) to: 160.000000 lockAfterDim: 20.000000
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Setting _lastBKUserEventTimerMode=2 with duration=160.000000
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Undimming for source: programmatic
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: returning the workspace lock time (180.000000) from _nextLockTimeDuration
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: returning the workspace dim time (160.000000) from _nextIdleTimeDuration
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Setting next idle duration (source:1) to: 160.000000 lockAfterDim: 20.000000
Jul 23 10:53:32 Camerons-iPhone SpringBoard[49] <Notice>: Setting _lastBKUserEventTimerMode=2 with duration=160.000000
Jul 23 10:53:32 Camerons-iPhone assertiond[64] <Notice>: Deleted job with label: UIKitApplication:com.cbnewham.keyholderi[0x54c1][64]

这里是堆栈跟踪(缩写):

Incident Identifier: 099C3705-E9A0-4047-9154-2F8D500D4912
CrashReporter Key:   5b93dcebf8479950368ad4075619881fc9ebac50
Hardware Model:      iPhone5,4
Process:             Keyholder [249]
Path:                /private/var/containers/Bundle/Application/99081F2A-DB4B-4E69-A354-C4F89BAED901/Keyholder.app/Keyholder
Identifier:          com.cbnewham.keyholderi
Version:             9 (1.1.1)
Code Type:           ARM (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.cbnewham.keyholderi [407]


Date/Time:           2017-07-23 10:53:31.3838 +0100
Launch Time:         2017-07-23 10:53:30.0000 +0100
OS Version:          iPhone OS 10.3.1 (14E304)
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000018
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswiftCore.dylib              0x009995ce 0x74c000 + 2414030
1   Keyholder                       0x000953c8 0x20000 + 480200
2   Keyholder                       0x000927e8 0x20000 + 468968
3   Keyholder                       0x00092cb8 0x20000 + 470200
4   UIKit                           0x2083d4fc -[UIViewController _setViewAppearState:isAnimating:] + 392
5   UIKit                           0x2083d34e -[UIViewController __viewWillAppear:] + 140
6   UIKit                           0x2089f4ee -[UIViewController viewWillMoveToWindow:] + 452
7   UIKit                           0x2082de24 -[UIView(Hierarchy) _willMoveToWindow:withAncestorView:] + 560
8   UIKit                           0x2082d1fc -[UIView(Internal) _addSubview:positioned:relativeTo:] + 406
9   UIKit                           0x2082d052 -[UIView(Hierarchy) addSubview:] + 730
10  UIKit                           0x2082c660 -[UIWindow addRootViewControllerViewIfPossible] + 510
11  UIKit                           0x20829a0a -[UIWindow _setHidden:forced:] + 286
12  UIKit                           0x20899560 -[UIWindow makeKeyAndVisible] + 42
13  UIKit                           0x20a96f52 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3906
14  UIKit                           0x20a9c05c -[UIApplication _runWithMainScene:transitionContext:completion:] + 1640
15  UIKit                           0x20aaec8c __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3153 + 40
16  UIKit                           0x20a9979a -[UIApplication workspaceDidEndTransaction:] + 142
17  FrontBoardServices              0x1ced8c12 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 18
18  FrontBoardServices              0x1ced8acc -[FBSSerialQueue _performNext] + 220
19  FrontBoardServices              0x1ced8db6 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
20  CoreFoundation                  0x1b5b3fdc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
21  CoreFoundation                  0x1b5b3b04 __CFRunLoopDoSources0 + 424
22  CoreFoundation                  0x1b5b1f50 __CFRunLoopRun + 1160
23  CoreFoundation                  0x1b5050ee CFRunLoopRunSpecific + 470
24  CoreFoundation                  0x1b504f10 CFRunLoopRunInMode + 104
25  UIKit                           0x2088f254 -[UIApplication _run] + 660
26  UIKit                           0x20889e82 UIApplicationMain + 150
27  Keyholder                       0x000284a8 0x20000 + 33960
28  libdyld.dylib                   0x1acf24ea start + 2

Thread 1:
0   libsystem_pthread.dylib         0x1ae7a4c4 start_wqthread + 0

Thread 2 name:  Dispatch queue: GRDB.SerializedDatabase
Thread 2:
0   libsystem_kernel.dylib          0x1adb16e4 pread + 20
1   libsqlite3.dylib                0x1bac34c2 0x1ba4d000 + 484546
2   libsqlite3.dylib                0x1ba54b38 0x1ba4d000 + 31544
3   libsqlite3.dylib                0x1ba6df76 0x1ba4d000 + 135030
4   libsqlite3.dylib                0x1bab954e 0x1ba4d000 + 443726
5   libsqlite3.dylib                0x1bacead4 0x1ba4d000 + 531156
6   libsqlite3.dylib                0x1ba93a6c 0x1ba4d000 + 289388
7   libsqlite3.dylib                0x1bace6b2 0x1ba4d000 + 530098
8   libsqlite3.dylib                0x1ba85a7e 0x1ba4d000 + 232062
9   libsqlite3.dylib                0x1ba7e59a sqlite3_step + 442
10  GRDB                            0x004cb05c 0x3dc000 + 979036
11  GRDB                            0x004cb310 0x3dc000 + 979728
12  GRDB                            0x003e5890 0x3dc000 + 39056
13  GRDB                            0x003e5990 0x3dc000 + 39312
14  GRDB                            0x003e3528 0x3dc000 + 29992
15  GRDB                            0x0048a070 0x3dc000 + 712816
16  GRDB                            0x0048199c 0x3dc000 + 678300
17  GRDB                            0x004818c0 0x3dc000 + 678080
18  Keyholder                       0x0005307c 0x20000 + 209020
19  Keyholder                       0x00054e0c 0x20000 + 216588
20  Keyholder                       0x00055714 0x20000 + 218900
21  Keyholder                       0x00054ed4 0x20000 + 216788
22  GRDB                            0x004163c4 0x3dc000 + 238532

Thread 3:
0   libsystem_pthread.dylib         0x1ae7a4c4 start_wqthread + 0

Thread 4 name:  Dispatch queue: com.apple.CoreLocation.ConnectionClient.0x15592ad0.events
Thread 4:
0   libsystem_kernel.dylib          0x1adb0968 semaphore_timedwait_trap + 8
1   libdispatch.dylib               0x1acd69de _os_semaphore_timedwait + 70
2   libdispatch.dylib               0x1acd607e _dispatch_semaphore_wait_slow + 56
3   CoreLocation                    0x2269a388 0x22697000 + 13192
4   CoreLocation                    0x226a0b9e 0x22697000 + 39838
5   CoreLocation                    0x226a08ce 0x22697000 + 39118
6   CoreLocation                    0x226ef272 0x22697000 + 361074
7   CoreLocation                    0x226eb68c 0x22697000 + 345740
8   CoreLocation                    0x226eb55a 0x22697000 + 345434
9   CoreLocation                    0x226ece90 0x22697000 + 351888
10  libxpc.dylib                    0x1aea3914 _xpc_connection_call_event_handler + 40
11  libxpc.dylib                    0x1aea1dcc 

Thread 5 name:  com.apple.uikit.eventfetch-thread
Thread 5:
0   libsystem_kernel.dylib          0x1adb0900 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x1adb06e0 mach_msg + 44
2   CoreFoundation                  0x1b5b3be2 __CFRunLoopServiceMachPort + 144

所以它出现了分段错误。我 none 更聪明,因为这在任何地方都有效,但发布时除外! Apple 在上传到商店时会更改二进制文件吗?或者当二进制文件是从 iTunes 作为源而不是从其他任何地方执行时有什么不同。

如果有人想知道这是怎么回事,我现在已经解决了(这花了很长时间,因为我每次更改代码都必须等待批准才能在应用商店上发布)。

崩溃的原因是试图访问没有项目的数组。之所以只在 Apple Store 上发布时出现,是因为非法访问的代码部分只是为了测试用户是否有订阅而执行的。这是 从未执行过 当应用程序 运行 由我、beta 测试人员(使用 TestFlight)以及最可恶的是,Apple 评论员本身 - 似乎是他们自己的测试设备运行 与真正的 public 设备所处的环境不同。该代码仅在非测试设备上执行(即:当代码发布并由具有真实 Apple 帐户的 Apple 测试环境之外的设备下载时)。

如果 a) 小的代码更改不需要 2 到 3 天的周转时间(偶尔会无缘无故被 Apple 审阅者拒绝),我本来可以避免所有的麻烦,b) 实际上堆栈跟踪提供正确的信息(非法数组访问而不只是说它是一个 "bad access",它可以是任何东西),以及 c) 只有一种打印到控制台的方式而不是三种不同的方式,其中只有一种方式会实际提供调试在已发布的应用程序上输出。

我希望以上内容对以后 运行 解决此问题的任何人都有用。