I am using Cocoapods to manage my Admob/Google ad-related frameworks.
My pod file is as follows:
target 'SKGameTest' do
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/AdMob'
pod 'Google-Mobile-Ads-SDK'
end
I have updated Firebase and Google-Mobile-Ads-SDK using the Cocoapods app. Now that these frameworks have been updated, will all current versions of my app use these latest frameworks? Or will my app users have to download a new update containing these updated frameworks? If the last option (downloading a new update for the app) is true, then this would be really annoying as you would have to release a new update for your app each time Google updates their SDKs.
Please explain to me about how this all works, thank you.
I have gone through some testing and have discovered that updating Cocoapods will not update all versions of the app (unfortunately). When updating your SDKs you will need to release a new version with it.
Related
I have an old Objective-C project that contains Firebase/Core and Firebase/Messaging. I have to upgrade all those librairies and add other Firebase products. In the documentation there is no mention of the versions only the libraries name like this pod 'Firebase/Messaging'. Even if I try a pod install remove the libraries names from the PodFile make pod install to remove them, then re-add them in the PodFile and make pod install I find in the PodFile.lock that the installed versions are not the last ones.
How is it possible to upgrade Firebase libraries installed by CocoaPods in order to get the last versions on an Objective-C project ?
The min iOS deployement target is: 8.0
Use pod update instead of pod install to get the latest versions. If you're still not getting latest versions, examine the Podfile.lock file to see what dependencies restrict the version.
When I try to update my Firebase through cocoapods, Always its updating to 3.17.0 version - which is old. As per firebase docs, 6.4.0 is the latest version for iOS. Why i am not able to update to latest.
I have tried multiple ways to resolve this. But no luck.
FireBase Cocoa Pods Installation Not Working
FireBase Cocoa Pods Installation Not Working
platform :ios, '10.0'
use_frameworks!
target 'the-name-of-target' do
pod 'Firebase'
end
I should be able to update to latest firebase framework.
Edit: Solved with workaround.
Google Signin framework having the dependency. As work around removed google sigenin pod & added as framework. Now i am able to update to latest the firebase to latest. Thanks.
Try to clear pods cache and reinstall CocoaPods
Have you tried updating pods?
command for update all pods
pod update
for specific pod
pod update POD_NAME
Examine the generated Podfile.lock to see which dependency forces Firebase's version to 3.x.
Recently I have updated the Below mentioned pods for FacebookLogin Button implemented in my app
pod 'FacebookCore'
pod 'FacebookLogin'
The versions of both pods are 0.7.0
I had updated the pods using the command
pod update
After updating the when I built the project there is an error in the path
Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.m:163:60: No known class method for selector 'objectForJSONString:error:'
Both these errors is occurring in two places in the same class
No known class method for selector 'objectForJSONString:error:'
NSDictionary<id, id> *clientState = [FBSDKBasicUtility objectForJSONString:parameters[FBSDKLoginManagerLoggingClientStateKey] error:NULL];
I had to change FBSDKBasicUtility to FBSDKInternalUtility. Xcode will prompt you to unlock the files to make the change.
I have also received a notification from Facebook to upgrade the Facebook SDK to 5.0.(Previously it was 4.39.0) Below is the link which shows the latest features of Facebook SDK :
https://developers.facebook.com/docs/app-events/upgrade-guide
If you want to use these then you have to update the SDK and at code level integrate new pods for Facebook as shown in the above link.
If you don't want to use these features then you have to restrict your pods to a specific version so in future pod update the Facebook pods are not changed.
Hope this helps.
I did my R&D, there was no solution.
I solved it by just removing the entire FacebookLogin Pods,
#pod 'FacebookCore'
#pod 'FacebookLogin'
Then Built the project, and then re-installed the same pods with the latest version to 5.0, then the issue seems to solved.
I had to use Xcode 10 to build an app to support older iOS versions. I would get this error when running to a device (but not a simulator). This error would go away once I started using Xcode 11 again.
OK, apologies if this may come across as a 'green' question ...
I have incorporated the Google AdMob SDK via CocoaPods successfully.
My pod file looks like:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
So my Podfile should automatically 'grab' any version 'newer' than version 7.0.
I am still developing my app, and when I run tests on my physical device, I am presented with this type of message in the console:
You are currently using version 7.8.0 of the SDK. Please
consider updating your SDK to the most recent SDK version to get the
latest features and bug fixes. The latest SDK can be downloaded from
....
So I run Podinstall command via the terminal targeting my relevant directory that holds my development app's latest Xcode project, and it updates all relevant Google Mobile Ad SDKs to the current version.
I guess while my app is not 'live', my Podfile is essentially inactive in terms of updating itself automatically.
Question : If I were to upload my project today to the App Store with my Podfile updated to the most current Google AdMob SDK version, will it automatically update my project to the most current version thereafter? Are the three (3) lines of code in my Podfile sufficient?
Many thanks and apologies in advance if this is an extremely basic question ;)
I am fairly new to CocoaPods myself so I am not 100% what you mean with
"I guess while my app is not 'live', my Podfile is essentially inactive in terms of updating itself automatically."
I believe to update your Pods you need to run the Update command, it does not update itself automatically.
If I were to upload my project today to the App Store with my Podfile updated to the most current Google AdMob SDK version, will it automatically update my project to the most current version thereafter?
I believe no, you need to run podUpdate.
Are the three (3) lines of code in my Podfile sufficient?
Should be
This is how my pod files looks
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'MyGame (iOS)' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
pod 'ChartboostSDK'
# Pods for MyGame (iOS)
target 'MyGame (iOS) Tests' do
inherit! :search_paths
# Pods for testing
end
end
CocoaPods actually released an app for OSX recently, which makes using it a lot easier
https://cocoapods.org/app
To read more update pod updates vs installs you should read this.
https://guides.cocoapods.org/using/pod-install-vs-update.html
Or a great swift tutorial from ray wenderlich
https://www.raywenderlich.com/97014/use-cocoapods-with-swift
Hope this helps
This was building previously but isn't anymore. I updated cocoapods and pulled new data in with pod update but still can't build my iOS 9.0 app anymore:
/Users/cdub/Developer/AppName/Pods/Headers/Public/
AWSCognito/AWSCognitoSyncService.h:198:4:
Type arguments cannot be applied to non-parameterized class 'AWSTask'
Why is this happening?
The version of AWSCore and AWSCognito need to match. It looks like your AWSCognito is newer than AWSCore. How did you get AWSCognito and AWSCore? Both through CocoaPods? You need to use pod update when updating the pods instead of pod install.
If you keep encountering the issue, you should delete Podfile.lock and Pods/ and then run pod install to cleanly install the SDK. AWS Mobile SDK iOS Developer Guide has more information about how to setup the SDK.