更新到 Xcode 7 后出错
Error after updating to Xcode 7
我正在使用 Ionic Framework 开发移动应用程序,但我刚刚收到一个非常奇怪的错误,它破坏了我的整个构建。
'myapp/Plugins/com.phonegap.plugins.facebookconnect/FacebookSDK.framework/FacebookSDK(FBLikeButtonBackgroundSelectedPNG.o)'
does not contain bitcode. You must rebuild it with bitcode enabled
(Xcode setting ENABLE_BITCODE), obtain an updated library from the
vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
那发生在 之后。在升级到新的 Xcode 7.0 版之前它运行良好。我已尝试禁用该项目的 BITCODE,但该应用程序的 Facebook 功能无法按预期工作。
编辑
如果我为项目禁用 BITCODE,Facebook 插件将打开浏览器而不是应用程序,因此 在这种情况下禁用 BITCODE 不是解决方案。
这是 Facebook 插件的一个已知问题。 https://github.com/Wizcorp/phonegap-facebook-plugin/issues/111614 有开放票,建议大家关注一下。
作为变通方法,您可以尝试
Project > Build Settings > Build Options > Enable Bitcode = No
(找到@http://forum.ionicframework.com/t/error-after-updating-to-xcode-7/32641)
您应该更新您的 Facebook SDK。它对我有用,因为最新的 Facebook SDK 版本支持位码。您不必升级到 v4,因为 3.24 版可以完美运行。
iOS9 兼容性还有一些其他步骤,例如将 FB 域列入白名单和授权 FB 应用程序。
以下版本支持bitcode并且可以在flag设置为YES的情况下编译:
FB文档的相关部分说:
Is bitcode supported?
v4.6 and v3.24 of the SDK supports bitcode. If you are using earlier versions, you must disable bitcode.
升级到 iOS9(传输安全/应用程序白名单)所需的所有步骤都可以在这里找到:
https://developers.facebook.com/docs/ios/ios9
但我必须告诉你,即使它 compiles/link OK 并使用 "integrated" Facebook 登录对话框,它仍然使用浏览器作为你应用程序中的模态视图。对我来说,这是对之前 Facebook 应用程序集成的回归。我不知道是否有办法恢复旧的 "native" 登录对话框。
来自Xcode 7、BitCode默认开启。在您的捆绑包中的所有应用程序和框架都不包含位码之前,您将收到此错误。
要删除此警告,您可以在构建设置中禁用它
Build Settings>All>Build Options>Enable Bitcode = NO
I too face the same problem while updating the frameworks for giving iOS9 support.
1.To change In build settings:
Enable Bitcode = "NO"
Not only for your project targets, to set all of your targets including your pods(Project) targets.
2.Change the Build Architecure only:
Debug - YES
Relese - NO
已修复!
这对我有用:
我是从这里偷的:
https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1116
- 使用 e Facebook's iOS 9 guide
中的第 2 步和第 3 步更新 plist
- 关闭位码设置(你已经知道怎么做了:smile:)
我正在使用 Ionic Framework 开发移动应用程序,但我刚刚收到一个非常奇怪的错误,它破坏了我的整个构建。
'myapp/Plugins/com.phonegap.plugins.facebookconnect/FacebookSDK.framework/FacebookSDK(FBLikeButtonBackgroundSelectedPNG.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
那发生在 之后。在升级到新的 Xcode 7.0 版之前它运行良好。我已尝试禁用该项目的 BITCODE,但该应用程序的 Facebook 功能无法按预期工作。
编辑
如果我为项目禁用 BITCODE,Facebook 插件将打开浏览器而不是应用程序,因此 在这种情况下禁用 BITCODE 不是解决方案。
这是 Facebook 插件的一个已知问题。 https://github.com/Wizcorp/phonegap-facebook-plugin/issues/111614 有开放票,建议大家关注一下。
作为变通方法,您可以尝试
Project > Build Settings > Build Options > Enable Bitcode = No
(找到@http://forum.ionicframework.com/t/error-after-updating-to-xcode-7/32641)
您应该更新您的 Facebook SDK。它对我有用,因为最新的 Facebook SDK 版本支持位码。您不必升级到 v4,因为 3.24 版可以完美运行。
iOS9 兼容性还有一些其他步骤,例如将 FB 域列入白名单和授权 FB 应用程序。
以下版本支持bitcode并且可以在flag设置为YES的情况下编译:
FB文档的相关部分说:
Is bitcode supported?
v4.6 and v3.24 of the SDK supports bitcode. If you are using earlier versions, you must disable bitcode.
升级到 iOS9(传输安全/应用程序白名单)所需的所有步骤都可以在这里找到: https://developers.facebook.com/docs/ios/ios9
但我必须告诉你,即使它 compiles/link OK 并使用 "integrated" Facebook 登录对话框,它仍然使用浏览器作为你应用程序中的模态视图。对我来说,这是对之前 Facebook 应用程序集成的回归。我不知道是否有办法恢复旧的 "native" 登录对话框。
来自Xcode 7、BitCode默认开启。在您的捆绑包中的所有应用程序和框架都不包含位码之前,您将收到此错误。
要删除此警告,您可以在构建设置中禁用它
Build Settings>All>Build Options>Enable Bitcode = NO
I too face the same problem while updating the frameworks for giving iOS9 support.
1.To change In build settings:
Enable Bitcode = "NO"
Not only for your project targets, to set all of your targets including your pods(Project) targets.
2.Change the Build Architecure only:
Debug - YES
Relese - NO
已修复!
这对我有用:
我是从这里偷的: https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1116
- 使用 e Facebook's iOS 9 guide 中的第 2 步和第 3 步更新 plist
- 关闭位码设置(你已经知道怎么做了:smile:)