How to install Google Api with cocoa pod - ios

I'm not able to install google api with cocoa pods
This is my pod:
platform :ios, '8.0'
use_frameworks!
target 'testGoogleFacebook' do
pod 'Google-API-Client', '~> 1.0'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
end
It install Facebook perfect, but with Google I get this:
[!] Error installing Google-API-Client
[!] /usr/local/bin/svn export --non-interactive --trust-server-cert --force http://google-api-objectivec-client.googlecode.com/svn/trunk/ -r 422 /var/folders/kk/fyg7f_cx1pxfxh6p377c48rw0000gn/T/d20150907-5479-kgjbk4
How can install it? I only need to log in with Google with Gmail scope
Thanks a lot!

Check your SVN version
svn --version
Mine was 1.6.9
Ended up removing the current version
rm '/usr/local/bin/svn'
Then installing a newer version
brew install subversion
It seems to work with the one that was installed 1.8.13

I found a discussion about the SDK and it seems Google-API-Client was never an official pod.
What you're looking for is the GoogleAPIClient, which was mentioned here.

Related

How to install LinqToObjectiveC cocoapod?

I use pod 'LinqToObjectiveC' to install this specific cocoapod but i get back [!] Unknown command: LinqToObjectiveC
Did you mean: deintegrate?
There are no specific instructions at https://cocoapods.org/pods/LinqToObjectiveC
I do not know if i can install it using the pod command or not.
Any help to install it via pod command?
You need to add the following lines to your Podfile:
pod 'LinqToObjectiveC', '~> 2.1'
more info: https://cocoapods.org/pods/LinqToObjectiveC

Cocoapods not installing latest version of FBSDK

I have installed FBSDK in my swift project. As I checked on GitHub the latest version of
facebook-ios-sdk is 9.1.0, but when I installed it showed 5.15.1.
In my pod file:
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
Check if you have another dependency on this library which needs this "5.15.1" version. If there isn't any: follow this
Have you tried to update cocoapods?
sudo gem install cocoapods

None of your spec sources contain a spec satisfying the dependencies: Firebase (~> 6.33.0), Firebase (= 6.33.0, ~> 6.33.0)

I am implementing some of the firebase SDKs into my pods, but I am having an issue with versioning them. I want to set Firebase 6.33. I did check the pod spec of this version and updated my pods according to that.
pod 'Firebase', '~> 6.33.0'
pod 'FirebaseCore', '~> 6.10.3'
pod 'FirebasePerformance', '~> 3.3.0'
pod 'FirebaseRemoteConfig', '~> 4.9.0'
pod 'FirebaseAnalytics', '~> 6.8.3'
pod 'FirebaseCrashlytics', '~> 4.6.1'
When I use the codes above, it gives me this error on jenkins:
None of your spec sources contain a spec satisfying the dependencies:
Firebase (~> 6.33.0), Firebase (= 6.33.0, ~> 6.33.0).
I did pod deintegrate first and pod install to do a clean installation. It doesn't give the error on my MacBook but on jenkins.
podspec.json: https://github.com/CocoaPods/Specs/blob/master/Specs/0/3/5/Firebase/6.33.0/Firebase.podspec.json
for Apple M1 users 👇
Inside your ios Folder follow these commands in terminal
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
If not work try this
arch -x86_64 pod install --repo-update
for Apple Intel users 👇
pod install --repo-update
pod install --repo-update
to update to recent published CocoaPods pods.
For who is here with a Mac M1, trying to run pod install --repo-update in the VSCode terminal without success, the solution I found was:
Find the native Terminal on Applications
Make sure it is running with Rosetta (right click on Terminal > Obtain Information > Check Open With Rosetta)
Open the terminal
cd path_to_your_ios_folder and run pod install --repo-update. That should work!
I am using:
Pod: 1.11.0
firebase_core: ^1.6.0
firebase_crashlytics: ^2.2.1
firebase_analytics: ^8.3.1
firebase_messaging: ^10.0.6
flutter: 2.2.3
This did it for me
rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/.pub-cache/hosted/pub.dartlang.org
pod cache clean --all
flutter clean
flutter pub get
pod repo update
pod install
Why all the different versions of firebase specified? For me I had three different Firebase related plugins (Analytics / Dynamiclinks / Firebasex). Each of these had a different source it was trying to pull from (some v 7.0.0 and some v 6.33.0). I went into the podfile and changed all of the versions to 6.33.0 and was able to build then.

Firebase CocoaPods Installation Not Working

