phonegap-build / GAPlugin

Google Analytics Plugin
MIT License
170 stars 141 forks source link

iOS7/iPhone5s functionality #49

Closed PatrickHeneise closed 7 years ago

PatrickHeneise commented 10 years ago

Just tested a few forks and this one builds and works fine. Please merge into the main plugin so Android and iOS works both.

armno commented 10 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.

antranapp commented 10 years ago

you need to add libz . See all requirements here: https://developers.google.com/analytics/devguides/collection/ios/v3/

armno commented 10 years ago

thanks @peacemoon! working now.

PatrickHeneise commented 10 years ago

Let's get it merged then ;)

armno commented 10 years ago

i'm wondering why this deletes content in src/android too. will it affect existing android platform?

PatrickHeneise commented 10 years ago

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.