when npm install command runs, It installs all the packages mentioned in the package.json.
when pod install command is run, which is the base file to install all required pods?
Is there any file in iOS like package.json that decides which pods have to be installed?
The Podfile itself. It's a ruby file looking something like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ProjectName' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'Alamofire', '5.6.2'
end
My iOS app isn't working anymore, and I have no idea what to do anymore.
I removed all pod addons, removed Podfile.lock made a pod deintegrate, made a rm -rf ~/.cocoapods/repos/trunk/, and a rm -rf /Users/antoinenedelec/Library/Developer/Xcode/DerivedData/*, and removed my .xcworkspace file.
My Podfile contains then:
# Uncomment the next line to define a global platform for your project
# platform :ios, '13.2'
target 'la soundbox' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# FIRE BASE & GOOGLE AD MOB
#pod 'Firebase/Auth'
#pod 'Firebase/Firestore'
#pod 'Firebase/Analytics'
#pod 'Google-Mobile-Ads-SDK'
end
Then I make a pod install, launched the new .xcworkspace file.
I a on deployment Target 13.2 on my target and on my project.
If I compile I have a lot of errors because I have dependencies with those project.
If I add ANY of the pod up there and make a pod install. I have dependencies error, missing package like the following:
framework not found fblpromises
34 duplicate symbols for architecture armv7
gRPC-C++ memory error xcode
Framework not found "googleutilities"...
I never have the same error.. Why can't I simply add all the pods, make a pod update and run my project ?
I'm totally lost right now.. Any Ideas ?
Try to create a new project, copy all your files with code, except pods. And then init and install your pods again.
I want to config Firebase Firestore. I followed all the steps, but at the last step, I got the error link below I mention.
After Executing this pod install command below error I got
[!] Automatically assigning platform ios with version 11.4 on
target testing_gowtham because no platform was specified. Please
specify a platform for this target in your Podfile. See
https://guides.cocoapods.org/syntax/podfile.html#platform.
My podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'testing_gowtham' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for testing_gowtham
target 'testing_gowthamTests' do
inherit! :search_paths
# Pods for testing
end
target 'testing_gowthamUITests' do
inherit! :search_paths
# Pods for testing
end
pod 'Firebase/Core'
pod 'Firebase/Firestore'
end
I saw this https://guides.cocoapods.org/syntax/podfile.html#platform but I did not find which line I need to change .
How to solve this issue?
Replace your whole pod file text with below text and then check.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'testing_gowtham' do
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Firestore'
end
(or) solution 2
platform :ios, '9.0' is working...I simply removed # this
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'testing_gowtham' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for testing_gowtham
pod 'Firebase/Core'
pod 'Firebase/Firestore'
end
In your Podfile ->
Uncomment platform and set ios : 10.0
platform :ios, '10.0'
this will work.
If the above error occurs when you install pod 'PusherSwift' and pod 'AlamofireImage' you have to remove # symbol from
# platform :ios, '9.0'.
Then write the command pod install in your terminal.
When you run the project again the error will appear according to 'pusher swift'.you have to click unblock option. Then the problem is successfully solved.
Delete Podfile.lock file and run pod install.
I got this issue by changing the target iOS version and developing application on more devices.
Worked for me, but be careful - it will replace all, let's say, locked (cached) versions of libraries, that you are using. Check yourself that you fully understand what Podfile.lock file does here --> https://guides.cocoapods.org/using/using-cocoapods.html
Updated answer for 2022.
This is due to your minimum deployment target being less than iOS 10. According to the Firebase ios setup documentation, your project must target ios platform versions iOS 10 or later:
command $ flutter clean
open the Podfile in the directory ios/Podfile
uncomment the line platform :ios, '9.0' and change 9.0 to 10.0
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
save the file
$ flutter run
For Apple Silicon M1 chips:
Edit ./ios/Podfile
platform :ios, '11.4' or whatever version
Install ffi arch -x86_64 sudo gem install ffi
Reinstall pods
flutter clean
cd ios
arch -x86_64 pod install
cd ..
flutter run
You shouldn't remove everything inside Podfile, just Uncomment this line:
platform :ios, '9.0'
from ios/Podfile
The simplest answer is uncomment second line of Podfile and change the iOS version to 10 like this. Note that the very next following Xcode build will take a bit more time than usual. I don't know why...
platform :ios, '10.0'
In Flutter project, I Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version.
Solution:-
flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
cd ios
pod install
cd ..
flutter build ios
In side the Podfile
Specifying the platform version on your plaform
Remove the # platform :ios, '9.0'
# platform :ios, '9.0' ( comment note)
Write it like these
platform :ios, '13.0'
platform :ios, '9.0' is working...I simply removed # this
In my case it was because of an old project which I didn't run for like 6 months.
I just created a new Flutter project using this command
flutter create -i swift -a kotlin project_name
And moved the ios folder to my project, run it and it works!
I have got this error many times while running flutter firebase project.
Simple solution is:
Replace:
# platform :ios, '9.0' with platform :ios, '9.0'
Actually # make it commented so we are just uncommenting it.
pod update and pod install again
cd iOS
run the following -
pod deintegrate --verbose
sudo gem pristine ffi --version 1.14.2
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
You have to remove # symbol from
cd ios
open podfile
and remove # symbol and save this file
#platform :ios, '9.0'.
Then write the command pod install in your terminal.
To solve this :
open your pod file in Andriod Studio --> ios--> Podfile then you will see at the top of the file a commented out example:
platform :ios, '9.0'
uncomment this line and re-run the app to see if it works. If it's still not working then change the version to match your minimum requirement. I've set mine to iOS 12 as one of my dependencies required this.
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'
I am using pods first time in the project . I created a new project and followed following process :
Downloaded master from the github ,as terminal asked me to do it manually
fired : pod init method . This command generated Podfile in my Xcode project folder
Then I added a line in the pod file : pod 'Alamofire', '2.0.2'
4 . Then I fired pod install command and I am getting following error in the terminal window :
Setting up CocoaPods master repo
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
I am following this tutorial :
https://www.raywenderlich.com/97014/use-cocoapods-with-swift
Please suggest workaround for this issue.
following is my pod file :
platform :ios, "8.0"
use_frameworks!
target 'PodsTest' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for PodsTest
pod 'Alamofire', '2.0.2'
target 'PodsTestTests' do
inherit! :search_paths
# Pods for testing
end
target 'PodsTestUITests' do
inherit! :search_paths
# Pods for testing
end
end
In you pod file mention the code like this.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '2.0.2'
and then try pod install
You just need to update repo
Run pod repo update on terminal.
Try to use latest Alamofire => pod 'Alamofire', '~> 4.0'
Hope it will help you.
Are your Command Line Tools set up correctly according to the Xcode version you are using?
In Terminal:
sudo xcode-select -r
And then in XCode:
Xcode -> Preferences -> Locations -> Command Line Tools
worthwhile checking, this might cause the problem