Facebook-ios-sdk: build failed with Xcode 11 beta 6

Created on 22 Aug 2019  路  8Comments  路  Source: facebook/facebook-ios-sdk

error log is here.

/Users/username/MyApp/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/Internal/FBSDKVideoUploader.m:26:9: fatal error: 'FBSDKCoreKit+Internal.h' file not found
#import "FBSDKCoreKit+Internal.h"
        ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Environment

  • OS: macOS Mojave 10.14.6 (18G87)
  • Xcode: Version 11.0 beta 6 (11M392q)
  • CocoaPods: 1.7.5
  • SDK Version: 5.4.1

Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
project 'MyApp.xcodeproj'
inhibit_all_warnings!

install! 'cocoapods',
  generate_multiple_pod_projects: true,
  incremental_installation: true

target 'MyApp' do
  use_frameworks!

  pod 'FBSDKCoreKit'
  pod 'FBSDKLoginKit'
  pod 'FBSDKShareKit'
end

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
      end
    end
  end
end

Most helpful comment

Sure, we'll have a release this week to ship the fix.

All 8 comments

HI @rakesthedon , could you also share the log for pod install?

I remove my comment since I wasn't using cocoapods

Hey @dreamolight

It looks like Facebook Frameworks doesn't play nice with new Cocoapods flag generate_multiple_pod_projects: true

Here is the issue reported in the Cocoapods repo: https://github.com/CocoaPods/CocoaPods/issues/8853

Hi @reuvenlevitsky , thanks for pointing out the solution, we'll fix it in next release which I expect within 2 weeks.

No offense, but would there be a release fixing this issue within this week? FBSDKCoreKit is currently the only blocker in our project for generate_multiple_pod_projects : true

Sure, we'll have a release this week to ship the fix.

Closing this as 5.6.0 released with the support for generate_multiple_pod_projects.

error log is here.

/Users/username/MyApp/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/Internal/FBSDKVideoUploader.m:26:9: fatal error: 'FBSDKCoreKit+Internal.h' file not found
#import "FBSDKCoreKit+Internal.h"
        ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Environment

  • OS: macOS Mojave 10.14.6 (18G87)
  • Xcode: Version 11.0 beta 6 (11M392q)
  • CocoaPods: 1.7.5
  • SDK Version: 5.4.1

Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
project 'MyApp.xcodeproj'
inhibit_all_warnings!

install! 'cocoapods',
  generate_multiple_pod_projects: true,
  incremental_installation: true

target 'MyApp' do
  use_frameworks!

  pod 'FBSDKCoreKit'
  pod 'FBSDKLoginKit'
  pod 'FBSDKShareKit'
end

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
      end
    end
  end
end

you can add this

fix FBSDKCoreKit generate_multiple_pod_projects link false https://github.com/CocoaPods/CocoaPods/issues/8856

def append_header_search_path(target, path)
target.build_configurations.each do |config|
# Note that there's a space character after $(inherited).
config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
config.build_settings["HEADER_SEARCH_PATHS"] << path
end
end

post_install do |installer|
installer.pod_target_subprojects.flat_map { |p| p.targets }.each do |t|
# RxDataSources is a pod lib which depends the RxCocoa lib.
if t.name == "FBSDKLoginKit"
append_header_search_path(t, "${PODS_ROOT}/Headers/Public/FBSDKCoreKit")
end
end
end

Was this page helpful?
0 / 5 - 0 ratings