iOS应用程序打开后立即崩溃 [英] iOS App Crashing Instantly After Opening It

查看:721
本文介绍了iOS应用程序打开后立即崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在手机上测试我的iOS应用程序,当我尝试打开它时,它会立即退出。应用程序可在模拟器中构建和运行。有人知道是什么原因吗?

I am testing my iOS app on my phone and when I try opening it, it instantly exits. App builds and works in simulator. Does anyone know what could be the cause?

我已验证并检查了我的配置文件和证书都有效,并且都是有效的。什么都没有过期。

I verified and checked that my provisioning profile + certificates are all valid and they are. Nothing has expired.

我认为错误可能来自控制台日志中的这一步:

I believe the error may be coming from this step from the console logs:

error   13:45:10.855026 -0400   symptomsd   Can't get most elevated app state from dictionary {
    BKSApplicationStateExtensionKey = 0;
    SBApplicationStateDisplayIDKey = "com.capitalone.Jupiter";
    SBApplicationStateKey = 0;
    SBApplicationStateProcessIDKey = 991;
    SBApplicationStateRunningReasonsKey =     (
                {
            SBApplicationStateRunningReasonAssertionIdentifierKey = Resume;
            SBApplicationStateRunningReasonAssertionReasonKey = 10000;
        },
                {
            SBApplicationStateRunningReasonAssertionIdentifierKey = UIApplicationLaunch;
            SBApplicationStateRunningReasonAssertionReasonKey = 10000;
        }
    );
}

下面的完整日志。

这是来自xcode的日志:

Here are the logs from xcode:

default 13:45:10.348434 -0400   SpringBoard Bootstrapping com.My.Bundle.Id with intent foreground-interactive
default 13:45:10.348590 -0400   assertiond  Submitting new job for "com.My.Bundle.Id" on behalf of <BKProcess: 0x101c03a60; SpringBoard; com.apple.springboard; pid: 52; agency: SystemShell; visibility: foreground; task: running>
default 13:45:10.349683 -0400   assertiond  Submitted job with label: UIKitApplication:com.My.Bundle.Id[0xe595][62]
default 13:45:10.382109 -0400   SpringBoard [com.My.Bundle.Id] Bootstrap complete with label: UIKitApplication:com.My.Bundle.Id[0xe595][62]
default 13:45:10.382495 -0400   SpringBoard Adding: <FBApplicationProcess: 0x146b73c10; Jupiter (com.My.Bundle.Id); pid: 991>
default 13:45:10.384602 -0400   assertiond  Now tracking process <BKProcess: 0x101b07760; Jupiter; com.My.Bundle.Id; pid: 991; agency: Application; visibility: none; task: running; hostpid: 52> with host <BKProcess: 0x101c03a60; SpringBoard; com.apple.springboard; pid: 52; agency: SystemShell; visibility: foreground; task: running>
default 13:45:10.396434 -0400   mediaserverd    -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.My.Bundle.Id with pid '991' is now Foreground Running. Background entitlement: NO
default 13:45:10.401556 -0400   SpringBoard [com.My.Bundle.Id] Setting deactivation reasons to: 'systemAnimation' for reason: scene settings update - settings are eligible for deactivation reasons.
default 13:45:10.415638 -0400   SpringBoard Application process state changed for com.My.Bundle.Id: <SBApplicationProcessState: 0x28130de40; pid: 991; taskState: Running; visibility: Unknown>
default 13:45:10.433713 -0400   SpringBoard WIFI PICKER [com.My.Bundle.Id]: isProcessLaunch: 1,    isForegroundActivation: 1,     isForegroundDeactivation: 0
default 13:45:10.434940 -0400   symptomsd   991 com.My.Bundle.Id: ForegroundRunning (most elevated: ForegroundRunning)
default 13:45:10.435072 -0400   symptomsd   Entry, display name com.My.Bundle.Id uuid 5DF98506-8B88-381F-8E79-82FB0DA768FC pid 991 isFront 1
default 13:45:10.435420 -0400   symptomsd   Continue with bundle name com.My.Bundle.Id, is front 1
default 13:45:10.435464 -0400   symptomsd   com.My.Bundle.Id: Foreground: true
default 13:45:10.435746 -0400   symptomsd   Failed to find process for com.My.Bundle.Id
default 13:45:10.641383 -0400   SpringBoard [com.My.Bundle.Id] Setting deactivation reasons to: '(none)' for reason: updateAllScenesForBand - Assertion removed.
default 13:45:10.775095 -0400   backboardd  Connection added: IOHIDEventSystemConnection uuid:960FB53D-5C0A-47D5-8260-BB2E2A63D61B pid:991 process:Jupiter type:Passive entitlements:0x0 caller:BackBoardServices: <redacted> + 368 attributes:<CFBasicHash 0x10bd00b70 [0x102f00010]>{type = immutable dict, count = 3,
entries =>
    0 : <CFString 0x102b799f0 [0x20baeba30]>{contents = "pid"} = <CFNumber 0xc45bcab69880bc04 [0x20baeba30]>{value = +991, type = kCFNumberSInt64Type}
    1 : <CFString 0x102b48c20 [0x20baeba30]>{contents = "bundleID"} = <CFString 0x102b6c3f0 [0x20baeba30]>{contents = "com.My.Bundle.Id"}
    2 : <CFString 0x102b065e0 [0x20baeba30]>{contents = "HighFrequency"} = <CFBoolean 0x20baf1a10 [0x20baeba30]>{value = true}
}
 inactive:1
