Skip to content

Commit

Permalink
Migration guide - location sharing must be enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-li committed Jan 3, 2024
1 parent 68f9b7f commit 994ee3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,11 @@ OneSignal.Notifications.addClickListener(myListener)

## Location Namespace

The Location namespace is accessible via `OneSignal.Location` and provide access to location-scoped functionality.
The Location namespace is accessible via `OneSignal.Location` and provide access to location-scoped functionality. Location sharing must be enabled by setting `isShared` to `true`.

| **Swift** | **Objective-C** | **Description** |
| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `let isShared: Bool = OneSignal.Location.isShared`<br><br>`OneSignal.Location.isShared = true` | `BOOL isShared = [OneSignal.Location isShared]`<br><br>`[OneSignal.Location setShared:true]` | *Whether location is currently shared with OneSignal.* |
| `let isShared: Bool = OneSignal.Location.isShared`<br><br>`OneSignal.Location.isShared = true` | `BOOL isShared = [OneSignal.Location isShared]`<br><br>`[OneSignal.Location setShared:true]` | *Whether location is currently shared with OneSignal. False by default. You must set to `true` to enable sharing.* |
| `OneSignal.Location.requestPermission()` | `[OneSignal.Location requestPermission]` | *Use this method to manually prompt the user for location permissions. This allows for geotagging so you send notifications to users based on location.* |


Expand Down

0 comments on commit 994ee3e

Please sign in to comment.