OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
In order to showcase how a Xamarin app could produce a live activity, and have it be updated via the OneSignal platform. Xamarin does not have support WidgetKit/ActivityKit, so native bindings and native extensions were created. The general approach was adopted from the WidgetKit example provided by https://github.com/chamons/xamarin-ios-swift-extension.
Note that because this approach requires a native build of the widget in order for the Xamarin solution to build, the Live Activity functionality defaults to disabled. It can be enabled by specifying the LIVE_ACTIVITIES compiler constant. See Samples/LIVE_ACTIVITIES.md for more explicit instructions.
Scope
This change should only affect the sample application.
Testing
Manual testing
The sample app was tested on both iPhone and iPhoneSimulator, with live activity functionality enabled and disabled. Entering/exit live activity was driven in all variations to ensure correct behavior.
Affected code checklist
[ ] Notifications
[ ] Display
[ ] Open
[ ] Push Processing
[ ] Confirm Deliveries
[ ] Outcomes
[ ] Sessions
[ ] In-App Messaging
[ ] REST API requests
[ ] Public API changes
Checklist
Overview
[X] I have filled out all REQUIRED sections above
[X] PR does one thing
If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
[X] Any Public API changes are explained in the PR details and conform to existing APIs
Testing
[X] I have included test coverage for these changes, or explained why they are not needed
[X] All automated tests pass, or I explained why that is not possible
[X] I have personally tested this on my device, or explained why that is not possible
Final pass
[X] Code is as readable as possible.
Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
[X] I have reviewed this PR myself, ensuring it meets each checklist item
WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.
Description
One Line Summary
Add a Live Activity example to the sample app.
Details
Motivation
In order to showcase how a Xamarin app could produce a live activity, and have it be updated via the OneSignal platform. Xamarin does not have support WidgetKit/ActivityKit, so native bindings and native extensions were created. The general approach was adopted from the WidgetKit example provided by https://github.com/chamons/xamarin-ios-swift-extension.
Note that because this approach requires a native build of the widget in order for the Xamarin solution to build, the Live Activity functionality defaults to disabled. It can be enabled by specifying the
LIVE_ACTIVITIES
compiler constant. SeeSamples/LIVE_ACTIVITIES.md
for more explicit instructions.Scope
This change should only affect the sample application.
Testing
Manual testing
The sample app was tested on both iPhone and iPhoneSimulator, with live activity functionality enabled and disabled. Entering/exit live activity was driven in all variations to ensure correct behavior.
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is![Reviewable](https://reviewable.io/review_button.svg)