Edo -- the mainstream version of the OneSignal plugin is not compatible with our build system, it requires the use of a plugin gradle script that our build system will ignore. There is a special PhoneGap Build branch of that plugin that should work better. You have to install it using the third-party plugin add feature of the Plugin Management tool, using this name:
You have to remove the regular version that was added using this name: onesignal-cordova-plugin and then add that special branch version that I show above.
Edo -- must be some other issue. I created a blank template project and added both plugins to it and I am able to build the app with both plugins as part of my app. See the screenshots, below. Perhaps you are not using CLI 5.4.1?
Here's my summary build log:
im still failed sir .
i've tried to reinstall all plugin , admob and onesignal , and i can build w/o error. BUT , i saw one problem , i think thats onesignal cant work w/o android-support plugin ..
can u try with this plugin ?
You should not need that last plugin, and you should definitely not be adding it manually, it is meant to be a "dependent plugin" that other plugins include automatically. It is causing a conflict with Android support libraries, because it adds some Android libraries manually (directly), whereas the other plugins add them by reference (indirectly). The latter method is preferred because it allows the build system to resolve multiple requests for the same library. The former does not allow the build system to figure this out, so if two libraries collide you will have a problem. Neither one of those plugins should be adding that support-v4 plugin, so if there is another plugin that is adding it, or you are adding it manually, that is the source of the conflict.
That manual add method is now (mostly) obsolete, because it was used to deal with some deficiencies in the older Cordova CLI releases. The Cordova project addressed those problems in the CLI 5.x releases (which are the version we currently support), but not all third-party plugins have been updated to be consistent with those changes. You may be using an old version of a plugin if you are not adding that plugin manually. If you are adding it manually, remove it from your project.
Josh -- we are working on a build system that would allow us to support gradle scripts in plugins. It is still under construction and, unfortunately, I cannot say when it will become available.
@Paul and @Josh, I'm using the pgb onesignal plugin version, but the doc tells:
"This pgb-compat branch will continue to be updated but updates will stop to this branch near future once it has been fully deprecated."
So, I hope you would manage to fully port next versions of OneSignal plugin in XDK, it's really important in our apps.
As I supposed, the pgb version of OneSignal plugin stopped at the 2.0.6 version. How can we manage to use latest versions of OneSignal in XDK?
Please help, we currently are not able to use the pgb plugin due to a lack of "Google Play Services Library" using this configuration:
OneSignal pgb plugin 2.0.6
I tried to use the versions 2.0.7 and 2.0.8 from the repo, but the build failed. Using the 2.0.6 the build is done, but the OneSignal dashboard tell me the app miss that library.
Edit: I successfully added the Google Play Services plugin and built the app. Anyway, the debug module is still giving me an error, I suppose I should skip it to continue using it.
My main issue is anyway the use of an old onesignal plugin version, I'd like to use the latest one.
Antonio -- as you probably already know, we've deprecated the Debug tab, it will be retired in favor of using remote Chrome DevTools with a built app, so I wouldn't consider the Debug tab as part of your decision. If you find that you cannot build your app using our build service, your best bet will be to consider building locally, using Cordova CLI. See this post for some light instructions on how to go about doing that > https://software.intel.com/en-us/forums/intel-xdk/topic/685326#comment-1885369 <
I work at OneSignal. The compat version of our plugin is required since Intel XDK does not allow gradle scripts required by our main SDK. Our compat plugin does not enforce any dependencies to be as compatible as possible with other plugins / cordova forks, however this means the Google Play services library and Android Support library v4 must be added manually as it is required by OneSignal.
If you are using Crosswalk 16 or newer in your project you should omit the cordova-plugin-android-support-v4 plugin. If you need to use Admob Pro with our SDK will need to use the following fork of it so it will include the extra parts of Google Play services needed by our SDK. Unfortunately this is needed as https://github.com/floatinghotpot/google-play-services is not compatible with Ad Mob Pro.
Please use the following 2 plugins to use OneSignal in your app.
@Paul F. Do you plan to add support for gradle scripts in the future? Our plugin needs it to assign some manifestPlaceholders that are need to be set so gradle can build with our native Android plugin. We also have a work around for the CB-10014 Cordova bug we would like to keep in case someone were to use our plugin with an older version of Cordova.