cordova 运行时出现 ios 错误 .. 错误代码 65 命令:xcodebuild with args:
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34166175/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
cordova run with ios error .. Error code 65 for command: xcodebuild with args:
提问by ridermansb
This error occur onlywhen I try to cordova run ios --device
此错误仅在我尝试时发生cordova run ios --device
Even after cordova build ios
command executed, non error is reported.
即使在cordova build ios
命令执行后,也报告非错误。
Whats I do wrong? And how to debug cordova projects on my iPhone (need this because need to test a Camera feature)
我做错了什么?以及如何在我的 iPhone 上调试科尔多瓦项目(需要这个,因为需要测试相机功能)
WITH CONFIGURATION Debug ===
Check dependencies
Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found.
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/ridermansb/Projects/jdapp/platforms/ios/cordova/build-debug.xcconfig,-project,CorrijaMe.xcodeproj,ARCHS=armv7 armv7s arm64,-target,CorrijaMe,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=/Users/ridermansb/Projects/jdapp/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/ridermansb/Projects/jdapp/platforms/ios/build/sharedpch
ERROR running one or more of the platforms: Error: /Users/ridermansb/Projects/jdapp/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
采纳答案by Connor
You need a development provisioning profile on your build machine. Apps can run on the simulator without a profile, but they are required to run on an actual device.
您需要在构建机器上有一个开发配置文件。应用程序无需配置文件即可在模拟器上运行,但需要在实际设备上运行。
If you open the project in Xcode, it may automatically set up provisioning for you. Otherwise you will have to create go to the iOS Dev Center and create a profile.
如果您在 Xcode 中打开该项目,它可能会自动为您设置配置。否则,您将必须创建转到 iOS 开发中心并创建配置文件。
回答by Shashank Saxena
Try to remove and add ios again
尝试删除并再次添加ios
ionic platform remove ios
ionic platform add ios
Worked in my case
在我的情况下工作
Replace ionicwith cordovaif appropriate.
如果合适,用cordova替换离子。
回答by Khrystyna Skvarok
I had the same problem. In my case cordova platform update ios
helped. The reason was in outdated version.
我有同样的问题。在我的情况下有cordova platform update ios
帮助。原因是在过时的版本中。
回答by kris
I was getting the same error when I tried to do :
当我尝试这样做时,我遇到了同样的错误:
cordova build ios
cordova build ios
except mine said ** ARCHIVE FAILED ** rather than ** BUILD FAILED **.
除了我说的 ** ARCHIVE FAILED ** 而不是 ** BUILD FAILED **。
I fixed it by opening the projectName.xcodeproj file in Xcode and then adjusting these 2 settings :
我通过在 Xcode 中打开projectName.xcodeproj 文件然后调整这两个设置来修复它:
- In Targets > General > Signingensure you have selected a Team
- 在“目标”>“常规”>“签名”中,确保您选择了一个团队
- In Targets > Build Settings > (search for "bitcode")set Enable Bitcode to "Yes"
- 在Targets > Build Settings >(搜索“bitcode”)中将 Enable Bitcode 设置为“Yes”
Then I quit out of Xcode and reran cordova build ios
and it worked.
然后我退出了 Xcode 并重新运行cordova build ios
,它起作用了。
回答by Nizar
Open xCode can be exhausting if you do it everytime, so you need to add this flag :
如果你每次都打开 xCode 可能会很累,所以你需要添加这个标志:
- cordova build ios --buildFlag="-UseModernBuildSystem=0"
- 科尔多瓦构建 ios --buildFlag="-UseModernBuildSystem=0"
OR if you have build.json file at the root of your project, you must add this lines:
或者,如果您的项目根目录中有 build.json 文件,则必须添加以下行:
{
"ios": {
"debug": {
"buildFlag": [
"-UseModernBuildSystem=0"
]
},
"release": {
"buildFlag": [
"-UseModernBuildSystem=0"
]
}
}
}
Hope this will help in the future
希望这会在未来有所帮助
回答by stemount
I tried a few things in this scenario.
我在这种情况下尝试了一些事情。
I removed ios and installed many times. Went down the path of deleting Splash screens to no avail! Bitcode on/off so many times.
我删除了ios并安装了很多次。走上删除闪屏的道路无济于事!多次打开/关闭位码。
However, after selecting a iOS provisioning team, and running pod update
inside ./platforms/ios
, I am pleased to announce this resolved my problems.
但是,在选择了一个 iOS 配置团队并在pod update
内部运行后./platforms/ios
,我很高兴地宣布这解决了我的问题。
Hopefully you can try the same and get some resolution?
希望您可以尝试相同的方法并获得一些解决方案?
回答by Gianluca Ghettini
In my case it was the app icon PNG file... I mean, it took 1 day to go from the provided error
就我而言,它是应用程序图标 PNG 文件...我的意思是,从提供的错误开始需要 1 天的时间
Error code 65 for command: xcodebuild with args:
命令的错误代码 65:xcodebuild with args:
to the human-readable one:
到人类可读的:
"the PNG file icon is no good for the picky Apple Xcode"
“PNG 文件图标不适合挑剔的 Apple Xcode”
回答by Mik
1) Open code in Xcode
2) Continue with : ionic cordova build ios
1) 在 Xcode 中打开代码 2) 继续: ionic cordova build ios
回答by BrunoLM
How to do what @connor said:
如何做@connor所说的:
iOS
IOS
- Open
platforms/ios
on XCode - Find & Replace
io.ionic.starter
in all files for a unique identifier - Click the project to open settings
- Signing > Select a team
- Go to your device Settings > General > DeviceManagement
- Trust your account/team
ionic cordova run ios --device --livereload
platforms/ios
在 XCode 上打开io.ionic.starter
在所有文件中查找和替换唯一标识符- 点击项目打开设置
- 签约 > 选择团队
- 转到您的设备设置 > 通用 > 设备管理
- 信任您的帐户/团队
ionic cordova run ios --device --livereload
回答by Vincent Wasteels
I must add :
我必须补充:
I had the same problem, it was coming from the fact that my teammate had a different version of cordova, and commited plugins on the repo with his version.
我遇到了同样的问题,这是因为我的队友有一个不同版本的cordova,并且在他的版本的repo上提交了插件。
For all cordova plugins, I had to :
对于所有cordova插件,我必须:
cordova plugin rm <plugin-name>
cordova plugin add <plugin-name>
And ask my teammate to update his cordova to match my version
并让我的队友更新他的科尔多瓦以匹配我的版本