Setting clientID for GIDSignIn in iOS app crashes - ios

I try to use GIDSignIn in my iOS app (ObjC). But when I do
[GIDSignIn sharedInstance].clientID = GID_SIGN_IN_KEY;
in my app-delegate, I get and error unrecognized selector sent to instance.
I'm using cocoapods to load the framework
pod 'GoogleSignIn'
pod 'GTMAppAuth'
pod 'AppAuth'
I configured the URL-scheme in my info.plist as described in the docs.
I'm building the app for iOS 14.
As suggested in countless posts on the web, I load libz.tbd, SystemConfiguration.framework, StoreKit.framework, AddressBook.framework and I set -ObjC in my other linker flags.
Alas, I'm still getting this error.
Any Ideas?

So, it turns out the Google docs for the Youtube-API are outdated (again).
I had to use dependencies (github) instead of the pod-version of GIDSignIn. Then the signup-process worked.
Uploading a video was another pain in the a** since the docs use an outdated version of the GIDGoogleUser…
I will spare you my rant on Google now…

Related

[GMSCachedTile setVersionID:]: unrecognized selector

I have integrated google maps SDK 2.7.0 in one of my iPhone application.
I made all configuration related to it and added all frameworks.
When I run application it gets crash with error -"[GMSCachedTile setVersionID:]: unrecognized selector".
I searched on internet but I didn't get any answer related to GMSCachedTile.
I have the same issue.
In the end, I found that there was two copy of GoogleMaps.bundle in my project.
One was in project source, and the other was in pods.
So I removed one of them. (I kept the pods one.)
And the crash never happened again.
Hope this helps.
When I upgrade my Xcode from 9.4.1 to 10.0 and my SE iOS from 11 to 12, my app encounters same question, I solve this by removing Google Maps integrated manually and keeping Google Maps imported by Pod. Then everything is OK again.
I had the same issue. If you have added Google Maps manually i.e added in Linked Frameworks and Libraries and also through the Pods then you should go ahead and delete the manually added one.
Since only the VersionInfo.plist was creating the problem, I deleted it from the manually added GoogleMaps.framework.
You can find the VersionInfo.plist file at this path
XCODEPROJECT/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd
It worked for me.

FBSDKcorekit shared application is unavailable

I am using Pod and all are the lastest version
Using
Pod onesignal
Pod facebook login
Target ‘onesignalnotificationextention’do
Pod ‘onesignal’
end
Onesignal is an notification service extension
Facebooklogin is working when onesignal are removed
But it give this error when both are used
‘sharedapplication’ is unavailable:not available on ios(app extension) -use view controller based solutions where appropriate
How to solve this?
Error in code
This is in FBSDKAppEvent.m
Uiviewcontrollwr *vc =[uiapplication sharedApplication].keyWindow.rootViewcontroller.presentedViewcontroller;
please help, i can't find anything?
so i solved this problem
the problem was that i only
set
require only App-Extension-Safe Api to no
in myproject.xcodeproe and the targets
it seemed the all the facebook pods were to yes
so i have to set no for all xcodeproject,target,all facebook pods
you can find require only App-Extension-Safe Api
in build setting for pods,target,and project
important note when ever you reinstall pods they are reseted to yes

Firebase, Fabric, & Crashlytics with -ObjC linker flag without Cocoapods iOS

Trying to add Firebase Messaging to my iOS app that already has Fabric/Crashlytics and I am trying to add it without Cocoapods.
I followed the readme instructions in the Firebase SDK zip file and once I add the -ObjC linker flag to the target, it causes a duplicate symbol compile error for Fabric/Crashlytics
I then found out to use -force_load and pointed it to the Firebase.h file. This allowed me to compile, but when trying to FIRAPP.configure() it came up with this error:
2016-11-30 14:33:31.862 Parents[243] <Debug> [Firebase/Core][I-COR000001]
Configuring the default app.
2016-11-30 14:33:32.029 Parents[243:24612] +[NSData gtm_dataByGzippingData:error:]:
unrecognized selector sent to class 0x3159a53c
Has anyone ever experienced this before? Please note I am not using Cocoapods for all three.
I actually had the same exact problem. My awesome coworker suggested to update Fabric and Crashlytics to the latest and it worked. Try that!

'Linker command failed with exit code 1' when using Google Analytics via CocoaPods

