phonegap-build / GAPlugin

Google Analytics Plugin
MIT License
170 stars 141 forks source link

64 bit issue? #64

Closed mtamony closed 9 years ago

mtamony commented 10 years ago

I can't seem to get the plugin to build with 64 bit iPhone, which means I can't update my app in the store. I can build for everything else. Any thoughts?

ld: warning: ignoring file /Users/ME/Mobile-Development/Mobile-Apps/MyApp/platforms/ios/MyApp/Plugins/com.adobe.plugins.GAPlugin/GoogleAnalytics.a, missing required architecture x86_64 in file /Users/ME/Mobile-Development/Mobile-Apps/MyApp/platforms/ios/MyApp/Plugins/com.adobe.plugins.GAPlugin/GoogleAnalytics.a (3 slices) Undefined symbols for architecture x86_64: "_OBJCCLASS$_GAI", referenced from: objc-class-ref in GAPlugin.o "_OBJCCLASS$_GAITransaction", referenced from: objc-class-ref in GAPlugin.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

ghost commented 10 years ago

They need to include the latest GA libraries and then fix the code to work with the new libraries. It has been a while so I'm not sure if this project is dead or not. There seems to be a plugin that works https://github.com/cmackay/google-analytics-plugin but it is completely different to this one.

shazron commented 10 years ago

I'll be fixing this.

shazron commented 10 years ago

The plugin has been updated for 64-bit iOS in a branch: https://github.com/phonegap-build/GAPlugin/tree/GA-3.0

This includes the GA 3.0 SDK for iOS.

I will work on Android next (update the SDK to 3.0), and test the overall plugin.

Feel free to test the branch version yourself:

cordova plugin add https://github.com/phonegap-build/GAPlugin.git#GA-3.0
mtamony commented 10 years ago

I'm getting this error but I'm not sure it is GA related.

The following build commands failed: Ld build/emulator/MyApp.app/MyApp normal i386 (1 failure) Error: /Users/MeMobile-Development/Mobile-Apps/MyApp/platforms/ios/cordova/build: Command failed with exit code 65 at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/src/superspawn.js:126:23) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:735:16) at Process.ChildProcess._handle.onexit (child_process.js:802:5)

shazron commented 10 years ago

Hmm I did "cordova build" after installing the plugin, and it was successful. Using cordova 3.4.1.x

shazron commented 10 years ago

After trying it fresh on another machine, found the error, my plugin.xml was wrong: https://github.com/phonegap-build/GAPlugin/blob/947e7d47394f93124becd213af33f0b55cff6a9e/plugin.xml#L55

It should be libsqlite3.dylib. Fixing

shazron commented 10 years ago

Should be fixed now. Remove the plugin and re-add.

mtamony commented 10 years ago

Same error. Do I need to clean after removing plugin?

MYs-mbp:MYApp MY$ cordova plugin remove com.adobe.plugins.GAPlugin Uninstalling com.adobe.plugins.GAPlugin from ios Removing "com.adobe.plugins.GAPlugin" MYs-mbp:MYApp MY$ cordova plugin add https://github.com/phonegap-build/GAPlugin.git#GA-3.0 Fetching plugin "https://github.com/phonegap-build/GAPlugin.git" via git clone Plugin "https://github.com/phonegap-build/GAPlugin.git" checked out to git ref "GA-3.0". Installing "com.adobe.plugins.GAPlugin" for ios MYs-mbp:MYApp MY$ cordova build ios

Bunch of build dialog

ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

\ BUILD FAILED **

The following build commands failed: Ld build/emulator/MYApp.app/MYApp normal i386 (1 failure) Error: /Users/MY/Mobile-Development/Mobile-Apps/MYApp/platforms/ios/cordova/build: Command failed with exit code 65 at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/src/superspawn.js:126:23) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:735:16) at Process.ChildProcess._handle.onexit (child_process.js:802:5)

shazron commented 10 years ago

No, it should be fine. Try creating a new project then add the plugin - the cli plugin install is buggy with adding frameworks, sigh :/

mtamony commented 10 years ago

Ahhh that seems to have fixed everything. It builds with no errors on emulators including 64 bit and on physical iPad. Thanks so much. We are presenting our app and Phonegap and needed a crucial update.

iPad just said iOS 7.1.1 is ready. Never ending. I hope it doesn't break stuff.

shazron commented 10 years ago

7.1.1 is critical, if you don't want your device to be taken over by visiting a website ;) See: http://support.apple.com/kb/HT6208 (Webkit section)

leecrossley commented 10 years ago

I've tested this on iOS 7.1.1 (5s) and all is working with Cordova 3.4.1 - thanks @shazron.

[aside] The CLI flakiness you mention is frustrating [/aside]

ghost commented 10 years ago

worked perfectly here.

Thanks a bunch!

mtamony commented 10 years ago

I think this plugin might be preventing Apple upload because of IDFA. I see mention of IDFA in GAIFields.h and that seems like the only place in my app.

Dear developer,

We have discovered one or more issues with your recent delivery for "SBCERA". To process your delivery, the following issues must be corrected:

