gonzaloaune / GCMPushPlugin

Push notifications for Cordova (GCM & Native support)
MIT License
37 stars 20 forks source link

no app/ or mobile/ directory, cordava 5.3.3 #12

Open ZabelTech opened 9 years ago

ZabelTech commented 9 years ago

Hi, i tried your plugin, but i cannot find the directory to put google-services.json in. I think it must be under platforms/android but its not there, any advice? thanks

akreienbring commented 9 years ago

I had the same problem. See here for my solution: https://github.com/akreienbring/GCMPushPlugin#android-install

pliablepixels commented 9 years ago

Can someone please post specific directions on how to install this for android? I am trying to integrate it into an ionic app - the compilation process invokes 'cordova build' so adding to build.grade won't work as it overwrites it.

I added both @akreienbring's suggestion as well as tried the original suggestion by @gonzaloaune in my build-extras.grade but each time I get

Running: /Users/pp/winshare/pp/projects/phonegap/zmNinja/platforms/android/gradlew cdvBuildDebug -b /Users/pp/winshare/pp/projects/phonegap/zmNinja/platforms/android/build.gradle -Dorg.gradle.daemon=true
embedded

FAILURE: Build failed with an exception.

* Where:
Script '/Users/pp/winshare/pp/projects/phonegap/zmNinja/platforms/android/cordova-plugin-gcmpushplugin/zmninja-build-extras.gradle' line: 1

* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin [id 'com.google.gms.google-services']
   > Plugin with id 'com.google.gms.google-services' not found.

If someone can please post complete build-extra.gradle files and where they need to go I'd much appreciate it.

The iOS version works fine.

akreienbring commented 9 years ago

Again, see here https://github.com/akreienbring/GCMPushPlugin#android-install for my findings regarding the gradle files. I ended up not using the build-extra.gradle files as I was not able to figure out how these files are merged into the original build configuration file.

pliablepixels commented 9 years ago

@akreienbring yes I read that - unfortunately, I don't (yet) have knowledge of how to do a build without doing cordova build. Can you share how you compile it?

akreienbring commented 9 years ago

I'm using Android Studio and the included (gradle) build functionality.

comiguel commented 9 years ago

@pliablepixels could you make it run on iOS? with which versions you've tried?

akreienbring commented 9 years ago

No, i'm not developing for IOS.

pliablepixels commented 9 years ago

@comiguel yes, I had no problem with iOS. I am on iOS9 and Xcode 7. If you are facing compilation problems, I had to do the following:

a) Disable bitcode compilation in Xcode

b) Enable external module support c) Add $(inherited) without "-" at the top of OTHER_LINKER_FLAGS (I forgot the exact name)

However, I've now changed path. I've switched to using the open source air notifier (set up a server at home) and am using that now to push instead of GCM for iOS.