I have an iOS 9+ project that uses both Google Analytics and Firebase for Analytics.
This project also has an iMessage Extension. The extension is targeted for iOS 10.0
If I keep the GA Pods in my pod file like this:
pod 'Google/Analytics'
pod 'GoogleIDFASupport'
Then I get the popular, dreaded exception on Startup of the first controller (subclass of MSMessagesAppViewController) :
**[_NSXPCDistantObject _remoteViewDidBecomeReadyForDisplay]: unrecognized selector sent to instance**
This error occurs in system internals, and there is no stack trace that leads back to any of my code.
Also: I've commented out all GA code, including Logging, Configuration and Initialization. I only have the GA Pods being linked to the Target, and not even used. The exception still persists.
Now, If i comment out the GA Pods, everything works fine, and the first controller loads up.
My GA versions being pulled by CocoaPods:
Using GoogleAnalytics (3.17.0)
Using GoogleIDFASupport (3.14.0)
So I'm faced with a choice: To spend more time looking for a GA version that would work with an iMessage extension, or to Migrate the part of my system that uses GA to use Firebase Analytics instead.
You can reproduce this issue with a brand new, blank iMessage target that launches a Hello World main screen, and adding the GA Pod to it.
Is GA trying to hook into something in the UI that doesn't exist?
Any suggestions on a solution?
The issue is with the pod itself; Google
is deprecated. Change
pod 'Google/Analytics'
to
pod 'GoogleAnalytics'