phonegap build ios
失败,并显示以下错误消息:
The following build commands failed:
CompileC /Users/user/library/Developer/Xcode/DerivedData/MyApp-dtsdztgswtsnnubosnumqjssdpaj/Build/Intermediates.noindex/MyApp\ App.build/Debug-iphonesimulator/MyApp\ App.build/Objects-normal/x86_64/FacebookConnectPlugin.o /Applications/MAMP/htdocs/MyApp/platforms/ios/MyApp\ App/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Command finished with error code 65: xcodebuild -workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 11 Pro Max,build,CONFIGURATION_BUILD_DIR=/Applications/MAMP/htdocs/MyApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Applications/MAMP/htdocs/MyApp/platforms/ios/build/sharedpch
(node:3817) UnhandledPromiseRejectionWarning: Error: xcodebuild: Command failed with exit code 65
at ChildProcess.whenDone (/Applications/MAMP/htdocs/MyApp/node_modules/cordova-common/src/superspawn.js:135:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeclose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:3817) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block,or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3817) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future,promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
这些是我的插件版本:
- phonegap cli:8.0.0
- cordova-ios:5.0.1
- phonegap-plugin-facebook4:6.2.0
其他上下文
我设法通过手动编辑podfile并向其中添加以下行,然后运行cd platforms/ios && pod install
来解决此问题:
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
此后,phonegap构建ios成功完成。
是否可以某种方式不添加本机依赖项? 理想的情况是每次我删除并重新添加平台时都不必重新添加这些,并将它们添加到构建挂钩中听起来像是veeeeeeery hacky。