GA Plugin not working with Unity v5.3
msureka opened this issue · comments
Google Analytics is giving errors on XCode when trying to build, using Unity 5.3.
Undefined symbols for architecture armv7:
"_inflate", referenced from:
+[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
(maybe you meant: _inflate_copyright, _unity_z_inflateCopy , _unity_z_inflateSync , _unity_z_inflateGetHeader , _inflate_table , _unity_z_inflatePrime , _unity_z_inflate , unity_z_inflateInit , _unity_z_inflateSetDictionary , _unity_z_inflateReset , _mono_class_inflate_generic_type_with_mempool , _mono_class_inflate_generic_method_full_checked , _inflated_methods_size , _mono_metadata_get_inflated_signature , _mono_metadata_free_inflated_signature , _mono_class_inflate_generic_type_checked , _mono_get_inflated_method , _mono_class_inflate_generic_method_full , _mono_marshal_free_inflated_wrappers , _inflate_fast , _unity_z_inflateEnd , _inflated_classes , _mono_method_inflated_lookup , _mono_class_get_inflated_method , _mono_class_inflate_generic_method , _mono_class_is_inflated , _unity_z_inflateSyncPoint , _unity_mono_method_is_inflated , _mono_class_inflate_generic_class , __Z27scripting_class_is_inflatedP9MonoClass , _mono_class_inflate_generic_type , _mono_metadata_inflate_generic_inst , unity_z_inflateInit2 , _inflated_classes_size )
"deflateInit2", referenced from:
+[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
(maybe you meant: unity_z_deflateInit2)
"_deflateEnd", referenced from:
+[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
(maybe you meant: _unity_z_deflateEnd)
"_inflateEnd", referenced from:
+[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
(maybe you meant: _unity_z_inflateEnd)
"_deflate", referenced from:
+[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
(maybe you meant: _unity_z_deflateParams, _unity_z_deflateSetHeader , unity_z_deflateInit , unity_z_deflateInit2 , _unity_z_deflateReset , _unity_z_deflate , _unity_z_deflate_copyright , _unity_z_deflatePrime , _unity_z_deflateEnd , _unity_z_deflateTune , _unity_z_deflateBound , _unity_z_deflateCopy , _unity_z_deflateSetDictionary )
"OBJC_CLASS$_NSFetchRequest", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
"OBJC_CLASS$_NSManagedObjectContext", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
"OBJC_CLASS$_NSManagedObject", referenced from:
OBJC_CLASS$_TAGHit in libGoogleAnalyticsServices.a(TAGHit.o)
"OBJC_CLASS$_NSPersistentStoreCoordinator", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
"OBJC_CLASS$_NSMigrationManager", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
"OBJC_CLASS$_NSMappingModel", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
"inflateInit2", referenced from:
+[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
(maybe you meant: unity_z_inflateInit2)
"OBJC_CLASS$_NSAttributeDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
"OBJC_METACLASS$_NSManagedObject", referenced from:
OBJC_METACLASS$_TAGHit in libGoogleAnalyticsServices.a(TAGHit.o)
"_NSSQLiteErrorDomain", referenced from:
-[GAIDataStore performBlockAndWait:withError:] in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_NSSQLiteStoreType", referenced from:
+[TAGModel migrateToCurrentVersion:] in libGoogleAnalyticsServices.a(TAGModel.o)
+[TAGModel coordinatorWithURL:] in libGoogleAnalyticsServices.a(TAGModel.o)
-[GAIDataStore coordinatorWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_NSOverwriteMergePolicy", referenced from:
+[TAGModel contextWithURL:] in libGoogleAnalyticsServices.a(TAGModel.o)
-[GAIDataStore contextWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o)
"OBJC_CLASS$_NSEntityDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGDataProvider.o)
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
"OBJC_CLASS$_NSManagedObjectModel", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(TAGModel.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Had the same issue. Solution was to manually add the following librairies in your Xcode build in Build Phase : SystemConfiguration, CoreData and libz. The post-processing script can't add these automaticly since Unity 5.3 it seems.
This will be fixed in Unity 5.3.2p1 (tbd files will be recognised as part of the Unity Xcode API)
It is in the documentation for the iOS tab here.