facebook-ios-sdk
facebook-ios-sdk copied to clipboard
Library not loaded: @rpath/FBSDKCoreKit.framework/FBSDKCoreKit
Checklist before submitting a bug report
- [ ] I've updated to the latest released version of the SDK
- [X] I've searched for existing GitHub issues
- [X] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [X] I've read the Code of Conduct
- [X] This issue is not security related and can safely be disclosed publicly on GitHub
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

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"
have same
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
}
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
We have the same issue and the macbook we're using has an Intel chip and is from 2015
On flutter works only
flutter_facebook_auth: ^4.4.1+1 #FBSDKCoreKit (14.1.0) only
Apple M1