I'm trying to add the Facebook SDK to one of my Flutter projects. In a regular Podfile, it'd look something like this:
# Pods for facebooklogintest
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod ‘FBSDKLoginKit’
With "facebooklogintest" being the name of my project. The Podfile in Flutter projects looks a bit different. Is it correct to add the pod files under "# Pods for Runner"?
# Pods for Runner
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod ‘FBSDKLoginKit’
I'm getting the following error when I try to install it as shown above:
[!] Invalid `Podfile` file: Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework.
Where and to where should I point this file to get rid of this error?
Try this :
def fbPods
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod ‘FBSDKLoginKit’
end
target 'facebooklogintest' do
fbPods
end
target 'Runner' do
fbPods
end
Run this command
pod install --no-repo-update
In bash_profile,
export FLUTTER_FRAMEWORK_DIR=/flutter/bin/cache/artifacts/engine/ios
source ~/.bash_profile
In iOS folder,
pod install
Related
I've got this annoying error for number of days now:
I've tried:
Deleting pods folder & pod file & pod.lock file & .workspace file and reinstalling pods again.
removing all library search paths in pods.xconfig file
this is my pod file :
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
target 'MyApp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for MyApp
pod 'Firebase'
pod 'Bolts'
pod 'Firebase/Firestore'
pod 'Google-Mobile-Ads-SDK'
pod 'Fabric'
pod 'Crashlytics'
pod 'PersonalizedAdConsent'
pod 'Highcharts', '~> 6.1.0'
pod 'FBSDKCoreKit'
pod 'GoogleToolboxForMac'
pod 'FirebaseAnalytics'
end
This is my problem, If you need any other indications or code about my issue, feel free to leave me a comment and I'll edit the question
Try to run following commands in Terminal (in your project's folder):
pod deintegrate // removes all pod related configurations from your project
rm Podfile.lock //removes the saved reference to the pods
pod install // reinstalls the pods
Clean your project (In Xcode: ⌘+K and ⌘+Shift+K)
And finally make sure you compile the same target from which the error originates (You should be able to see the target it originates from within the issue navigator ⌘+5)
I am trying to install two pods to my Xcode project from terminal. I initially had installed a pod called PRAugmentedReality, and it worked fine. Then I tried adding the pod BFTransmitter, and started getting the following error message:
[!] Unable to find a specification for 'PRAugmentedReality'
If I remove the PRAugmentedReality pod and install with just BFTransmitter, it also works fine. So basically I am able to install either on their own, but not together.
My podfile looks like this:
#source for BFTransmitter
source 'https://bitbucket.org/bridgefy/bridgefypods.git'
target 'FWF' do
pod 'BFTransmitter'
pod 'PRAugmentedReality'
target 'FWFTests' do
inherit! :search_paths
end
end
I have tried repo remove master pod setup and then pod install, still no luck.
just add source to install both pods together check my podFile and add sourced before your target as I did
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'
source 'https://bitbucket.org/bridgefy/bridgefypods.git'
target 'pod' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'BFTransmitter'
pod 'PRAugmentedReality'
# Pods for pod
end
Result
I encounter the same problem in my project.
When I was editing pod file, I changed pod 'SCSoftKycSolutionSdkSource' to pod 'MyprojectName'.
I fixed the below, issue fixed.
pod 'SCSoftKycSolutionSdkSource'
After I added new dependency to my project and run pod install, I have duplicate target in my workspace(.xcworkspace) as below:
And this is the pod file structure:
platform :ios, '8.0'
use_frameworks!
pod 'AFNetworking', '~> 2.6'
pod 'Fabric'
pod 'Crashlytics'
pod 'SocketRocket'
I restart the project and also Xcode, but it does not help. What is the reason and how can I solve the problem?
First, try to wrap your pods with target specification, like this:
target 'TargetName' do
pod 'Fabric'
pod 'Crashlytics'
#other pods
end
Delete your .xcworkspace, podfile.lock and pods folder, just as #SukruK suggested.
Do pod install again and open the workspace created.
You can do the following instructions in order to fix this configuration issue CocoaPods did not set the base configuration of your project because your project already has a custom config set.
Go to your project settings
Set None configuration set for both Pods-related targets
Run pod install again
I just opened my project in Xcode 8.0 and tried to build it, but the following "PBXCp Error Group" appeared:
error: /Users/username/Documents/XYZ/build/Debug-iphoneos/AFNetworking.framework: No such file or directory
My Podfile is below:
platform :ios, '10.0'
use_frameworks!
target 'XYZ' do
pod "MSSTabbedPageViewController"
pod "SKStatefulTableViewController", "~> 0.1"
pod "QBFlatButton"
pod "LTNavigationBar"
pod "KBRoundedButton"
pod "CTCheckbox"
pod "SKStatefulTableViewController", "~> 0.1"
pod "SDWebImage"
pod "TOCropViewController"
pod "UIImageViewAligned"
pod "AFNetworking"
pod "MBProgressHUD"
pod "JSONModel"
pod "CWStatusBarNotification"
pod "Firebase/Messaging"
pod "MaterialControls"
pod "Fabric"
pod "Crashlytics"
end
Pod is installed and OK.
I don't know what I did, since Cocoapods seems to be in the build folder.
I've had the same issue. Adding and removing AFNetworking from podfile didn't help at all. The only thing that worked for me was to remove AFNetworking.framework and add it again from correct path. The original path was pointing to wrong direction...
change the platform :ios, '10.0' to older platform and update pod file it will work fine for me.
try to add it properly because i had recently install all pod file in my side it working fine for me.remove your pod file and then install it.
Checking the item "Copy only when installing" in build setting just worked for me.
When I enter pod 'Firebase/Auth' it isn't installing the pod. Its saying this: [!] Unable to satisfy the following requirements:
Firebase/Auth required by Podfile
None of your spec sources contain a spec satisfying the dependency: Firebase/Auth.
You have either:
out-of-date source repos which you can update with pod 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.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
I have said in the pod file - pod 'Firebase' and that is installing fine, but I don't know why 'Firebase/Auth' isn't installing.
This is using swift and Xcode is any of you were wondering, please can someone suggest what I can do to solve this, thanks
This is the pod file:
platform: ios, '8.0'
use_frameworks!
target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'
end
EDIT:
The solution was just to 'pod repo update' which worked perfectly. However now I have 27 error messages - Please help!
I did more or less than the guy told us
but my steps were a little different:
On the Terminal: go to your project folder:
1.1 sudo Desktop/YourApp
1.2 YOURMAC:YourApp Fernanda$ sudo pod init
Change your file Podfile to:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
end
On the Terminal: pod install
Now, change your file Podfile again to:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
pod 'Firebase/Auth'
end
On the Terminal: pod update
try update platform version 8.0 to 9.0
platform: ios, '9.0'
use_frameworks!
target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'
end