【发布时间】:2018-01-08 00:13:33
【问题描述】:
问题
是否可以使用开发证书和配置文件为 AppStore 导出/提供 IPA?
我可以进行实际的辞职,并且经过手动验证,一切似乎都很好,但是我在启动时尝试此操作的任何应用程序都崩溃了。我不想退出从 AppStore 下载的应用程序,这些是在我的计算机上构建的应用程序。
似乎也没有一种流行的工具能做到这一点。有没有人成功过,或者由于某种原因不可能?
调查结果
在设备日志中,我没有看到 App 进程本身报告的任何内容,因此操作系统必须在启动之前将其杀死。我确实看到了:
securityd[101] <Notice>: cert[0]: CheckLeafMarkerOid =(leaf)[]> 0
securityd[101] <Notice>: cert[0]: SubjectCommonName =(leaf)[]> 0
securityd[101] <Notice>: cert[0]: IssuerCommonName =(path)[]> 0
amfid(Security)[196] <Notice>: [leaf CheckLeafMarkerOid IssuerCommonName SubjectCommonName]
amfid(libmis.dylib)[196] <Info>: Blacklist does not exist.
amfid(libmis.dylib)[196] <Info>: Using empty blacklist.
amfid(libmis.dylib)[196] <Info>: CreateMISAuthListWithStream: open stream failed (may be non-existing)
amfid(libmis.dylib)[196] <Info>: CreateMISAuthListWithStream: creating empty auth list
assertiond[66] <Notice>: Unable to obtain a task name port right for pid 1683: (os/kern) failure (5)
SpringBoard(FrontBoard)[57] <Error>: Unable to register for exec notifications: No such process
SpringBoard(BaseBoard)[57] <Error>: Unable to get short BSD proc info for 1683: No such process
SpringBoard(BaseBoard)[57] <Error>: Unable to get proc info for 1683: No such process
SpringBoard(BaseBoard)[57] <Error>: Unable to obtain a task name port right for pid 1683: (os/kern) failure (0x5)
SpringBoard(BaseBoard)[57] <Error>: Unable to get short BSD proc info for 1683: No such process
SpringBoard(FrontBoard)[57] <Error>: Unable to obtain a process handle for <FBApplicationProcess: 0x10bc26cd0; com.company.product.name; pid: 1683>
这似乎表明权利存在问题。但是,当我从我安装的 IPA 手动打印它们 (/usr/libexec/PlistBuddy -x -c "print :Entitlements " /dev/stdin <<< $(security cms -D -i "$1"/embedded.mobileprovision) > entitlements.plist
) 时,我有:
<?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>application-identifier</key>
<string>TEAMID.*</string>
<key>com.apple.developer.default-data-protection</key>
<string>NSFileProtectionComplete</string>
<key>com.apple.developer.team-identifier</key>
<string>TEAMID</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>TEAMID.*</string>
</array>
</dict>
</plist>
这清楚地表明get-task-allow 权利是true。
工具
无论我尝试哪种工具,我都会得到相同的结果,例如
- https://dantheman827.github.io/ios-app-signer/
- https://github.com/nowsecure/node-applesign
- https://github.com/fastlane/fastlane/blob/master/sigh/lib/assets/resign.sh
类似问题
- can we resign the appstore build with our development certificates? 简单的否答案,似乎不正确,因为我能够在没有警告或错误的情况下执行实际的辞职操作。
- Resign iOS App from a distribution identity to a developer identity 展示如何验证和/或调整已辞职 IPA 中的最终权利。
- iOS resign IPA from appstore with developer profile 问题有点老,但其中一位评论者最终报告了相同的观察行为:“但它无法正常运行,它闪回。直到现在我都不知道它”。
更新 1
(对@Yoshkebab 的反应)
otool 的输出表明二进制文件未加密:
otool -l App/Payload/App.app/App | grep -A 4 -i encrypt:
cmd LC_ENCRYPTION_INFO
cmdsize 20
cryptoff 0
cryptsize 0
cryptid 0
--
cmd LC_ENCRYPTION_INFO_64
cmdsize 24
cryptoff 0
cryptsize 0
cryptid 0
但是,例如Hopper 无法反汇编... 有没有参考苹果在 Xcode 中应用加密?这是否表明他们在用户的系统上有一个密钥?此外,我没有看到可以表明这一点的构建步骤(代码设计只是添加签名,不是吗?)
Clutch 看不到我的应用程序,并且 Stefan Esser 的 dumpdecrypted 库无法工作,因为我怀疑应用程序立即崩溃(我的设置没问题,因为它适用于其他应用程序)。
【问题讨论】:
-
您仅使用 plistbuddy 打印配置文件中的权利,要在应用程序本身中查找权利,您需要使用
codesign -d --entitlements - [path to app binary] -
提供配置文件的权利是用于对二进制文件进行签名的权利,因此在签署后两者的输出将(应该)相同。
标签: ios xcode code-signing provisioning-profile entitlements