gpt4 book ai didi

ios - 无法使用嵌入到我的项目中的 ios-charts 库分发内部构建

转载 作者:搜寻专家 更新时间:2023-10-31 23:01:44 24 4
gpt4 key购买 nike

首先,我要感谢您创建这个库。我通过将其拖入项目、将其嵌入二进制文件等方式将其嵌入到我的项目中(如 README 文件中所写)。目标 iOS 版本为 8.0。

对于应用程序的开发版本来说,一切都很好,但是一旦我构建了内部版本,应用程序就会在初始欢迎屏幕显示后崩溃。崩溃日志如下:

Oct 20 15:54:15 iPhone SpringBoard[54] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Oct 20 15:54:15 iPhone SpringBoard[54] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Oct 20 15:54:15 iPhone kernel[0] <Notice>: xpcproxy[700] Container: /private/var/mobile/Containers/Data/Application/6D451583-EE0E-4F0A-9CA9-2E33F83D6138 (sandbox)
Oct 20 15:54:15 iPhone kernel[0] <Notice>: AMFI: energy_challenge(pid 700) - [deny-mmap] mapped executable file has no team identifier in its signature: /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts
Oct 20 15:54:15 iPhone com.apple.xpc.launchd[1] (UIKitApplication:com.edge5.nativeMenuEnergieInhouse[0x1f2e][700]) <Notice>: Service exited due to signal: Trace/BPT trap: 5
Oct 20 15:54:15 iPhone assertiond[63] <Warning>: Unable to obtain a task name port right for pid 700: (os/kern) failure (5)
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Unable to register for exec notifications: No such process
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Unable to obtain a task name port right for pid 700: (os/kern) failure (5)
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Unable to obtain a task name port right for <FBApplicationProcess: 0x13226dc00; com.edge5.nativeMenuEnergieInhouse; pid: 700>
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Application 'UIKitApplication:com.edge5.nativeMenuEnergieInhouse[0x1f2e]' crashed.
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Application '(null)' exited for an unknown reason.
Oct 20 15:54:15 iPhone ReportCrash[701] <Notice>: Formulating report for corpse[700] energy_challenge
Oct 20 15:54:15 iPhone ReportCrash[701] <Warning>: report not saved because the limit of 25 for 109_energy_challenge logs has been reached.
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Notice: This report is abbreviated for syslog inclusion because it could not be saved to disk.
Symbolication may be possible by manually cleaning up and including the Binary Image section of a full report from this same device -- good luck!
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Process: energy_challenge [700]
Path: /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/energy_challenge
OS Version: iOS 9.0.2 (13A452)
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000120095088
Triggered by Thread: 0
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Dyld Error Message:
Dyld Message: Library not loaded: @rpath/Charts.framework/Charts
Referenced from: /var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/energy_challenge
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts'
Dyld Version: 369.12
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.241745]: Enable WoW requested by "apsd"
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.243839]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244041]: Unable to dispatch WowStateChanged message to client MobileMail (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244185]: Unable to dispatch WowStateChanged message to client softwareupdatese (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244422]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244678]: Unable to dispatch WowStateChanged message to client assistantd (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.245010]: Unable to dispatch WowStateChanged message to client itunesstored (268435460)

问题出现在这里:

[deny-mmap] mapped executable file has no team identifier in its signature: /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts

我尝试创建新证书、新的内部构建,基本上解决了所有关于这个或类似问题的 stackoverflow 问题(例如 https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/),但没有成功。是否有可能您需要更改您这边与证书相关的内容?

非常感谢您的回答

最佳答案

我在 Google 上搜索“[deny-mmap] 映射的可执行文件在其签名中没有团队标识符”时看到了这篇文章。

事实证明,旧的 Apple WWDR 证书已于 2016 年 2 月 14 日过期。如果您的 OSX 在钥匙串(keychain)访问中仍有该过期证书,则您的分发证书将被视为无效。 (红线显示“此证书的颁发者无效”)您可以在钥匙串(keychain)访问中强制“信任”该证书,但副作用是签名的二进制文件的签名中不会包含 TeamIdentifier:

$ codesign -d -vv MyApp.app
Executable=/Users/admin/MyApp.app/MyApp
Identifier=info.eddywong.MyApp
Format=bundle with Mach-O universal (armv7 arm64)
CodeDirectory v=20100 size=1920 flags=0x0(none) hashes=87+5 location=embedded
Signature size=4389
Authority=iPhone Distribution: Eddy Wong Limited (KG7UETNRCJ)
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Signed Time=15 Mar 2016 23:59:38
Info.plist entries=33
TeamIdentifier=not set
Sealed Resources version=2 rules=12 files=108

所以我不得不遵循 https://stackoverflow.com/a/35400712 中发布的解决方案- 删除“系统”钥匙串(keychain)中旧的、过期的 WWDR 证书。

然后,我清理并重新存档,然后导出 IPA。这次成功了!

“应用程序的开发版本一切正常”的原因是应用程序的开发版本是由您自己的开发人员证书签署的,而不是您组织的分发证书。不过,我不明白为什么开发人员证书不受 WWDR 到期的影响。但是我可以验证 dev 签名的二进制文件确实设置了 TeamIdentifier,而 dist 签名的二进制文件没有。

关于ios - 无法使用嵌入到我的项目中的 ios-charts 库分发内部构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33252681/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com