Facebook-ios-sdk: Cocoapods support broken with SPM support added since 5.9.0

Created on 8 Nov 2019  路  9Comments  路  Source: facebook/facebook-ios-sdk

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

  • Xcode Version: 11.2
  • Swift Version: 5.1.2
  • Cocoapods Version 1.8.4

Goals

Integrate with Cocoapods and Build successfully.

Expected Results

A successful build.

Actual Results

Compiling failed: #import "FBSDKCoreKit+Internal.h" <- FBSDKCoreKit+Internal.h file not found.

Steps to Reproduce

  1. pod 'FBSDKLoginKit' in a Podfile
  2. build.

Code Samples & Details

The issue appears with 5.9.0, and still exists with 5.10.0, while 5.8.0 compiles with no problem.
I checked the file history and apparently the changes here should be responsible for the issue.
https://github.com/facebook/facebook-ios-sdk/commit/f3be0dab4cfbd5c917014e42e8d148aa7a43b8e2#diff-b35b108f781c427e84771f1f2869ef75L24

All 9 comments

Have you cleaned the build folder before rebuilding? I am able to build locally using Xcode 11.1 and 11.2 without issue.

It would also be helpful to post a link to a sample app where this is happening. I am unable to reproduce this locally.

@joesus I check it again and now things are getting weird for me.

For the original project, I tried cleaning the build folder and derived destinations, build issue still exists for 5.9.0 & 5.10.0 and gone for 5.8.0. Results are reproducible on multiple macs.
For a new empty project I created, 5.10.0 builds fine without problem.

So seems there might be some legacy settings in my project that is causing this error. I'm looking into it.

You may also consider using SPM for this project if you are not already significantly invested in Cocoapods. 馃檪

@joesus Unluckily I have a 245 lines podfile 馃槶

Going to close this for now since it seems like a legacy build settings issue. Please post any relevant findings as it may help someone with a similar setup. Thanks!!!

@joesus I found where the problem is:

Add this line to Podfile, then the error could be reproduced.
install! 'cocoapods', :generate_multiple_pod_projects => true

So seems there's some compatibility issues with the cocoapods generate_multiple_pod_projects parameter.

Correct. Will be fixing this ASAP. Thanks for your patience!

Was this page helpful?
0 / 5 - 0 ratings