Crash after manually updating GoogleTagManager to 7.1.1

我们两清 提交于 2019-12-11 10:58:25

问题


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 .frameworks 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!