googleanalytics / google-analytics-plugin-for-unity

Google Analytics plugin for the Unity game creation system
Apache License 2.0
386 stars 140 forks source link

[iOS] 64-bit IL2CPP Builds & Runs but will not send analytics on 64-bit iOS devices #37

Open marchere opened 9 years ago

marchere commented 9 years ago

Unity Version: 4.6.3f1 Backend Scripting: IL2CPP Devices Tested: iPad Mini 3, iPhone 6, iPhone 6+, iPhone 5s, iPhone 4s, iPhone 4

Problem: No analytics data will send/(be received?) for 64-bit devices even though app will build and run as expected. No noticeable errors are encountered. 32-bit devices send analytics as expected. Doing a build using backend scripting of Mono 2.x will send/receive analytics data as expected.

Importance: App Store requires 64-bit build versions of new apps and IL2CPP is the only way to make this happen. Old apps have until June to comply.

baldwin628 commented 9 years ago

This one is really weird. We're looking into it.

baldwin628 commented 9 years ago

Looks like the sampling rate was a float and this ended up being 0 when passed through, so all hits would get dropped.

Can you try the latest plugin I uploaded and see if this was the same issue you were seeing. If it works I'll make it a release.

marchere commented 9 years ago

Will do in the morning at the office. I'll test it out on the various testing devices again.

marchere commented 9 years ago

getting build failures.

Scripting Backend: IL2CPP Architecture: Universal Target Device: iPhone + iPad

Undefined symbols for architecture arm64: "_OBJCCLASS$_NSManagedObjectModel", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o) "_OBJCCLASS$_NSAttributeDescription", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o) "_OBJCCLASS$_NSEntityDescription", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o) "_OBJCCLASS$_NSPersistentStoreCoordinator", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) "_NSOverwriteMergePolicy", referenced from: -[GAIDataStore contextWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o) "_NSSQLiteStoreType", referenced from: -[GAIDataStore coordinatorWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o) "_OBJCCLASS$_NSFetchRequest", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) "_OBJCCLASS$_NSManagedObjectContext", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) "_NSSQLiteErrorDomain", referenced from: -[GAIDataStore performBlockAndWait:withError:] in libGoogleAnalyticsServices.a(GAIDataStore.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

baldwin628 commented 9 years ago

I didn't explicitly try universal, but I used armv7 and arm64. Do you have coredata, and the other dependent frameworks in your project?

What xcode version are you using?

marchere commented 9 years ago

Xcode 6.1.1

marchere commented 9 years ago

I can send you project I'm using to test functionality. What's a good email? Or, feel free to email me for it marc@saagara.com

aufano commented 9 years ago

I have the same problem that @marchere, and I need this plugin to submit my new App :-(

Unity 4.6.4 Scripting Backend: IL2CPP Architecture: Universal or arm 64 Target Device: iPhone + iPad

Undefined symbols for architecture arm64: "OBJC_CLASS$NSManagedObjectModel", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o) "_OBJC_CLASS$NSAttributeDescription", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o) "_OBJC_CLASS$NSEntityDescription", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o) "_OBJC_CLASS$NSPersistentStoreCoordinator", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) "_NSOverwriteMergePolicy", referenced from: -[GAIDataStore contextWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o) "_NSSQLiteStoreType", referenced from: -[GAIDataStore coordinatorWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o) "_OBJC_CLASS$NSFetchRequest", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) "_OBJC_CLASS$_NSManagedObjectContext", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) "_NSSQLiteErrorDomain", referenced from: -[GAIDataStore performBlockAndWait:withError:] in libGoogleAnalyticsServices.a(GAIDataStore.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

andersemil commented 9 years ago

Same linker errors as aufano but with Unity 5.1.1f1 ... need a fix ASAP

aufano commented 9 years ago

For me worked with the latest google analytics version and Unity 4.6.4, remember to add the required frameworks in Xcode!

andersemil commented 9 years ago

Pretty sure I have the required frameworks already... libsqlite3.0, CFNetwork ... They are added by Unity when creating the xcode project. Changing from "optional" to "required" (not sure what it means) does not help.

screen shot 2015-07-28 at 16 07 01

andersemil commented 9 years ago

Wait, are you using the v3 or v4 package? Cause I only tried the v3 and its not building

andersemil commented 9 years ago

I got it working now. I had to manually add the frameworks AdSupport, CoreData and libz

alper commented 8 years ago

Is this closed?

monishchenko commented 4 years ago

no