I'm trying to add Google Analytics to an iOS app written in Swift. I've followed the guide that adds the frameworks via CocoaPods and added a bridging header but I'm still getting:
Linker command failed with exit code 1
My podfile does have use_frameworks! so I'm wondering if that has anything to do with it... there is no additional information on the Analytics site from what I can see.
EDIT:
I've noticed that after viewing the full error message the following is displayed:
ld: '/Users/simon/Programming/VenueNow/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib.a(GTMNSData+zlib.o)' does not contain bitcode.
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
And searching for that issue brings up that Google updated to support bit code but hadn't updated the cocoa pods framework at that time.
Go to your build settings and switch the target's settings to ENABLE_BITCODE = YES for now.
I had this same issue. Fortunately you can use Google Analytics with BitCode enabled, but it's a bit confusing due to how Google had set up their CocoaPods support.
There's actually 2 CocoaPods you can use:
'Google/Analytics'
'GoogleAnalytics'
The first one is the "latest" but it's tied to the greater Google pods so it does not support Bitcode. The second one is for Analytics only and does support BitCode. However because the latter does not include extra Google pods some of the instructions on how to set it up are incorrect.
You have to use the v2 method of setting up analytics:
// Inside AppDelegate:
// Optional: automatically send uncaught exceptions to Google Analytics.
GAI.sharedInstance().trackUncaughtExceptions = true
// Optional: set Google Analytics dispatch interval to e.g. 20 seconds.
GAI.sharedInstance().dispatchInterval = 20
// Create tracker instance.
let tracker = GAI.sharedInstance().trackerWithTrackingId("XX-XXXXXXXX-Y")
The rest of the Google analytics api you can use the v3 documentation (you don't need to use v2).
The 'Google/Analytics' cocoapod as of this writing still does not support BitCode. See here
Had this issue, but it wasn't related to the bitcode setting. I had somehow ended up with duplicate framework files in the Frameworks folder of my XCode project. I deleted all frameworks files that were red (and duplicates). This solved the "Apple Mach O, Linker Command failed with exit code 1" error.
This worked for me:
you have to remove libPods.a library from Linked Frameworks and
Libraries section of target.
Make sure you open the .xcworkspace file not the project file from xCode Project menu when working with pods. That should solve the issue with linking.
Close Xcode, rename the folder. Then make a new folder with the previous name. Run the project, stop the project. Delete the new folder, rename old folder and re-run.
My iPad Pro simulator is affected with this issue. Its something that makes me upset, so much hard work... hopefully Google works through bugs for the next SDK.
When I changed 'iOS Deployment Target' from 'IOS 10.0' to current one (my phone's) 'iOS 10.2', the problem was gone for me.
Building Settings>Deployment>iOS Deployment Target
I resorted to adding Analytics via cocoa pods again and disabled bit code for now.
Hopefully a future cocoa pods version will support it.
You have another option... install Google Analytics without using CocoaPods:
https://developers.google.com/analytics/devguides/collection/ios/v3/sdk-download
I had same the problem with xcode 7.3. It is because, some of my .h and .m files were added twice.
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
Some times appeared if you declare a constant in the header file without static notation.
like this
const int k = 10;
it should be:
static const int k = 10;
Try to remove any trace of cocoapods pods using pod deintegrate then
Run pod install
Build Settings > Enable Bitcode > No

Google analytics 3.08 IOS idfa class missing, won't collect idfa

I downloaded google analytics and i followed their instructions how to implement analytics in application. But whatever i tried i get this log in xcode: idfa class missing, won't collect idfa.
So i google it and found that apple will reject apps that have this warning. I also discovered that google fixed this issue with 3.03c release, and that we don't have to import library that uses ads. I have also run their example and i get same log in their example.
So my question is, will Apple approve my application, how can I fix it?
I have the same issue. It seams that 3.08 lib is linked with iAd.Framework
Here is what I did - I've rolled back to the version 3.03c. You can download it here
"https://dl.google.com/googleanalyticsservices/GoogleAnalyticsServicesiOS_3.03c.zip
The best way is to use Cocopoads for managing libraries with pod 'GoogleAnalytics-iOS-SDK', '3.0.3c'
I am using 3.0.9. I was able to remove the warning by linking in the libAdIdAccess.a library provided with the GoogleAnalytics SDK and the AdSupport.framework.
I am using the version 3.0.9 and to get rid of this warning I had to link the library libAdIdAccess.a and the AdSupport.framework manually.
To do so simply add the following lines into your build settings Other Linker Flags (OTHER_LDFLAGS) :
-framework AdSupport
-force_load "${PODS_ROOT}/GoogleAnalytics-iOS-SDK/libAdIdAccess.a"
It should look like this:
Link: Official Documentation
Just for complete other responses. I'm using the Google Analytics SDK v3.09 which I integrated without CocoaPod within Xcode 6.
In order to remove the warning, I simply added the libAdIdAccess.a static library to my project by a drag and drop.
AdSupport.framework was already included in my project.
Note: I don't know why but sometimes, Xcode is mistaken for path adding an new library by this way what is resulting into a link error. In this case just modify the path in the Library Search Path option from the Build Settings : replace $(PROJECT_DIR)/YourDirectory/GoogleAnalyticsLibrary-3.09 by "$(SRCROOT)/YourDirectory/GoogleAnalyticsLibrary-3.09"
I'm using v3.08 and get the same warning. I just submitted my app and it was approved by Apple. I think they are aware of the issue but did not enforce it in my case. You can submit your app and take the time between submission and decision to remove 3.08 and go back to 3.03c just in case they reject it.
GoogleAnalytics-iOS-SDK has been deprecated in favor of
GoogleAnalytics
so just replace the line in your pod file to
pod 'GoogleAnalytics'
All you have to do is to add libAdIdAccess.a to your project. It is part of GoogleAnalyticsServicesiOS_3.09 delivery.
pod 'GoogleIDFASupport'
That will let cocoapods get what you need. I havent had to do the force_load of it either.
Installing GoogleIDFASupport (3.14.0)
Using GoogleTagManager (3.15.0)
I'm using 3.0.3c and not using IDFA,.
Howerer, "idfa class missing" is still logged.
GAI.sharedInstance().logger.logLevel = GAILogLevel.Verbose
I solved the problem by trying to delete the line above.
I am using 3.0.9. Per Google documentation you need to set tracker.allowIDFACollection to NO on each tracker.
id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
tracker.allowIDFACollection = NO;
This will remove the warning.

Resources