issue using FBSDK in swift iOS application

我们两清 提交于 2019-11-29 06:28:34
Paul Lehn

This is a bug and Facebook is currently "assigning this to the appropriate team".

To get updates to this issue follow this link:

https://developers.facebook.com/bugs/362995353893156/

and hit subscribe.

Some people have found success using the answers on this link (none have worked for me):

Facebook iOS8 SDK build module error for FBSDKCoreKit

For those of you trying to compile a swift project with FB cocoaPods.

*BTW, it worked once, only in xCode 7.1 it stopped

Only after playing with everything, I did 2 things:

  1. Added the following code at the end of the pod:

    post_install do |installer|
    installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
        configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
    end
    

    end

  2. Remove the 'new and improved' swift imports, and add FB into the obj-C bridging header: A small screenshot of my bridging header

Try with build settings. Set Allow Non-modular Includes in Framework modules to YES.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!