问题
NOTE
: We use cocoapods to get the GoogleTagManager
frameworks via a separate project, and then manually integrate the static frameworks into our Swift Project.
With GoogleTagManager(6.0.0), our app is working fine, same for the GTM features.
Now that we are planning to implement FirebaseMessaging
, we decided to update GTM first so we can also use the latest version of FirebaseMessaging
.
Our pod file looks like this:
target 'SampleProject'
platform :ios, '10.0'
pod 'GoogleTagManager'
Here are the versions after the update:
Using FirebaseAnalytics (5.3.0)
Using FirebaseCore (5.1.7)
Using FirebaseInstanceID (3.3.0)
Using GoogleAnalytics (3.17.0)
Using GoogleAppMeasurement (5.3.0)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleTagManager (7.1.1)
Using GoogleUtilities (5.3.4)
Using GoogleUtilitiesLegacy (1.3.2)
Using nanopb (0.3.901)
However, some of the dependency frameworks are now just folders with just .h and .m files instead of .framework
. Adding use_frameworks!
didn't help.
So we turned to the framework SDK zip and grabbed the following .framework
s version instead(the version matched the ones from the cocoapods):
FirebaseCore.framework
GoogleUtilities.framework
nanopb.framework
And used the zip's Firebase.h
and module.modulemap
.
After setting up LIBRARY_SEARCH_PATHS
to point correctly to libGoogleAnalytics.a
, and replacing import FirebaseAnalytics
with import Firebase
, we were able to build the project.
ISSUE:
At launch, the app crashes immediately after this console line(.json filename is masked here):
GoogleTagManager info: Attempting to load saved version of container GTM-XXXXXX
And below is the stack trace:
I already checked, TAGRuntime.js.dat
is added to Build Phases>Copy Bundle Resources
What am I missing?
来源:https://stackoverflow.com/questions/53207733/crash-after-manually-updating-googletagmanager-to-7-1-1