I'm trying to install Firebase via CocoaPods for my Objective-C iOS Application. My Podfile is as follows:
target 'RandomName' do
pod 'Firebase/Core'
pod 'Firebase/AdMob'
end
When I run pod install, I get the following error:
[!] Unable to satisfy the following requirements:
- `Firebase/Core` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Firebase/Core`.
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.
The latest version of CocoaPods is installed, and I have tried running pod repo update. Having a Podfile of the following works fine, but when I try to #import Firebase; in my AppDelegate.m file, Xcode cannot find the module.
target 'RandomName' do
pod 'Firebase'
end
However, the following combination does not install:
target 'RandomName' do
pod 'Firebase'
pod 'Firebase/AdMob'
end
Any help would be appreciated!
Check what version of Firebase is installed when you use pod 'Firebase'. For me it installs 2.4.3 which is an old version. The docs say that the pod should install 3.2 using that pod. It explains why the other pods don't work as they are part of Firebase 3. Pod update doesn't update Firebase to the latest version either. Even forcing a version doesn't work. It can't seem to find the new Firebase versions even though they are in the same podspec.
Here is how I solved it:
make sure you have the latest version of git installed
make sure you have cocoapods >= 1.0.0 installed
delete your pods repo (run pod repo remove master) and use pod setup to make a new one
use the following in your pod file
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Core'
(use whatever you want, just don't use 'Firebase')
pod install
everything should install properly
Running 'pod repo remove master' to remove the Pods repo //removes the library
Running 'pod setup' //clones the updated git repo for specs which takes long time as its size is beyond 300K (Be patient!)
Running 'pod install' //problem is solved
have you tried to add
frameworks
use_frameworks!
after target 'RandomName' line
and adding
platform :ios, '9.0'
before target ....
A couple of items to try. From your question, you did try the first two items, but leaving here for completeness of my answer.
The error response you get is helpful. Follow the steps for pod repo update
Make sure your pod is up to date.
pwd> pod --version
1.0.0
Make certain that your git is up to date. I had a build machine that had an outdated git (1.7), and I had the same exact error
-
When I updated to this version from git 1.7 it worked fine.
pwd> git --version
git version 2.8.1
My Podfile for using Firebase Dynamic Links
run pod init from the folder where your .xcodeproj is
Be sure to only launch the .xcworkspace instead of the .xcodeproj from here out.
platform :ios, '8.0'
use_frameworks!
target 'the-name-of-target' do
pod 'Firebase/DynamicLinks'
end
The Same problem occurred while on pod install command.
Please relaunch terminal and navigate to your Xcode project then
simply fire same pod install command. 'Firebase/Database' will installed successfully :)
I just doing following step to fix this error:
$pod setup -- verbose
Then do $pod install
that works for me and my pod file is:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'the-name-of-target' do
pod 'Eureka', '~> 1.6'
end
UPDATE:
Then you can remove your master and re-install cocoapods using following code:
cd ~/.cocoapods/repos
rm -rf master
pod setup
I had the same error, and my solution was to downgrade Cocoapods to 1.0.0, because Cocoapods 1.0.1 didn't work as I expected. Everything works great now!
sudo gem uninstall cocoapods -v 1.0.1
sudo gem install cocoapods -v 1.0.0
My Podfile:
platform :ios, '8.0'
target 'XXX' do
pod 'Firebase/Auth'
pod 'Firebase/Database'
end
For people still having problems with this. When directly coping the firebase walkthourgh website, the install string is:
pod `Firebase/Core`
While it should have been:
pod 'Firebase/Core'
No need for pod setup if this applies to you too.
Update Git and Cocoapods to the last version:
Git: $ brew update && brew upgrade
Cocoapods: $ pod repo update

Warining . Cocoa pods --> Pod install issue

When pod install , get this warning .How to solve the question? Please help me.Thank U very much.
[[!]Your Podfile requires that the plugin cocoapods-no-dev-schemes
be installed. Please install it and try installation again.]
If you have shown your podfile it will more helpful still you can try
sudo gem install cocoapods-no-dev-schemes and after it installs successfully you can try installing the pods again
Or
You can make the podfile structure to default structure in which you don't need any additional plugin like this:
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'AFNetworking', '~> 2.6'
pod 'ORStackView', '~> 3.0'
pod 'SwiftyJSON', '~> 2.3'
end
I tried below steps from terminal
$ sudo gem install cocoapods-repo-update
Then fire
$ pod install
This should work now.
Background :
cocoapods-repo-update is a CocoaPods plugin that checks your dependencies when you run pod install and updates the local specs repositories if needed.
As of CocoaPods 1.0, pod install does not update the master specs repo every time it is run. This is because CocoaPods was hammering Github with this behavior. Now the specs repo must be explicitly updated with pod repo update or pod install --repo-update.
This plugin checks if your CocoaPods specs repo needs to be updated when pod install is run and updates it if needed. This eliminates the need to run pod repo update or pod install --repo-update when you change a pod.
Source: https://github.com/wordpress-mobile/cocoapods-repo-update

Resources