Closed PatrickHeneise closed 7 years ago
Hi @PatrickHeneise, I couldn't make the build pass using @peacemoon 's master branch. I'm using cordova 3.4.0-0.1.3. Here is how I can reproduce:
$ cordova create testproject
$ cd testproject
$ cordova plugin add https://github.com/peacemoon/GAPlugin.git
$ cordova platform add ios
$ cordova build ios
cordova cli gave these errors:
Undefined symbols for architecture i386:
"_deflate", referenced from:
+[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
"_deflateEnd", referenced from:
+[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
"_deflateInit2_", referenced from:
+[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
"_inflate", referenced from:
+[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
"_inflateEnd", referenced from:
+[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
"_inflateInit2_", referenced from:
+[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
on Android, it passed the build process.
Cheers.
you need to add libz . See all requirements here: https://developers.google.com/analytics/devguides/collection/ios/v3/
thanks @peacemoon! working now.
Let's get it merged then ;)
i'm wondering why this deletes content in src/android
too. will it affect existing android platform?
There are currently different forks for the latest versions of the Google Analytics plugin for Android and iOS. This is only the iOS one. That's why it's so important stuff get's merged together, it's annoying to install the same plugin from different repositories and patch everything together.
Just tested a few forks and this one builds and works fine. Please merge into the main plugin so Android and iOS works both.