【发布时间】:2015-07-10 20:55:09
【问题描述】:
将我的 Worklight 应用程序上传到 iTunes 时出错。
应用程序验证失败并出现以下错误:
签名无效。代码对象根本没有签名。二进制在 路径 [MyApp.app/buildtime.sh] 包含无效签名。确保 您已经使用分发证书签署了您的应用程序,而不是 临时证书或开发证书。验证 Xcode 中的代码签名设置在目标级别是正确的(其中 覆盖项目级别的任何值)。此外,请确保 您上传的包是使用 Xcode 中的 Release 目标构建的, 不是模拟器目标。如果您确定您的代码签名设置 是正确的,在Xcode中选择“Clean All”,删除“build”目录 在 Finder 中,并重建您的发布目标。了解更多信息, 请咨询 https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
我的问题是我在 2 周前提交了相同的申请,并且运行良好。今天的版本只更改了 www/ 文件夹内容,失败并出现此错误。
我用谷歌搜索了这个问题,找到了Codesign of Dropbox API fails in Xcode 4.6.3: "code object is not signed at all",但我尝试添加 --deep 选项,但这对我不起作用。
这与 buildtime.sh 脚本有关吗?当我读到它时,它似乎只是更新了 worklight.plist 文件中的构建时间值:
#!/bin/bash
# Licensed Materials - Property of IBM
# 5725-I43 (C) Copyright IBM Corp. 2006, 2013. All Rights Reserved.
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
# Update buildtime in project
echo -n ${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/worklight.plist | xargs -0
/usr/libexec/PlistBuddy -c "Set :buildtime `date +\"%s\"`"
此外,在谷歌搜索问题时,我在以下位置发现了一些类似问题: https://github.com/AppGyver/steroids/issues/918 他们似乎将混合应用程序与 sh 脚本一起使用,这让我相信问题与 buildtime.sh 脚本有关。
我删除了 buildtime 脚本,并删除了我的 Xcode 项目上的 run script 阶段,这次没有报错。
这样做安全吗?
有人在 Worklight 项目中遇到过同样的错误吗?是否与 buildtime.sh 脚本或 Apple 新政策有关?
【问题讨论】:
标签: ios xcode ibm-mobilefirst codesign