I'm using flutter_facebook_login 3.0.0
I got this error when i tried to run my app
** BUILD FAILED ** Xcode's output: ↳ In file included from /Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m:21:
In file included from
/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginKit+Internal.h:19:
In file included from
/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/../FBSDKLoginKit.h:27:
/Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h:24:9:
fatal error: module 'FBSDKCoreKit' not found #import FBSDKCoreKit;
for the simulator. Error launching application on iPhone 8.
I have managed to solve this issue by changing the Podfile
target 'Runner' do
# flutter Pod
use_frameworks!
use_modular_headers!
------
flutter clean
Delete Podfile.lock
pod install --repo-update
pod update FBSDKLoginKit
Run
flutter clean && cd ios && sudo rm Podfile.lock && pod install --repo-update && pod update FBSDKLoginKit
open .xcworkspace and in General-> Deployment Info set Target 11.0 also in Podfile set Target 11.0
Until now the only way that worked for me was this
You will have to override Podfile.lock with 5.8.0 version of Facebook SDK.
PODS:
- FBSDKCoreKit (5.8.0):
- FBSDKCoreKit/Basics (= 5.8.0)
- FBSDKCoreKit/Core (= 5.8.0)
- FBSDKCoreKit/Basics (5.8.0)
- FBSDKCoreKit/Core (5.8.0):
- FBSDKCoreKit/Basics
- FBSDKLoginKit (5.8.0):
- FBSDKLoginKit/Login (= 5.8.0)
- FBSDKLoginKit/Login (5.8.0):
- FBSDKCoreKit (~> 5.0)
- Flutter (1.0.0)
....
I've been around the houses and back with this and have eventually got this to work with the 5.13.1 Podfiles on iOS (by work, I mean compiling, linking and installing onto a real iPhone - I don't actually use Facebook but it's required as part of the firebase-ui login package :-D )
Firstly, do a pod clean, e.g.
Run: flutter clean
Go to ios folder, delete Podfile, Podfile.lock, Pods folder, Runner.xcworkspace
Run project again
After building I got errors regarding:
fatal error: module 'FBSDKCoreKit' not found
#import FBSDKCoreKit;
I then added the modular headers override into the ios/podspec file mentioned here https://github.com/roughike/flutter_facebook_login/issues/214#issuecomment-565166295
The start of the podfile looks like this:
platform :ios, '12.0'
use_modular_headers!
I did note that linking errors, about missing Facebook libraries, were due to a spurious entry in the Frameworks section.
Futher details in this thread
I had resolved it by following below steps, I had faced this issue due to facebook_share plugin so
1.downgrade the version of facebook_share plugin to. 0.0.1+1
2.run command in your project's terminal - pod cache clean —all
3.add below two pods in Podfile:
target 'Runner' do
use_frameworks!
use_modular_headers!
pod 'FBSDKCoreKit', '~> 6.0.0'
pod 'FBSDKShareKit', '~> 6.0.0'
4.run command in your project's terminal - Pod install
5.run command in your project's terminal - pod update FBSDKShareKit
done, error removed
This issue solved my problem 'FBSDKCoreKit / FBSDKCoreKit.h' file not found
pod 'FBSDKCoreKit', '4.38'
pod 'FBSDKLoginKit', '4.38'
pod 'FBSDKShareKit', '4.38'
Related
I just change the flutter facebook plugin from 2.0.0 to 3.0.0 and now I am getting POD error when I execute flutter build.
Need some help how debug and fix this issue
MY POD file snippet
platform :ios, '9.0'
flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
pod 'FBSDKCoreKit', '4.39.1'
pod 'FBSDKLoginKit', '4.39.1'
--- This error message ----
This is the error dump
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
M Flutter
- FBSDKCoreKit
- FBSDKLoginKit
- file_picker
- firebase_analytics
- firebase_auth
- firebase_core
- firebase_crashlytics
- firebase_dynamic_links
- firebase_messaging
- firebase_remote_config
- flutter_facebook_login
- flutter_statusbarcolor
- google_sign_in
- keyboard_visibility
- location
- package_info
- path_provider
- share
- shared_preferences
- url_launcher
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
In snapshot (Podfile.lock):
FBSDKLoginKit (= 4.39.1)
In Podfile:
FBSDKLoginKit (= 4.39.1)
flutter_facebook_login (from `.symlinks/plugins/flutter_facebook_login/ios`) was resolved to 0.0.1, which depends on
FBSDKLoginKit (~> 5.5)
Specs satisfying the `FBSDKLoginKit (= 4.39.1), FBSDKLoginKit (= 4.39.1), FBSDKLoginKit (~> 5.5)` dependency were found, but
they required a higher minimum deployment target.
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `<main>'
Error running pod install
I have clear the cache but I still get the error..
Delete
Podfile.lock
Then run
pod install.
It worked for me.
Am using
flutter_facebook_login
You can try to run the following in the ios directory:
$ pod repo update
$ pod install
You might need to delete the Podfile.lock file first (i'm not sure it helps but it's what i did).
to fix used two commands:
- pod repo update
- pod update FBSDKCoreKit
——————————————————————
after pod repo update :
MacRoberto-8:Nixtelecom robertofonseca$ cd ios
MacRoberto-8:ios robertofonseca$ pod update FBSDKCoreKit
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing BoringSSL-GRPC (0.0.3)
Installing FBSDKCoreKit (5.6.0)
Installing FBSDKLoginKit (5.6.0)
Installing firebase_core (0.0.1)
.
.
.
.
Generating Pods project
Integrating client project
Pod installation complete! There are 14 dependencies from the Podfile and 37 total pods installed.
MacRoberto-8:Nixtelecom robertofonseca$ flutter build ios --release
.
.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
In Xcode 10.1, I'm getting a linker error surrounding SwiftCharts. This is after I began running 10.2, and needed to revert to 10.1, because of an Xcode bug. I shut down Xcode and cleaned the pods with the following:
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
pod install
which resulted in no DerivedData. The output of the install was the following:
pod install
Analyzing dependencies
Downloading dependencies
Installing Realm (3.14.1)
Installing RealmSwift (3.14.1)
Installing SwiftCharts (0.6.5)
Installing SwiftGraph (2.0.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 4 total pods installed.
At this point, there is no data in DerivedData.
When I startup Xcode, I get a linker error:
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/Realm'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/RealmSwift'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/SwiftCharts'
: Directory not found for option '-F/Users/Project-gwajzqdypdbykjhkkbcpqgffxwio/Build/Products/Debug-iphonesimulator/SwiftGraph'
: Linker command failed with exit code 1 (use -v to see invocation)
In the editor:
ld: framework not found SwiftCharts
Underneath DerivedData, in the folder Debug-iphonesimulator, I'm not seeing any frameworks that the warnings are indicating should be there. Why are the framework directories missing, and why is SwiftCharts installing but not available to the linker?
Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '12.1'
target 'ProjectCoreData' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'SwiftCharts', '~> 0.6.3'
pod 'SwiftGraph'
pod 'OverlayContainer'
pod 'RealmSwift'
# Pods for ProjectCoreData
target 'ProjectCoreDataTests' do
inherit! :search_paths
# Pods for testing
end
target 'ProjectCoreDataUITests' do
inherit! :search_paths
# Pods for testing
end
"Podfile" 24L, 549C
Podfile.lock:
PODS:
- OverlayContainer (2.0.0)
- Realm (3.14.1):
- Realm/Headers (= 3.14.1)
- Realm/Headers (3.14.1)
- RealmSwift (3.14.1):
- Realm (= 3.14.1)
- SwiftCharts (0.6.5)
- SwiftGraph (3.0.0)
DEPENDENCIES:
- OverlayContainer
- RealmSwift
- SwiftCharts (~> 0.6.3)
- SwiftGraph
I think it's because SwiftCharts (0.6.5) is built for swift 5.0 with Xcode 10.2, so it's not compatible with Xcode 10.1, just use older version of SwiftCharts (0.6.3 or older).
I want to integrate this into my app
https://cocoapods.org/pods/SwipeCellKit
so I add this line
pod 'SwipeCellKit'
into my pod file and run pod install
platform :ios, '9.0'
target 'ListHue' do
use_frameworks!
pod 'RealmSwift'
pod 'SwipeCellKit'
end
After installed, I got these message
Analyzing dependencies
Downloading dependencies
Using Realm (3.7.4)
Using RealmSwift (3.7.4)
Using SwipeCellKit (2.4.3)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 3 total pods installed.
I'm not sure why when I tried to import it XCode was yelling at me.
What did I do wrong ?
I'm trying to integrate Firebase-Analytics in my Unity 2013.3.1 project.
After following the integration guide, I've tried to build the project.
However, Unity fails to build. The reason seems to be cocoapods.
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/Analytics":
In Podfile:
Firebase/Analytics (= 4.8.1)
None of your spec sources contain a spec satisfying the dependency: `Firebase/Analytics (= 4.8.1)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
I've tried to reinstall cocoapods and re-run pod setup, and also deleting the repo and re-setupping using rm -rf ~/.cocoapods/repos/master, but I had no success.
Here's the generated Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
target 'Unity-iPhone' do
pod 'Firebase/Analytics', '4.8.1'
pod 'Firebase/Core', '4.8.1'
end
One last thing I've tried was to remove the specific version tags into the Podfile (I've removed the '4.8.1'). This fixed the pod install, however I couldn't find a way to have a successfull build from unity, since the Podfile is auto-generated.
Here's the pod install output after removing the version tag:
Analyzing dependencies
Downloading dependencies
Installing Firebase (4.9.0)
Installing FirebaseAnalytics (4.0.9)
Installing FirebaseCore (4.0.15)
Installing FirebaseInstanceID (2.0.9)
Installing GoogleToolboxForMac (2.1.3)
Installing nanopb (0.3.8)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `Unity-iPhone.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 6 total pods installed.
It looks like FirebaseAnalytics is currently at version 4.0.9, not 4.8.1.
Did anyone have similar issues?
Update to the 4.4.2 release.
Or to workaround with 4.4.1:
Manually edited each of Dependencies.xml files in Assets/Firebase/Editor to change the version from 4.8.1 to 4.8.2. Example:
<iosPods>
<!-- Mike changed this from 4.8.1 to 4.8.2 -->
<iosPod name="Firebase/Analytics" version="4.8.2" minTargetSdk="7.0">
</iosPod>
</iosPods>
Reference and additional detail here.
The version of FirebaseAnalytics used by Firebase 4.9 is 4.0.9, not 4.8.1. See the podspec for reference.
Another possible issue for failing is that your dependency (iOS 7) is too old and it's not supported by Xcode 9, nor by the latest version of Firebase.
Replace
platform :ios, '7.0'
with
platform :ios, '8.0'
I have the following cocoapods Podfile
platform :ios, '8.0'
use_frameworks!
target 'Foo' do
pod "SwiftyJSON", '~> 2.2.0'
pod "Locksmith"
pod "GoogleMaps"
pod "RealmSwift"
end
target 'FooTests' do
end
I'm also using cocoapods 0.37.2. For some reason, when I try to run the app, it complains with the following error, when clearly I have specified that my project requires SwiftyJSON 2.2.0 or greater:
Reason: Incompatible library version: Foo requires version 2.0.0 or later, but SwiftyJSON provides version 1.0.0
I have verified that there's no other dependencies on SwiftyJSON (using cocoapods-dependencies):
$pod dependencies
Dependencies
---
- GoogleMaps (1.10.1)
- Locksmith (1.2.2)
- Realm (0.93.2):
- Realm/Headers (= 0.93.2)
- Realm/Headers (0.93.2)
- RealmSwift (0.93.2):
- Realm (= 0.93.2)
- SwiftyJSON (2.2.0)
As you can see, no one is pulling SwiftyJSON 1.0.0. By the way, the reason I'm using cocoapods 0.37.2 is because of this bug when I tried to use 0.38.1: https://github.com/CocoaPods/CocoaPods/issues/3890.
Have I missed anything here (regarding the SwiftyJSON version mismatch) ? I've tried cleaning the project, redoing pod install, etc without any luck..
Thanks in advance!
For me (and for you it seems), the following worked:
Remove guilty pods from podfile (in my case, AFNetworking and AFNetworkActivityLogger)
pod install to wipe them out
Upgrade (or downgrade if you're on 0.38.1) to cocoapods 0.38.0
Add pods back & pod install
Now I'm back in business... I believe 0.38.1 was responsible for getting me into this mess.