Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS (12.4.1/13.3) still sharing location after setLocationShared(false) #602

Closed
ndrake opened this issue Jan 3, 2020 · 2 comments
Closed

Comments

@ndrake
Copy link

ndrake commented Jan 3, 2020

Description:

setLocationShared(false) doesn't seem to be working on iOS. Similar to #406. We initialize OneSignal with setLocationShared(false), but when iOS devices allow Notification permissions, the OneSignal dashboard shows location data for the device. We don't see this problem on Android.

Note that in our test scenarios, the user has already granted the app Location permissions.

Environment

We are using version of 2.8.1 of the OneSignal Cordova plugin and Ionic 4.

Here is the list of other Cordova plugins in use:

com.red_folder.phonegap.plugin.backgroundservice 2.0.0 "Background Service Plugin - Core logic"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-background-mode-bluetooth-peripheral 1.0.0 "Bluetooth Peripheral Background Mode"
cordova-plugin-bluetooth-peripheral-usage-description 1.0.0 "Bluetooth Peripheral Usage Description"
cordova-plugin-bluetoothle 4.5.5 "Bluetooth LE"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-googlemaps 2.6.3-20191011-0040 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.2 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-sqlite-storage 3.2.1 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
cordova.plugins.diagnostic 5.0.1 "Diagnostic"
onesignal-cordova-plugin 2.8.1 "OneSignal Push Notifications"
Ionic:

   Ionic CLI                     : 5.4.13 (/Users/ndrake/.nvm/versions/node/v12.13.1/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.11.0
   @angular-devkit/build-angular : 0.801.2
   @angular-devkit/schematics    : 8.1.2
   @angular/cli                  : 8.1.2
   @ionic/angular-toolkit        : 2.0.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, browser 6.0.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.2, (and 14 other plugins)

Utility:

   cordova-res (update available: 0.8.1) : 0.8.0
   native-run (update available: 0.3.0)  : 0.2.8

System:

   Android SDK Tools : 26.1.1 (/Users/ndrake/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.2
   NodeJS            : v12.13.1 (/Users/ndrake/.nvm/versions/node/v12.13.1/bin/node)
   npm               : 6.12.1
   OS                : macOS Mojave
   Xcode             : Xcode 11.1 Build version 11A1027

Test device is running iOS 12.4.1.

Steps to Reproduce Issue:

  1. Followed Installation instructions for Cordova/Ionic SDK setup.

  2. Initializing OneSignal like this:

    this.oneSignal.setLocationShared(false);
    this.oneSignal.setLogLevel({ logLevel: 4, visualLevel: 0 });
    this.oneSignal.startInit(environment.oneSignalAppId, environment.senderId);
    this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.Notification);

    this.oneSignal.handleNotificationReceived().subscribe(data => {
        // do stuff
    });

    // Notification was really clicked/opened
    this.oneSignal.handleNotificationOpened().subscribe(data => {
        //do stuff
    });

    this.oneSignal.endInit();
  1. Build and run app on iOS 12 device
  2. Use app, grant Notification permissions
  3. Check OneSignal dashboard, note iOS user has location data filled in

Anything else:
Android devices don't seem to exhibit this problem.

@ndrake
Copy link
Author

ndrake commented Jan 8, 2020

I'm also seeing the same behavior on an iPod touch running iOS 13.3.

@ndrake ndrake changed the title iOS (12.4.1) still sharing location after setLocationShared(false) iOS (12.4.1/13.3) still sharing location after setLocationShared(false) Jan 8, 2020
@rgomezp
Copy link
Contributor

rgomezp commented Jan 15, 2020

I have reopened the original issue, where you can continue tracking the issue since it is a native-side problem: OneSignal/OneSignal-iOS-SDK#533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants