【问题标题】:cordova-plugin-facebook4 - iOS build fails with error code 65, probably because of missing native dependenciescordova-plugin-facebook4 - iOS 构建失败,错误代码为 65,可能是因为缺少本机依赖项
【发布时间】:2019-11-05 16:08:45
【问题描述】:

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 build ios 成功完成。

可能是因为没有添加本地依赖项吗? 理想的做法是不必每次删除并重新添加平台时都重新添加它们,并且将它们添加到构建挂钩中听起来很奇怪。

【问题讨论】:

    标签: ios cordova phonegap


    【解决方案1】:

    在我的情况下,我有权限相关的问题,所以这就是为什么我允许 ($user)/.cocoapods 但不工作

    然后我删除了该文件夹,然后在($app_folder)/platform/ios 中触发pod install 命令和

    它会将facebook'FBSDKCoreKit','FBSDKLoginKit','FBSDKShareKit'的所有文件安装到ios平台

    也许对你也有帮助。

    【讨论】:

      【解决方案2】:

      这意味着你有一个错误 应用程序/插件/cordova-plugin-facebook4/FacebookConnectPlugin.m

      如果您转到 xcode 并检查该文件,您将看到缺少的类。我认为您使用的是插件不支持的 SDK,因此我建议您更改为支持最后一个 facebook sdks (9.0.0) 的 cordova-plugin-facebook-connect https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect#readme

      【讨论】:

        猜你喜欢
        • 2021-03-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-09-30
        • 2019-04-26
        • 2021-02-23
        • 1970-01-01
        相关资源
        最近更新 更多