【发布时间】:2017-11-27 06:34:08
【问题描述】:
我正在开发一个 cocoa pod 框架,其中包含几个 shell 脚本。安装 pod 后,用户应在应用的构建阶段添加以下内容 -> 运行脚本:
“${PODS_ROOT}/MyPod/MyPod/framework/MyPod.framework/scripts/build.sh”
在此之后构建工作正常并且应用程序运行。但是存档会产生问题。 XCode 给出错误提示:
iTunes Store Operation Failed
Invalid Signature. Code object is not signed at all. The file at path [SampleApp.app/Frameworks/MyPod.framework/scripts/build.sh] is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
我现在有两个担心:
- Xcode 不允许脚本成为存档的一部分?
- 如果是这样,那么如何从存档中删除这些脚本?是否有像 ${ARCHIVE_DIR} 这样的构建设置,我可以从中搜索最新的存档,然后删除脚本。或者,是否有一些构建设置,我可以在其中提及构建或归档时要忽略的文件?
另外,我已经尝试将这些文件添加到应用程序的构建设置中以“排除源文件名”。它不起作用,因为要执行的脚本不是应用程序的一部分,而是集成在应用程序中的框架的一部分。
另外,我的框架是在模拟器构建和设备构建上使用 lipo 生成的胖框架。这意味着该框架不会被代码签名。
【问题讨论】:
-
framework在push to store的时候不允许里面有仿真代码,你的framework是用脚本把仿真和设备arch结合起来的吗?
-
是的,我的框架是一个具有设备和模拟器架构的通用框架。
标签: ios xcode ios-frameworks