简体   繁体   English

离子构建ios抛出承诺拒绝错误

[英]ionic build ios throws a promise Rejection error

I am setting up a build environment in a new mac for my project. 我正在为我的项目在新的Mac中设置构建环境。 I am able to successfully run the 'gulp' command followed by the 'ionic build android'. 我能够成功运行“ gulp”命令,然后运行“ ionic build android”。 The .apk file generated is working as expected. 生成的.apk文件按预期工作。 but my 'ionic build ios' is throwing the following error. 但是我的“ ionic build ios”抛出以下错误。

The following build commands failed: 以下构建命令失败:

CompileXIB MyProjectDirectory/Resources/ExternalFormViewController.xib (1 failure) CompileXIB MyProjectDirectory / Resources / ExternalFormViewController.xib(1个失败)

CordovaError: CordovaError:

Promise rejected with non-error: 'Error code 65 for command: xcodebuild with args: -xcconfig,/Users/MyProjectDirectory/Bala/InterimDirectory/ProjectFolder/ProjectSubFolder/platforms/ios/cordova/build-debug.xcconfig,-workspace,MyProjectDirectory.xcworkspace,-scheme,MyProjectDirectory,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/MyProjectDirectory/Bala/InterimDirectory/ProjectFolder/ProjectSubFolder/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/MyProjectDirectory/Bala/InterimDirectory/ProjectFolder/ProjectSubFolder/platforms/ios/build/sharedpch' at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15) at process._tickCallback (internal/process/next_tick.js:103:7) 承诺被拒绝且没有错误:'错误代码65为命令:带有args的xcodebuild:-xcconfig,/ Users / MyProjectDirectory / Bala / InterimDirectory / ProjectFolder / ProjectSubFolder / platforms / ios / cordova / build-debug.xcconfig,-workspace,MyProjectDirectory .xcworkspace,-方案,MyProjectDirectory,-配置,调试,-sdk,iphonesimulator,-目标,平台= iOS Simulator,名称= iPhone X,build,CONFIGURATION_BUILD_DIR = / Users / MyProjectDirectory / Bala / InterimDirectory / ProjectFolder / ProjectSubFolder / platforms / ios / build / emulator,SHARED_PRECOMPS_DIR = / Users / MyProjectDirectory / Bala / InterimDirectory / ProjectFolder / ProjectSubFolder / platforms / ios / build / sharedpch'位于cli.catch.err(/ usr / local / lib / node_modules / cordova / bin / cordova :30:15)在process._tickCallback(internal / process / next_tick.js:103:7)

It seems that there is some issue with XCode or some dependencies not being at the expected place. 似乎XCode有问题或某些依赖项不在预期的位置。

Could you try the following (add sudo if it fails for permission reasons): 您能否尝试以下操作(如果由于权限原因而失败,则添加sudo):

npm install -g ios-deploy --unsafe-perm=true npm install -g ios-deploy --unsafe-perm = true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM