Sample app to demonstrate issue #533
- Clone repo
- Edit config.xml and change the app id from "io.ionic.starter" to something else
- Follow OneSignal instructions for creating iOS Push Cert
- Create App in OneSignal dashboard and configure with push cert created in previous step
- Edit environment.ts and set
oneSignalAppId
to match App Id created in step 4 (you can leave sender alone) npm install
ionic cordova prepare ios
ionic cordova build ios
(this will fail)- Open project in XCode
open platforms/ios/MyApp.xcworkspace
- In the "Signing & Capabilities" section of the project settings select a "Team" and otherwise configure the project so XCode will stop complaining
- Attach iOS device
- Run the project using XCode
- When the app starts, it will prompt you for Location Permissions. Click some form of "Allow"
- Click "Prompt for Nofication" button
- Click "Allow" on Notification permission modal
- Load OneSignal dashboard (Audience | All Users)
- Notice the newly created Player will have Location data set, even those this sample app calls
setLocationShared(false)
inhome.page.ts