1)cordova build ios –release
通过命令在平台“ios”上编译应用程序
“/ Applications / MAMP / htdocs / MyTest / MyTestApp / platforms / ios / cordova / build” – 发布
平台“ios”编译成功.
2)sudo xcrun -sdk iphoneos PackageApplication -v“ios / build / emulator / MyTestApp.app”-o“/Users/mymac/Desktop/Testnew/MyTestApp.ipa”–sign“iPhone Distribution:NAME(TEAM_ID)” – -embed“MyTestApp_Dis.mobileprovision”
打包应用程序:’ios / build / emulator / MyTestApp.app’
参数:embed = MyTestApp_Dis.mobileprovision verbose = 1 output = / Users / mymac / Desktop / Testnew / MyTestApp.ipa sign = iPhone Distribution:NAME(TEAM_ID)
环境变量:
HOME = / Users / mymac
SUDO_GID = 20
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
VERSIONER_PERL_PREFER_32_BIT =没有
MAIL = / var / mail / root
SSH_AUTH_SOCK = / tmp / launch-zsBMC8 / Listeners
LANG = en_US.UTF-8
USER = root
LOGNAME = root
__CF_USER_TEXT_ENCODING = 0x0:0:0
USERNAME = root
PATH = /usr/bin:/ bin:/usr/sbin:/ sbin:/usr/local/bin:/usr/local/git / bin
SUDO_USER = mymac
SHELL = / bin / bash
TERM = xterm-256color
SUDO_COMMAND = /usr/bin/xcrun -sdk iphoneos PackageApplication -v ios / build / emulator / MyTestApp.app -o /Users/mymac/Desktop/Testnew/MyTestApp.ipa –sign iPhone Distribution:NAME(TEAM_ID)–embed MyTestApp_Dis.mobileprovision
SUDO_UID = 501
VERSIONER_PERL_VERSION = 5.12
输出目录:’/ Users / mymac /Desktop / Testnew / MyTestApp.ipa’
临时目录:’/ tmp / W81FhZ9VAH'(详细设置时不会在退出时删除)
/ bin / cp -Rp ios / build / emulator / MyTestApp.app / tmp / W81FhZ9VAH / Payload
程序/ bin / cp返回0:[]
检查原始应用
> /usr/bin/codesign –verify -vvvv ios / build / emulator / MyTestApp.app
程序/usr/bin/codesign返回1:[ios / build / emulator / MyTestApp.app:代码对象根本没有签名
在架构中:i386
]
协同设置检查失败:ios / build / emulator / MyTestApp.app:代码对象根本没有签名
在架构中:i386
完成检查原始应用程序
嵌入’MyTestApp_Dis.mobileprovision’
> / bin / rm -rf /tmp/W81FhZ9VAH/Payload/MyTestApp.app/embedded.mobileprovision
程序/ bin / rm返回0:[]
> / bin / cp -rp MyTestApp_Dis.mobileprovision /tmp/W81FhZ9VAH/Payload/MyTestApp.app/embedded.mobileprovision
程序/ bin / cp返回0:[]
> /usr/bin/codesign -d –entitlements / tmp / W81FhZ9VAH / entitlements_rawixGWnKhi /tmp/W81FhZ9VAH/Payload/MyTestApp.app
程序/usr/bin/codesign返回1:[/tmp/W81FhZ9VAH/Payload/MyTestApp.app:代码对象根本没有签名
]
错误:无法从’/tmp/W81FhZ9VAH/Payload/MyTestApp.app’读取权利
当从shell运行’cordova buld ios [–release]’然后做’xcrun ……’之后它对我有用.
但是:当从脚本中运行此序列时,我收到“Codeign检查失败…”错误…
如果我在cordova和xcrun调用之间的脚本中插入(如)一个“等待”循环,它就可以了.
所以 – 对我来说 – 似乎,当cordova没有完全完成时,它会返回shell(?)
事实是,如果我编写我的脚本像
#!/bin/bash cordova build ios --release sleep 5 sh -c "xcrun ..."
它对我有用.问题:这是cordova / phonegap中的错误吗?