Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 代码符号验证在xcodebuild期间失败,无法读取xcrun的权限_Ios_Xcodebuild_Xcrun - Fatal编程技术网

Ios 代码符号验证在xcodebuild期间失败,无法读取xcrun的权限

Ios 代码符号验证在xcodebuild期间失败,无法读取xcrun的权限,ios,xcodebuild,xcrun,Ios,Xcodebuild,Xcrun,我已经在这里和互联网上尝试了所有可用的解决方案 我正在尝试自动化iOS构建过程,而清理、构建和归档过程成功地完成了这5个警告(错误),代码符号验证失败 warning: The CodeResources file is missing and it must be a symbolic link to _CodeSignature/CodeResources. Make certain that the bundle is on a locally-mounted volume (

我已经在这里和互联网上尝试了所有可用的解决方案

我正在尝试自动化iOS构建过程,而清理、构建和归档过程成功地完成了这5个警告(错误),代码符号验证失败

warning: The CodeResources file is missing and it must be a symbolic link to      _CodeSignature/CodeResources.  Make certain that the bundle is on a locally-mounted volume (not a remote SMB volume), and be certain to use the Mac OS X Finder to compress it (-19062)
Unable to validate your application. - (null)

warning: iPhone/iPod Touch: application executable is missing a required architecture.      At least one of the following architecture(s) must be present: armv6 (-19033)
Unable to validate your application. - (null)

warning: Icon specified in the Info.plist not found under the top level app wrapper:  (-19007)
Unable to validate your application. - (null)

warning: iPhone/iPod Touch: Info.plist: Unable to verify icon dimensions, no icon found.  Your MinimumOSVersion is below 3.2, so you must define CFBundleIconFile or provide a default Icon.png that is 57x57. (-19013)
Unable to validate your application. - (null)

warning: Application failed codesign verification.  The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate. (-19011)
如果我试图忽略警告或使用调试配置跳过验证代码设计,那么xcrun将.app打包到.ipa将失败,并出现以下错误

env SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication -v 
/Users/XXXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_11_31_23.app -o 
/Users/XXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_11_31_23.ipa 
--sign iPhone\ Distribution 
--embed/Users/XXXXXXX/source/digital_hub/cms/cms_local_repo/6072/76/XXXXXXXX_AppStore_11_07_1373971044.mobileprovision

error: Failed to read entitlements from '/var/folders/n6/8tsx1pss5v3fq3sfpz8379r0ms3b7m/T/Rm5MudWNER/Payload/Test_22_07_13_11_31_23.app'
在使用工作空间时,我的xcodebuild命令如下

/usr/bin/xcodebuild -verbose 
-workspace /Users/XXXXX/source/digital_hub/cms/git_local_repo/11330/80/PDFReader.git/XXXXXX.xcworkspace 
-scheme _DEFAULT -sdk iphoneos -configuration Release CODE_SIGN_IDENTITY="iPhone Distribution:" 
PROVISIONING_PROFILE=73DE6F20-FAB9-46A2-9825-35D7DE82CD4D 
CONFIGURATION_BUILD_DIR=/Users/ahsandar/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_26_29.app
OTHER_CODE_SIGN_FLAGS="--keychain /tmp/xcoder1374496105" clean
我的xcrun命令如下所示

/usr/bin/xcrun -log -sdk iphoneos PackageApplication -v 
"/Users/XXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_26_29.app" -o 
"/Users/XXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_26_29.ipa" --sign "iPhone Distribution:" 
--embed "/Users/XXXXX/source/digital_hub/cms/cms_local_repo/11330/80/XXXXXX_AppStore_11_07_1373

我使用XcoderGem创建临时密钥链,将我的p12添加到其中。使用用于代码设计的命令行工具对归档文件进行的所有验证均成功。

看起来您在项目设置中将minimus os设置得比可能的小,可能是您的图标大小错误。请再次阅读您的第一个日志

并确保为xcodebuild命令提供了正确的参数。 对我来说,clean可以很好地处理这些参数:

xcodebuild clean -sdk iphoneos5.1 -project '${PBXPROJ}.xcodeproj' -configuration '${MCONFIG}' -alltargets DSTROOT="${RELEASE_BUILDDIR}" PROVISIONING_PROFILE="${kPROVISONING_PROFILE}" CODE_SIGN_IDENTITY="${DEVELOPER_NAME}"
而build的工作原理是这样的:

xcodebuild install -sdk iphoneos5.1 -project "${PBXPROJ}.xcodeproj" -configuration "${MCONFIG}" -target "${TARGET}" DSTROOT="${RELEASE_BUILDDIR}" PROVISIONING_PROFILE="${kPROVISONING_PROFILE}" CODE_SIGN_IDENTITY="${DEVELOPER_NAME}"

希望能有所帮助。

我正在使用工作区,所以我的xcodebuild命令看起来是这样的,
/usr/bin/xcodebuild-verbose
-workspace/Users/XXXXXX/source/digital\u hub/cms/git\u local\u repo/9915/79/XXXXXXX.git/XXXXXX.xworkspace
-scheme\u默认值-sdk iphoneos-配置发布代码\u签名\u标识=“iPhone发行版:”
配置配置文件=73DE6F20-FAB9-46A2-9825-35D7DE82CD4D
配置构建目录=/Users/XXXXXXX/source/digital\u hub/cms/final/cms\u repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test\u 22\u 07\u 13\u 09\u 37.app
其他\code>代码=“\u SIGN\u FLAGS\u-keychain\u-keychain/tmp/xcoder137955“clean我看到您尝试使用不同于默认设置的密钥链-强烈建议我使用最低设置(默认密钥链、默认配置(来自xcodeproj)等)。当您得到结果-然后您可以尝试放置更多参数。顺便说一句,我用过(cd${FOLDER};xcodebuild…)它看起来比长距离使用要好。Thx解决了这些问题,提供给我的目标缺少设置,指向my.app文件夹的路径错误,因此代码符号失败,xcodebuild无法链接CodeResource文件夹,因此必须显式执行。谢谢你回答我的问题。