Cannot build FBParseUtilsV4 after installing cocoapods when use_frameworks is enabled

Install the following subfile otherwise an empty project:

use_frameworks! 
platform :ios, '8.0'

pod 'ParseFacebookUtilsV4'

Xcode reports three compilation errors:

/Users/benpackard/Cocoa/PodsTest/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h:21:9: Include of non-modular header inside framework module 'FBSDKLoginKit.FBSDKLoginButton'

/Users/benpackard/Cocoa/PodsTest/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.h:21:9: Include of non-modular header inside framework module 'FBSDKLoginKit.FBSDKLoginConstants'

/Users/benpackard/Cocoa/PodsTest/Pods/ParseFacebookUtilsV4/ParseFacebookUtils/Internal/PFFacebookAuthenticationProvider.h:12:9: Could not build module 'FBSDKLoginKit'

When an option use_frameworks!is removed from the subfile, the project compiles without problems.

I would like to know the root cause of this problem (presumably some kind of problem in pod?) And possible workarounds.

+4
source share
1 answer

The solution is to add

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

at the end of your swap file.

Then through the terminal: pod install

: 'FBSDK_EXTERN'

EDIT: , FBSDK_EXTERN ( , : p)

0

Source: https://habr.com/ru/post/1611006/


All Articles