default 13:45:10.789855 -0400   backboardd  Connection removed: IOHIDEventSystemConnection uuid:960FB53D-5C0A-47D5-8260-BB2E2A63D61B pid:991 process:Jupiter type:Passive entitlements:0x0 caller:BackBoardServices: <redacted> + 368 attributes:<CFBasicHash 0x10bd00b70 [0x102f00010]>{type = immutable dict, count = 3,
entries =>
    0 : <CFString 0x102b799f0 [0x20baeba30]>{contents = "pid"} = <CFNumber 0xc45bcab69880bc04 [0x20baeba30]>{value = +991, type = kCFNumberSInt64Type}
    1 : <CFString 0x102b48c20 [0x20baeba30]>{contents = "bundleID"} = <CFString 0x102b6c3f0 [0x20baeba30]>{contents = "com.My.Bundle.Id"}
    2 : <CFString 0x102b065e0 [0x20baeba30]>{contents = "HighFrequency"} = <CFBoolean 0x20baf1a10 [0x20baeba30]>{value = true}
}
 inactive:0
default 13:45:10.791946 -0400   SpringBoard [com.My.Bundle.Id] Sending scene action [Logical Activate] through WorkspaceServer: 0x283139630
default 13:45:10.797970 -0400   SpringBoard [com.My.Bundle.Id] Sending scene action [SceneLifecycleEventOnly] through WorkspaceServer: 0x283139630
default 13:45:10.798522 -0400   SpringBoard [com.My.Bundle.Id] Sending scene action [SceneLifecycleEventOnly] through WorkspaceServer: 0x283139630
default 13:45:10.800563 -0400   SpringBoard Application process state changed for com.My.Bundle.Id: <SBApplicationProcessState: 0x281252bc0; pid: 991; taskState: Not Running; visibility: Unknown>
default 13:45:10.803944 -0400   SpringBoard Application process state changed for com.My.Bundle.Id: <SBApplicationProcessState: 0x2812536a0; pid: 991; taskState: Running; visibility: Foreground>
default 13:45:10.807589 -0400   backboardd  [BKEventFocusManager] Setting foreground application to: com.My.Bundle.Id (991)
default 13:45:10.854839 -0400   SpringBoard WIFI PICKER [com.My.Bundle.Id]: isProcessLaunch: 0,    isForegroundActivation: 0,     isForegroundDeactivation: 1
error   13:45:10.855026 -0400   symptomsd   Can't get most elevated app state from dictionary {
    BKSApplicationStateExtensionKey = 0;
    SBApplicationStateDisplayIDKey = "com.My.Bundle.Id";
    SBApplicationStateKey = 0;
    SBApplicationStateProcessIDKey = 991;
    SBApplicationStateRunningReasonsKey =     (
                {
            SBApplicationStateRunningReasonAssertionIdentifierKey = Resume;
            SBApplicationStateRunningReasonAssertionReasonKey = 10000;
        },
                {
            SBApplicationStateRunningReasonAssertionIdentifierKey = UIApplicationLaunch;
            SBApplicationStateRunningReasonAssertionReasonKey = 10000;
        }
    );
}
default 13:45:10.855086 -0400   symptomsd   991 com.My.Bundle.Id: Unknown (most elevated: Unknown)
default 13:45:10.855150 -0400   symptomsd   Entry, display name com.My.Bundle.Id uuid (null) pid 991 isFront 0
default 13:45:10.855393 -0400   symptomsd   Continue with bundle name com.My.Bundle.Id, is front 0
default 13:45:10.855456 -0400   symptomsd   com.My.Bundle.Id: Foreground: false
default 13:45:10.855519 -0400   symptomsd   Failed to find process for com.My.Bundle.Id
default 13:45:10.970118 -0400   SpringBoard Front display did change: <SBApplication: 0x282df9a40; com.My.Bundle.Id>
default 13:45:10.995763 -0400   SpringBoard [com.My.Bundle.Id] Will update scene - foregroundness changed to: Background
default 13:45:11.999866 -0400   assertiond  [SpringBoard:52] Attempting to acquire assertion for Jupiter:991: <BKProcessAssertion: 0x100d12ba0; "FBSceneSnapshotAction:com.My.Bundle.Id" (finishTask:180s); id:…FE83F1033A36>
default 13:45:11.000082 -0400   assertiond  [Jupiter:991] Add assertion: <BKProcessAssertion: 0x100d12ba0; id: 52-341DA9E7-EC57-4850-8882-FE83F1033A36; name: FBSceneSnapshotAction:com.My.Bundle.Id; state: active; reason: finishTask; duration: 180.0s> {
    owner = <BSProcessHandle: 0x101a0a550; SpringBoard:52; valid: YES>;
    flags = preventSuspend, preventThrottleDownUI, preventThrottleDownCPU, preventIdleSleep, preventSuspendOnSleep;
}
default 13:45:11.000215 -0400   assertiond  [Jupiter:991] Activate assertion: <BKProcessAssertion: 0x100d12ba0; "FBSceneSnapshotAction:com.My.Bundle.Id" (finishTask:180s); id:…FE83F1033A36>
default 13:45:11.015843 -0400   powerd  Process assertiond.62 Created SystemIsActive "Jupiter:991:52-341DA9E7-EC57-4850-8882-FE83F1033A36 [FBSceneSnapshotAction:com.My.Bundle.Id] [0x100d12ba0]" age:00:00:00  id:51539642211 [System: SysAct]
default 13:45:11.187081 -0400   assertiond  Server invalidated <BKProcessAssertion: 0x100d12ba0; "FBSceneSnapshotAction:com.My.Bundle.Id" (finishTask:180s); id:…FE83F1033A36>
default 13:45:11.187457 -0400   assertiond  Client relinquished <BKProcessAssertion: 0x100d12ba0; "FBSceneSnapshotAction:com.My.Bundle.Id" (finishTask:180s); id:…FE83F1033A36>
default 13:45:11.187934 -0400   assertiond  Process exited: <BKProcess: 0x101b07760; Jupiter; com.My.Bundle.Id; pid: 991; agency: Application; visibility: none; task: none; hostpid: 52>
default 13:45:11.188564 -0400   powerd  Process assertiond.62 Released SystemIsActive "Jupiter:991:52-341DA9E7-EC57-4850-8882-FE83F1033A36 [FBSceneSnapshotAction:com.My.Bundle.Id] [0x100d12ba0]" age:00:00:00  id:51539642211 [System: SysAct]
default 13:45:11.355578 -0400   SpringBoard <FBApplicationProcess: 0x146b73c10; Jupiter (com.My.Bundle.Id); pid: 991> assertiond says the process actually exited with context: <BKSProcessExitContext: 0x2810cbfc0; reason: crash>
default 13:45:11.356682 -0400   SpringBoard <FBApplicationProcess: 0x146b73c10; Jupiter (com.My.Bundle.Id); pid: 991> crashed.
default 13:45:11.357390 -0400   SpringBoard Removing: <FBApplicationProcess: 0x146b73c10; Jupiter (com.My.Bundle.Id); pid: 991>
default 13:45:11.358054 -0400   SpringBoard Process exited: <FBApplicationProcess: 0x146b73c10; Jupiter (com.My.Bundle.Id); pid: -1> -> <FBApplicationProcessExitContext: 0x281cffbd0; exitReason: crash; terminationReason: (none)> {
    stateAtExit = <FBProcessState: 0x281307fe0; pid: 991; taskState: Not Running; visibility: Unknown>;
}
default 13:45:11.359464 -0400   SpringBoard Application process state changed for com.My.Bundle.Id: (null)
default 13:45:11.375592 -0400   assertiond  Deleted job with label: UIKitApplication:com.My.Bundle.Id[0xe595][62]
default 13:45:11.375852 -0400   assertiond  [Jupiter:991] Deleted launchd job with label: UIKitApplication:com.My.Bundle.Id[0xe595][62]
default 13:45:11.377370 -0400   assertiond  Checking for deferred bootstrap request for com.My.Bundle.Id
default 13:45:11.394094 -0400   mediaserverd    -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.My.Bundle.Id with pid '991' is now Terminated. Background entitlement: NO
default 13:45:11.395671 -0400   SpringBoard WIFI PICKER [com.My.Bundle.Id]: isProcessLaunch: 0,    isForegroundActivation: 0,     isForegroundDeactivation: 0
default 13:45:11.397915 -0400   symptomsd   991 com.My.Bundle.Id: Terminated (most elevated: Terminated)
default 13:45:11.398135 -0400   symptomsd   Entry, display name com.My.Bundle.Id uuid (null) pid 991 isFront 0


推荐答案

如果使用的是开发者资料。

If you are using a developer profile.

似乎您尝试在设备上运行的包ID和配置文件存在问题。分发配置文件仍然是有效的配置文件,但是它将启动该应用程序。并立即将其关闭。

it seems some issue with bundle id and profile you are trying to run on device. A distribution profile is still a valid profile but it would launch the app. and close it out immediately.

  default 13:45:10.855519 -0400   symptomsd   Failed to find process for com.My.Bundle.Id

1)转到目标->构建设置->代码签名身份。确保将其设置为Developer。

1) Go to Target -> Build Settings -> Code Signing Identity. Make sure it's set to Developer.

2)将代码签名样式更改为手动(建议您执行此步骤,以确保您手动指定要在其中使用的正确配置文件) 。您可以保持自动状态,并且应该为您的捆绑软件ID选择配置文件)

2) Change code signing Style to Manual (I recommend this step so as to make sure you manually specify the correct profile to be used in. You can keep automatic and it should select the profile for your bundle id)

3)转到目标->常规。手动选择正确的个人资料。然后清理并运行。

3) Go to Target -> General. Manually select your right profile. Clean and Run after that.

这篇关于iOS应用程序打开后立即崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