企业(内部)Swift 应用程序在 iOS9 上启动时退出

Posted

技术标签:

【中文标题】企业(内部)Swift 应用程序在 iOS9 上启动时退出【英文标题】:Enterprise (in-house) Swift application quits on launch on iOS9 【发布时间】:2015-12-21 06:23:29 【问题描述】:

我们发现我们的内部证书签名的 Swift 应用程序无法在 ios9 上运行,而它在 iOS8 上正常工作。我们在设置 -> 常规 -> 配置文件上信任开发者,但是当我们尝试启动应用程序时,它会卡在启动屏幕上然后退出。

我们从日志中没有任何线索。它只告诉它在 20.00 秒后启动失败。

我怀疑这是与签名有关的问题。因为当我用 AdHoc 证书签署应用程序时,它在 iOS9 上运行是没有问题的。

没有人知道发生了什么吗?


似乎与这些问题有关

Ad-Hoc distributed application failed to launch in time https://devforums.apple.com/thread/266111
**Device Logs**

Incident Identifier: B4564227-5CC9-447B-9A52-BEC5EB36EE44
CrashReporter Key:   9ec38d809cfa493300f95e440530ad11ac05e5d7
Hardware Model:      iPad4,1
Process:             xxxxxxx xxxxxxxx [2345]
Path:                /var/mobile/Containers/Bundle/Application/02F4CDFC-83E8-4474-9314-4848354A8FC0/xxxxxxx xxxxxxx.app/xxxxxx xxxxxxx
Identifier:          com.xxxxx.xxxxx.xxxxxxx
Version:             5097 (4.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2015-09-23 10:19:41.41 +0200
Launch Time:         2015-09-23 10:19:16.16 +0200
OS Version:          iOS 9.0 (13A344)
Report Version:      105

Exception Type:  00000020
Exception Codes: 0x000000008badf00d
Exception Note:  SIMULATED (this is NOT a crash)
Highlighted by Thread:  0

Application Specific Information:
com.xxxxxxx.enterprise.xxxxxxx failed to launch after 20.00s (launchIntent: foreground-interactive)

Elapsed total CPU time (seconds): 22.260 (user 22.260, system 0.000), 56% CPU 
Elapsed application CPU time (seconds): 0.002, 0% CPU

Filtered syslog:
None found

Thread 0:
0   dyld                            0x0000000120054490 __fcntl + 8
1   dyld                            0x0000000120053e94 fcntl + 128
2   dyld                            0x0000000120042cec ImageLoaderMachO::loadCodeSignature(linkedit_data_command const*, int, unsigned long long, ImageLoader::LinkContext const&) + 68
3   dyld                            0x0000000120045dd0 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 228
4   dyld                            0x0000000120041ccc ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 268
5   dyld                            0x0000000120033800 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 396
6   dyld                            0x0000000120037d6c dyld::loadPhase5stat(char const*, dyld::LoadContext const&, stat*, int*, bool*, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 172
7   dyld                            0x0000000120037c38 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 736
8   dyld                            0x0000000120037928 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 192
9   dyld                            0x00000001200373e0 dyld::loadPhase3(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 696
10  dyld                            0x0000000120036edc dyld::loadPhase1(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 160
11  dyld                            0x0000000120033314 dyld::loadPhase0(char const*, char const*, dyld::LoadContext const&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 236
12  dyld                            0x0000000120032fdc dyld::load(char const*, dyld::LoadContext const&) + 160
13  dyld                            0x0000000120037ecc dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*) + 52
14  dyld                            0x000000012003fd34 ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&, char const*) + 332
15  dyld                            0x000000012003f1d8 ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, bool, ImageLoader::RPathChain const&) + 124
16  dyld                            0x0000000120034c44 dyld::link(ImageLoader*, bool, bool, ImageLoader::RPathChain const&) + 176
17  dyld                            0x0000000120035b64 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 2408
18  dyld                            0x0000000120031044 _dyld_start + 68

没有可用的线程状态(寄存器信息)

二进制图像:

0x1000d8000 - 0x100543fff xxxxxxxx xxxxxxxxx arm64  <411a29d1e9843b17802cda346d9d7d5f> /var/mobile/Containers/Bundle/Application/02F4CDFC-83E8-4474-9314-4848354A8FC0/xxxxxx xxxxxxx.app/xxxxxxxx xxxxxxxx
0x100750000 - 0x100963fff libswiftCore.dylib arm64  <1c8fc0a4195f3207ac97389aafa69c65> /var/mobile/Containers/Bundle/Application/02F4CDFC-83E8-4474-9314-4848354A8FC0/xxxxx xxxxxx.app/Frameworks/libswiftCore.dylib
0x1014d0000 - 0x1014d7fff libswiftCoreData.dylib arm64  <b751a5bac05c3293aa1c6b01d78d6bf7> /var/mobile/Containers/Bundle/Application/02F4CDFC-83E8-4474-9314-4848354A8FC0/xxxxxxxxx xxxxxxx.app/Frameworks/libswiftCoreData.dylib
0x120030000 - 0x12005bfff dyld arm64  <1b945967d665331dbf2600249e46660a> /usr/lib/dyld

这些是我们启动应用程序时的实时日志

Sep 24 10:23:22 iPad SpringBoard[53] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Sep 24 10:23:25 iPad SpringBoard[53] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Sep 24 10:23:26 iPad amfid[1091] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Sep 24 10:23:39 iPad kernel[0] <Notice>: xpcproxy[1186] Container: /private/var/mobile/Containers/Data/Application/02AF80DC-26F3-4AAE-AD90-A4F148E574AE (sandbox)
Sep 24 10:23:39 iPad amfid[1091] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Sep 24 10:23:39 iPad SpringBoard[53] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Sep 24 10:23:39 iPad SpringBoard[53] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Sep 24 10:23:39 iPad SpringBoard[53] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Sep 24 10:23:39 iPad SpringBoard[53] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Sep 24 10:23:39 iPad SpringBoard[53] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Sep 24 10:23:39 iPad SpringBoard[53] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Sep 24 10:23:52 iPad syncdefaultsd[1127] <Notice>: (Note ) marked "com.me.keyvalueservice" topic as "enabled" on <APSConnection: 0x15d50e780>
Sep 24 10:23:53 iPad amfid[1091] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Sep 24 10:23:58 iPad amfid[1091] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Sep 24 10:23:59 iPad SpringBoard[53] <Warning>: Forcing crash report of <FBApplicationProcess: 0x128ef74e0; Schneider Elect; pid: 1186> (reason: 1, description: com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx failed to launch after 20.00s (launchIntent: foreground-interactive))
Sep 24 10:23:59 iPad kernel[0] <Notice>: int _validateCodeDirectoryHashInDaemon(const char *, off_t, uint8_t *, int, int *): verify_code_directory returned 0x10004005
Sep 24 10:23:59 iPad SpringBoard[53] <Warning>: Finished crash reporting.
Sep 24 10:23:59 iPad com.apple.xpc.launchd[1] (UIKitApplication:com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx[0x9388][1186]) <Notice>: Service exited due to signal: Killed: 9
Sep 24 10:23:59 iPad ReportCrash[1187] <Warning>: saved type '109_Schneider Electric' report (2 of max 25) as /var/mobile/Library/Logs/CrashReporter/Schneider Electric_2015-09-24-102359_iPad.ips
Sep 24 10:23:59 iPad SpringBoard[53] <Warning>: Application 'UIKitApplication:com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx[0x9388]' exited abnormally via signal.
Sep 24 10:24:00 iPad searchd[156] <Warning>: ====^^^^ DuetExpert missing requested data, people:0 applicationDeepLinks:1 applications:0 requests:36 missingAllDataRequests:0
Sep 24 10:24:04 iPad amfid[1091] <Error>: mig_source_handler: dispatch_mig_server returned 268435459

当我们从 HockeyApp 安装应用程序时,我们有以下日志

Sep 24 10:26:03 iPad itunesstored[103] <Warning>: [Download]: Adding download(s): -7184518095014445338
Sep 24 10:26:03 iPad itunesstored[103] <Warning>: LaunchServices: installing placeholder for <LSApplicationProxy: 0x14e0a5530> com.xxxxxxx.enterprise.xxxxxxx <(null) *Not found in database*>
Sep 24 10:26:03 iPad installd[46] <Notice>: 0x16e12f000 -[MIClientConnection installPath:withOptions:completion:]: Install of "/var/mobile/Library/Caches/com.apple.itunesstored/AppPlaceholders/-xxxxxxxxxx.app" type Placeholder requested by itunesstored (pid 103)
Sep 24 10:26:03 iPad installd[46] <Notice>: 0x16e087000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx; Version=5106, ShortVersion=(null)>
Sep 24 10:26:03 iPad installd[46] <Notice>: 0x16e087000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx at /private/var/mobile/Containers/Data/Application/28FBA6E7-DCD8-49B2-BA05-EFD951531A64
Sep 24 10:26:03 iPad installd[46] <Notice>: 0x16e087000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx at /private/var/mobile/Containers/Bundle/Application/6631F035-AF52-41CB-8299-7E781971C65E
Sep 24 10:26:03 iPad installd[46] <Notice>: 0x16e087000 -[MIInstaller performInstallationWithError:]: Install Successful; Staging: 0.00s; Waiting: 0.00s; Preflight/Patch: 0.00s, Verifying: 0.00s; Overall: 0.09s
Sep 24 10:26:03 iPad itunesstored[103] <Warning>: LaunchServices: Creating installProgressForApplication:<LSApplicationProxy: 0x14e0b0aa0> com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/6631F035-AF52-41CB-8299-7E781971C65E/-7184518095014445338.app> withPhase:3
Sep 24 10:26:03 iPad itunesstored[103] <Warning>: LaunchServices: installPhaseFinishedForProgress: com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx.InstallingPlaceholder - <NSProgress: 0x14ce3cb20> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 100   called, removing progress from cache
Sep 24 10:26:03 iPad ondemandd[180] <Error>: Application with ID: com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx was installed, but it doesn't appear to have a bundle URL, we are taking no action on this.
Sep 24 10:26:03 iPad itunesstored[103] <Warning>: [Download]: Starting task: 7 with priority: 300 for download: -xxxxxxxxxxxxx bundleIdentifier: com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx in session: com.apple.itunesstored.default
Sep 24 10:26:03 iPad itunesstored[103] <Warning>: LaunchServices: updating placeholder for <LSApplicationProxy: 0x14e030650> com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/6631F035-AF52-41CB-8299-7E781971C65E/-7184518095014445338.app> with icons
Sep 24 10:26:03 iPad installd[46] <Notice>: 0x16e087000 -[MIClientConnection installPath:withOptions:completion:]: Install of "/var/mobile/Library/Caches/com.apple.itunesstored/AppPlaceholders/-7184518095014445338.app" type Placeholder requested by itunesstored (pid 103)
Sep 24 10:26:03 iPad installd[46] <Notice>: 0x16e1bb000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx; Version=5106, ShortVersion=(null)>
Sep 24 10:26:04 iPad installd[46] <Notice>: 0x16e1bb000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx is now at /private/var/mobile/Containers/Data/Application/9D5532A1-DAA6-432D-9F94-7A238714CC81
Sep 24 10:26:04 iPad installd[46] <Notice>: 0x16e1bb000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx at /private/var/mobile/Containers/Bundle/Application/0E91022C-B4DB-42E2-9BC5-50683613AA1E
Sep 24 10:26:04 iPad installd[46] <Notice>: 0x16e1bb000 -[MIInstaller performInstallationWithError:]: Install Successful; Staging: 0.00s; Waiting: 0.00s; Preflight/Patch: 0.00s, Verifying: 0.01s; Overall: 0.16s
Sep 24 10:26:04 iPad ondemandd[180] <Error>: Application with ID: com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx was installed, but it doesn't appear to have a bundle URL, we are taking no action on this.
Sep 24 10:26:04 iPad itunesstored[103] <Warning>: LaunchServices: Creating installProgressForApplication:<LSApplicationProxy: 0x14e04c7f0> com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/0E91022C-B4DB-42E2-9BC5-50683613AA1E/-7184518095014445338.app> withPhase:0
Sep 24 10:26:04 iPad lsd[80] <Warning>: LaunchServices: Updating installPhase for parent <NSProgress: 0x14dd52860> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 100   to 0
Sep 24 10:26:04 iPad lockdownd[66] <Error>: CFStringGetCString error in locklog
Sep 24 10:26:08 iPad kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 1600 mA (measured 1164 mA)
Sep 24 10:26:08 iPad kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 1500 mA (measured 1160 mA)
Sep 24 10:26:08 iPad kernel[0] <Notice>: AppleARMPMUCharger: limiting USB input current to 1400 mA (measured 1141 mA)
Sep 24 10:26:17 iPad itunesstored[103] <Warning>: [Download]: Download task did finish: 7 for download: -7184518095014445338
Sep 24 10:26:17 iPad itunesstored[103] <Warning>: [ApplicationWorkspace] Installing download: -7184518095014445338 with step(s): Install
Sep 24 10:26:17 iPad itunesstored[103] <Warning>: [ApplicationWorkspace]: Installing software package with bundleID: com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx: bundleVersion: 5106 path: /var/mobile/Media/Downloads/-7184518095014445338/2540926088173953799
Sep 24 10:26:17 iPad itunesstored[103] <Warning>: [ApplicationWorkspace]: Bundle validated for bundleIdentifier: com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx success: 1
Sep 24 10:26:17 iPad itunesstored[103] <Warning>: LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x14e06bf60> com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/0E91022C-B4DB-42E2-9BC5-50683613AA1E/-7184518095014445338.app>
Sep 24 10:26:17 iPad itunesstored[103] <Warning>: LaunchServices: Creating installProgressForApplication:<LSApplicationProxy: 0x14e06bf60> com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/0E91022C-B4DB-42E2-9BC5-50683613AA1E/-7184518095014445338.app> withPhase:1
Sep 24 10:26:17 iPad lsd[80] <Warning>: LaunchServices: Updating installPhase for parent <NSProgress: 0x14dd52860> : Parent: 0x0 / Fraction completed: 0.5800 / Completed: 58 of 100   to 1
Sep 24 10:26:17 iPad installd[46] <Notice>: 0x16e087000 -[MIClientConnection installPath:withOptions:completion:]: Install of "/var/mobile/Media/Downloads/-7184518095014445338/2540926088173953799" type Customer requested by itunesstored (pid 103)
Sep 24 10:26:20 iPad installd[46] <Notice>: 0x16e1bb000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx; Version=5106, ShortVersion=4.0>
Sep 24 10:26:20 iPad installd[46] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Sep 24 10:26:20 iPad profiled[132] <Notice>: (Note ) MC: Provisioning profiles changed
Sep 24 10:26:20 iPad profiled[132] <Notice>: (Note ) MC: Updating MIS trust...
Sep 24 10:26:29 iPad online-auth-agent[313] <Error>:  SecTrustEvaluate  [leaf AnchorTrusted]
Sep 24 10:26:29 iPad installd[46] <Notice>: 0x16e1bb000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.xxxxxxx.enterprise.xxxxxxxx is now at /private/var/mobile/Containers/Data/Application/CCFF5229-5605-474A-8C2C-5DFA0CA7570C
Sep 24 10:26:29 iPad installd[46] <Notice>: 0x16e1bb000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx at /private/var/mobile/Containers/Bundle/Application/552B30AE-9DD1-4125-8262-3C4A85F2A174
Sep 24 10:26:29 iPad installd[46] <Notice>: 0x16e1bb000 -[MIInstaller performInstallationWithError:]: Install Successful; Staging: 2.71s; Waiting: 0.00s; Preflight/Patch: 0.02s, Verifying: 9.36s; Overall: 12.21s
Sep 24 10:26:29 iPad lsd[80] <Warning>: LaunchServices: Updating identifier store
Sep 24 10:26:29 iPad itunesstored[103] <Warning>: LaunchServices: installPhaseFinishedForProgress: com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx.Installing - <NSProgress: 0x14e083bd0> : Parent: 0x0 / Fraction completed: 1.0000 / Completed: 100 of 100   called, removing progress from cache
Sep 24 10:26:29 iPad lsd[80] <Warning>: LaunchServices: installation ended for app com.xxxxxxxxx.enterprise.xxxxxxxxxxx
Sep 24 10:26:29 iPad itunesstored[103] <Warning>: [ApplicationWorkspace] Install complete for download: -7184518095014445338 result: Success
Sep 24 10:26:29 iPad itunesstored[103] <Warning>: [ApplicationWorkspace]: Updating placeholder for download: -7184518095014445338 bundleIdentifier: com.xxxxxxxx.enterprise.xxxxxxxxxxxxxx
Sep 24 10:26:29 iPad itunesstored[103] <Warning>: LaunchServices: installPhaseFinishedForProgress: com.xxxxxxxxx.enterprise.xxxxxxxxxx.Loading - <NSProgress: 0x14e0bdb30> : Parent: 0x0 / Fraction completed: 1.0000 / Completed: 1 of 1   called, removing progress from cache
Sep 24 10:26:29 iPad lsd[80] <Warning>: LSInstallProgress: In observeValueForKeyPath:fractionCompleted could not find parent progress for com.xxxxxxxxxx.enterprise.xxxxxxxxxxx, it may have been removed
Sep 24 10:26:29 iPad lsd[80] <Warning>: LSInstallProgress: In observeValueForKeyPath:fractionCompleted could not find parent progress for com.xxxxxxxxxx.enterprise.xxxxxxxxxxx, it may have been removed
Sep 24 10:26:29 iPad lsd[80] <Warning>: LSInstallProgress: In observeValueForKeyPath:userInfo.installState could not find parent progress for com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx, it may have been removed
Sep 24 10:26:29 iPad lsd[80] <Warning>: LSInstallProgress: In observeValueForKeyPath:fractionCompleted could not find parent progress for com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx, it may have been removed
Sep 24 10:26:29 iPad lsd[80] <Warning>: LSInstallProgress: In observeValueForKeyPath:userInfo.installState could not find parent progress for com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx, it may have been removed
Sep 24 10:26:29 iPad lsd[80] <Warning>: LSInstallProgress: In observeValueForKeyPath:fractionCompleted could not find parent progress for com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx, it may have been removed
Sep 24 10:26:29 iPad itunesstored[103] <Warning>: [ApplicationWorkspace]: Placeholder updated for download: -7184518095014445338 bundleIdentifier: com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx success: 1
Sep 24 10:26:29 iPad SpringBoard[53] <Warning>: Installed apps did change.
    Added: (
        "com.xxxxxxxxxxx.enterprise.xxxxxxxxxxxxxx"
    )
    Removed: (
    )
    Modified: (
    )
Sep 24 10:26:31 iPad lockdownd[66] <Error>: CFStringGetCString error in locklog
Sep 24 10:26:31 iPad lockdownd[66] <Error>: CFStringGetCString error in locklog
Sep 24 10:26:31 iPad mobile_assertion_agent[145] <Notice>: service_one_connection: Connection closed for client iTunes.
Sep 24 10:26:37 iPad SpringBoard[53] <Warning>: HW kbd: Failed to set (null) as keyboard focus

【问题讨论】:

你迁移到 Xcode7 a.e.斯威夫特 2? 是的,我使用的是 Xcode 7 和 Swift 2 语法 这告诉你 iOS 试图启动你的应用,但你的应用没有响应。 20 秒后,iOS 放弃了。您的应用程序中的某些内容在启动时会阻止执行,但您需要查看源代码以找出原因。 如果我的源代码中的某些东西阻止了应用程序,如何解释adhoc证书签名的版本在iPad上的iOS9上运行良好? 我不知道。你可以争辩说它应该可以工作,或者你可以尝试在 Xcode 中调试应用程序,看看发生了什么。 【参考方案1】:

我尝试按照接受的答案的建议删除配置文件,但没有!

我的应用运行了几个小时,然后突然停止运行,出现问题中描述的相同问题。

解决方案是打开 Keychain Access 并使用我的开发人员姓名搜索证书 - 果然,有一个旧证书已过期,并且由于某种原因它正在被提取以进行签名。在我删除了过期的证书并重新启动了我的开发环境后,应用程序再次开始工作。

【讨论】:

【参考方案2】:

@shinichi 的回答是正确的。但是,我需要删除所有企业配置文件并对设备进行硬重置。之后就没有问题了。

注意:如果您有许多 EP 配置文件,您可以通过按下键盘上的 UP 按钮并将鼠标放在 Xcode 中的“-”按钮上并单击并按下来更快地删除它们。我知道这是一个愚蠢的解决方案,但我有大约 100 个 EP 配置文件,用鼠标单击删除它们会让我发疯。

希望 Apple 解决这个问题。

【讨论】:

对不起。它说我在 2016 年 3 月 8 日投了反对票。我不是故意的……而且我无法撤消它,因为它已经太久了。 :(【参考方案3】:

Xcode 7:Xcode - >设备 -> ctrl+单击您的设备 -> 显示配置文件。

【讨论】:

如果这是一个答案,它听起来不像是一个非常高质量的答案。请尝试通过对答案和解决方案的解释来使答案对社区有价值,至少在解决方案中解释不明显的情况下。【参考方案4】:

我通过清除设备上的配置文件解决了这个问题。 转到您的 Xocde -> 设备 -> 齿轮图标 -> 显示配置文件并逐个删除它们,直到您将它们全部删除。

我不知道 iOS 9 对企业签名应用程序做了什么,但它似乎试图验证某些东西(通过检查您的所有配置文件)并且在首次启动时失败了很多。 App Store 版本不应发生这种情况。

希望对您有所帮助。

【讨论】:

谢谢,这解决了我的问题。就我而言,我已经使用该设备进行了很长时间的开发。因此,在此设备上安装(同步)了大量(500 多个)临时、开发、内部配置文件。不幸的是,我不能批量删除它们,只能一个一个地删除。最终,我创建了一个 Automator 工作流程以在几个小时内完成删除:) 哇。应用程序现在运行得更快。我手动删除了一百个配置文件 - 一个一个地单击,而无需等待完成并按下退格键。该过程需要几分钟) 是的!我花了 2 天时间尝试不同的方法来让我的应用程序正常启动!很高兴它有帮助! 您可以使用 Apple Configurator 更快地删除它 救命稻草,@shinichi !我为此发疯了:P

以上是关于企业(内部)Swift 应用程序在 iOS9 上启动时退出的主要内容,如果未能解决你的问题,请参考以下文章

企业 IPA 文件(内部)的最大限制?

无法移动键盘视图iOS9 swift

BLE iOS9 的 Swift 后台模式

状态栏样式不会因单个视图而改变 - Swift 2/iOS9

iOS9中,swift判断相机,相册权限,选取图片为头像

swift 2 解析facebookSDK ios9