BranchMetrics / phonegap-plugin

PhoneGap/Cordova plugin for Tune
https://developers.tune.com/sdk/phonegap-quick-start/
MIT License
8 stars 16 forks source link

Use framework for google play services #5

Closed youngmob closed 9 years ago

youngmob commented 9 years ago

Hi,

Instead of having google play services as dependency, seems now Cordova 4.x.x version supports 'framework', you should change it to use 'framework' as below plugin is DEPRECATED. Please visit below link and you'll know what i mean by 'framework' https://github.com/MobileChromeApps/google-play-services

john-gu commented 9 years ago

Thanks for letting us know! Updated as Android@4.0.0 is now the default for Android projects.

youngmob commented 9 years ago

Curious,,, shouldn't this code also change? https://github.com/MobileAppTracking/phonegap-plugin/blob/master/gaidwrapper/plugin.xml

john-gu commented 9 years ago

Yes you're right, the gaidwrapper is used by older versions of our plugin so I'll update that as well.

youngmob commented 9 years ago

Broken;

Fetching plugin "https://github.com/MobileAppTracking/phonegap-plugin.git" via git clone Installing "com.mobileapptracking.matplugin" for android Installing "com.mobileapptracking.matplugin" for ios Failed to install 'com.mobileapptracking.matplugin':Error: ENOENT, no such file or directory '/Users/me/company/company-native-app/plugins/com.google.playservices/plugin.xml' at Error (native) at Object.fs.openSync (fs.js:502:18) at Object.fs.readFileSync (fs.js:354:15) at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/xml-helpers.js:118:27) at new PluginInfo (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/PluginInfo.js:320:37) at PluginInfoProvider.get (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/PluginInfoProvider.js:35:32) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/prepare.js:79:45 at Array.forEach (native) at Object.handlePrepare (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/prepare.js:77:24) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:553:28 Error: ENOENT, no such file or directory '/Users/me/company/company-native-app/plugins/com.google.playservices/plugin.xml' at Error (native) at Object.fs.openSync (fs.js:502:18) at Object.fs.readFileSync (fs.js:354:15) at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/xml-helpers.js:118:27) at new PluginInfo (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/PluginInfo.js:320:37) at PluginInfoProvider.get (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/PluginInfoProvider.js:35:32) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/prepare.js:79:45 at Array.forEach (native) at Object.handlePrepare (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/prepare.js:77:24) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:553:28

john-gu commented 9 years ago

Does your plugins/fetch.json still contain an entry for the old GPS dependency? You may need to do a plugin remove and re-add, or manually delete the entry from fetch.json.

youngmob commented 9 years ago

had no problem within fetch.json.

youngmob commented 9 years ago

was this tested after changes made?

Need to fix here as well.. https://github.com/MobileAppTracking/phonegap-plugin/blob/master/no_ifa/plugin.xml

john-gu commented 9 years ago

Do you have repro steps, were you doing an update from an existing installation? /plugins/com.google.playservices would only exist for the previous version.

youngmob commented 9 years ago

yeah, my bad. I didn't have Google Repository installed (android SDK). after that installing got fixed. but somehow I'm getting when compiling...

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/analytics/internal/Command$1;
john-gu commented 9 years ago

That's usually the case if multiples of the same library are being included in the build. Are you using any other libraries that import Google Play Services? We're only dependent on the ads library, but I'll have to check how it's using that analytics class.

youngmob commented 9 years ago

I'll clean up and try out. Thanks!