OneSignal / OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Other
496 stars 263 forks source link

Location sharing with OneSignal now defaults to false #1352

Closed nan-li closed 10 months ago

nan-li commented 10 months ago

Description

One Line Summary

Location sharing with OneSignal now defaults to false regardless of device permissions, so developers must explicitly set sharing to true.

Details

Motivation

It may be a poor developer experience to be opted-in by default. Previously, as long as device has location permission, we shared location with the OneSignal server. Now, sharing must be explicitly enabled. This aligns with recent similar Android behavior changes https://github.com/OneSignal/OneSignal-Android-SDK/pull/1942.

Scope

⚠️ Behavior changes:

Fix location module bug

Testing

Unit testing

None

Manual testing

iPhone 13 on iOS 17.1.2

Something that is not working is mid-session disabling and enabling doesn't drive location sharing until next cold start.

  1. Already sharing location
  2. Disable sharing - location stops being tracked and shared
  3. Enable sharing - location sharing doesn't start
  4. New cold start - location is shared

Affected code checklist

Checklist

Overview

Testing

Final pass


This change is Reviewable

nan-li commented 10 months ago

Should we update the migration guide to call out the new default as well?

Done. We will also need to update our docs calling this out for v5.1.0 and above.