OneSignal / OneSignal-Cordova-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Ionic, PhoneGap CLI, PhoneGap Build, Cordova, or Sencha Touch app with OneSignal. Supports Android, iOS, and Amazon's Fire OS platforms. https://onesignal.com
Other
250 stars 197 forks source link

Your app contains exposed Google Cloud Platform (GCP) API keys. #619

Closed jasonseah-greenroom closed 4 years ago

jasonseah-greenroom commented 4 years ago

Description:

We just publish an app yesterday and got this issue feedback from google play console and we did exactly the same as what the plugin told us to do.

The plugin works well it just showing this warning in our google play console.

Should I worry if yes, what can we do to fix this? or did I use the wrong version of the plugin? Please advise if possible.

Thanks in advance.

By the way, Love your hard work.

image

Environment

Ionic:

   Ionic CLI          : 5.0.2 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 7.1.0, ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.3, (and 22 other plugins)

Utility:

   cordova-res : 0.6.0
   native-run  : 0.2.5

System:

   Android SDK Tools : 26.1.1 (/Users/Jaja/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.2
   NodeJS            : v10.16.0 (/usr/local/Cellar/node@10/10.16.0/bin/node)
   npm               : 6.9.0
   OS                : macOS Mojave
   Xcode             : Xcode 11.3.1 Build version 11C504
com-badrit-base64 0.2.0 "Base64"
cordova-android-support-gradle-release 3.0.0 "cordova-android-support-gradle-release"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-facebook4 6.2.0 "Facebook Connect"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filepath 1.4.2 "cordova-plugin-filepath"
cordova-plugin-firebase-analytics 2.0.4 "FirebaseAnalyticsPlugin"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googleplus 7.0.2 "Google SignIn"
cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview"
cordova-plugin-sign-in-with-apple 0.0.1 "cordova-plugin-sign-in-with-apple"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-telerik-imagepicker 2.2.2 "ImagePicker"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.4 "SocialSharing"
cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
cordova-support-google-services 1.3.1 "cordova-support-google-services"
cordova.plugins.diagnostic 4.0.10 "Diagnostic"
es6-promise-plugin 4.2.2 "Promise"
onesignal-cordova-plugin 2.8.4 "OneSignal Push Notifications"
phonegap-plugin-multidex 1.0.0 "Multidex"
uk.co.workingedge.phonegap.plugin.launchnavigator 4.2.2 "Launch Navigator"

Usage:

constructor(
    public platform: Platform,
    public splashScreen: SplashScreen,
    public oneSignal: OneSignal,
  ) {
    this.initOneSignal();
  }

 public initOneSignal() {
    let context = this;
    const notificationOpenedCallback = function (jsonData) {
      context.processData(jsonData);
    };

    // todo switch on when compile
    this.oneSignal
      .startInit("One Signal Key")
      .inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.Notification)
      .handleNotificationOpened(notificationOpenedCallback)
      .endInit();
  }
noahcooper commented 4 years ago

This is due to an issue with the underlying OneSignal Android SDK.

https://github.com/OneSignal/OneSignal-Android-SDK/issues/966

noahcooper commented 4 years ago

OneSignal team, now that this was fixed in OneSignal-Android-SDK, when do you plan to update this plugin?

vinlim commented 4 years ago

Would appreciate an update on this. Thank you.

jkasten2 commented 4 years ago

The warning is a false positive, you can safely ignore and release updates to your app in the meantime. A fix has been implemented in the OneSignal-Android-SDK version 3.13.0 used by this SDK and will be released next week.

We will update and close this issue once this Cordova SDK has been released with version noted above.

noahcooper commented 4 years ago

@jkasten2 any update on this?

rgomezp commented 4 years ago

Howdy, The cordova release should go out today or tomorrow. If you would like it ASAP feel free to change the native Android SDK version manually. Enjoy!