Improper Advertising Identifier [IDFA] Usage. Your app contains the Advertising Identifier [IDFA] API but your app is not respecting the Limit Ad Tracking setting in iOS.

Once these issues have been corrected, go to the Version Details page and click "Ready to Upload Binary." Continue through the submission process until the app status is "Waiting for Upload." You can then deliver the corrected binary.

Regards,

The App Store team

On Tue, Apr 29, 2014 at 11:41 AM, Oz notifications@github.com wrote:

worked perfectly here.

Thanks a bunch!

— Reply to this email directly or view it on GitHubhttps://github.com/phonegap-build/GAPlugin/issues/64#issuecomment-41715785 .

shazron commented 10 years ago

With the latest GA SDK this should be not a problem anymore, I'm pretty sure I used the latest version, if not I will update. See: https://developers.google.com/analytics/devguides/collection/ios/changelog

3.03c - No changes to Google Analytics directly. GA users should note that Google Tag Manager no longer has a dependency on AdSupport.framework by default. This may help resolve Issue 387.

mtamony commented 10 years ago

Hmm? Looks like PushWoosh may be to blame. I see #import <AdSupport/AdSupport.h> in PushNotificationManager.m

I wonder if I can just delete that #import

On Tue, Apr 29, 2014 at 3:09 PM, Shazron Abdullah notifications@github.comwrote:

With the latest GA SDK this should be not a problem anymore, I'm pretty sure I used the latest version, if not I will update. See: https://developers.google.com/analytics/devguides/collection/ios/changelog

3.03c - No changes to Google Analytics directly. GA users should note that Google Tag Manager no longer has a dependency on AdSupport.framework by default. This may help resolve Issue 387https://code.google.com/p/analytics-issues/issues/detail?id=387 .

— Reply to this email directly or view it on GitHubhttps://github.com/phonegap-build/GAPlugin/issues/64#issuecomment-41738613 .

clickonchris commented 10 years ago

I use this plugin outside of phonegap build. When archiving my project in xcode I was getting linker errors like mtamony. After updating to the latest version of GAPlugin by doing

cordova plugin rm com.adobe.plugins.GAPlugin cordova plugin add https://github.com/phonegap-build/GAPlugin.git#GA-3.0

I was still getting linker errors related. I was able to resolve them without generating a new project in xcode by doing the following:

In your project's (not CordovaLib) Build Phases, scroll down to Linked Frameworks, and add or drag/drop the following: SystemConfiguration.framework CoreData.framework libsqlite3.dylib libz.dylib libGoogleAnalyticsServices.a

My configuration now looks something like this screen shot 2014-05-02 at 11 51 48 am

ghost commented 10 years ago

@mtamony Just FYI, my app was accepted just fine in the app store and I didn't have to do anything extra.

mtamony commented 10 years ago

Thanks @Oz. After Pushwoosh updated their Cordova plugin, I was able to get to the iTunes app store review stage. We shall see if the Apple Overlords approve the update to the app.

On Fri, May 2, 2014 at 10:15 AM, Oz notifications@github.com wrote:

@mtamony https://github.com/mtamony Just FYI, my app was accepted just fine in the app store and I didn't have to do anything extra.

— Reply to this email directly or view it on GitHubhttps://github.com/phonegap-build/GAPlugin/issues/64#issuecomment-42055425 .

oz commented 10 years ago

I guess @mtamony meant @0sm3l :wink:

icyKira commented 10 years ago

Is it possible for this version of the plugin to be uploaded on Phonegap build? Currently latest version available through Phonegap build is 2.3.1 and this issue is still present in that build.

mlegenhausen commented 10 years ago

+1 works great :)

mnjk commented 10 years ago

clang: error: no such file or directory: '/Users/Kareems/Library/Developer/Xcode/DerivedData/EventAheadModel-azsrdqingbkxowejmrgzozgxguao/Build/Products/Debug-iphonesimulator/libGoogleAnalyticsServices.a'

screen shot 2014-06-05 at 12 00 40 pm

screen shot 2014-06-05 at 12 00 57 pm screen shot 2014-06-05 at 11 55 04 am

bmarker1 commented 10 years ago

Is this Android-friendly yet?

apotapov commented 10 years ago

The steps that @clickonchris mentioned worked for me in resolving this issue. The problem is missing SystemConfiguration.framework dependency. You can add it in XCode by following instructions his instructions. If they are not clear, take a look at this: https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/AddingaLibrarytoaTarget.html

After this the project compiles both in XCode and from command line. Not sure why it works out of the box for a brand new project and not for existing ones...

jonas-eberle commented 9 years ago

Is there a possibility to use the GA-3.0 branch together with Phonegap Build?

nickrouty commented 9 years ago

+1, fixed for android as well or not yet?

ultrawebsites commented 9 years ago

+1 for using the GA-3.0 branch with Phonegap Build please!!!

Cordova-1 commented 9 years ago

I had also same issue in IOS I had gone through whole process of searching on google but I really didn't get any thing but unfortunately I get a link from Stack Overflow Forums and I got my Solution . So I am sharing with you all Here is the Link - - > http://www.brotsky.tv/2014/05/29/x86_64-ios-error-fix/