facebook-ios-sdk icon indicating copy to clipboard operation
facebook-ios-sdk copied to clipboard

Library not loaded: @rpath/FBSDKCoreKit.framework/FBSDKCoreKit

Open lukepighetti opened this issue 2 years ago • 5 comments

Checklist before submitting a bug report

Xcode version

14.2

Facebook iOS SDK version

15.1.0

Dependency Manager

CocoaPods

SDK Framework

Login

Goals

Build my app

Expected results

My app builds

Actual results

I am running into an issue with FBSDKCoreKit where on some environments I get the error Library not loaded: @rpath/FBSDKCoreKit.framework/FBSDKCoreKit unless I add it to Frameworks, Libraries, and Embedded Content

Screenshot 2023-02-03 at 3 32 40 PM

But while that resolves the issue on problematic environments, it creates an issue on all other environments

Error (Xcode): Multiple commands produce '/Users/admin/Library/Developer/Xcode/DerivedData/Runner-adwcstkmsmzcjgdzgisfheqwwytp/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks/Foo.framework'

So now we have this 'seesaw' problem where fixing the issue on one environment causes all other environments to break.

I have created a Stack Overflow question, as well as an issue for the downstream consumer of Facebook SDKs

https://stackoverflow.com/questions/75340247/library-not-loaded-x-multiple-commands-produce-x-but-only-on-some-environment

https://github.com/darwin-morocho/flutter-facebook-auth/issues/326

Steps to reproduce

The reproduction and environment specifications is available in a Flutter project (uses cocoapods) shown here https://github.com/lukepighetti/ffa_repro

Code samples & details

// INSERT YOUR CODE HERE
var example = "Example code"

lukepighetti avatar Feb 03 '23 20:02 lukepighetti

have same

babang1da avatar Feb 12 '23 18:02 babang1da

Was able to resolve it by running arch -x86_64 pod update on my 14" M1 Pro

Complete command:

function pod-nuke(){
  pod cache clean --all
  rm -rf "$HOME/Library/Caches/CocoaPods"
  rm -rf "$HOME/Library/Developer/Xcode/DerivedData/*"
  rm -rf Pods
  arch -x86_64 pod update
}

lukepighetti avatar Feb 15 '23 20:02 lukepighetti

Apparently this line was added to my .zshrc at some point, I think it was recommended by brew or something? In any case, I was getting errors when trying to run arch -x86_64 pod update until I removed this:

# ruby
if [ -d "/opt/homebrew/opt/ruby/bin" ]; then
  export PATH=/opt/homebrew/opt/ruby/bin:$PATH
  export PATH=`gem environment gemdir`/bin:$PATH
fi

lukepighetti avatar Feb 15 '23 20:02 lukepighetti

We have the same issue and the macbook we're using has an Intel chip and is from 2015

BunnyBuddy avatar Mar 07 '23 12:03 BunnyBuddy

On flutter works only
flutter_facebook_auth: ^4.4.1+1 #FBSDKCoreKit (14.1.0) only

Apple M1

babang1da avatar Mar 07 '23 13:03 babang1da