matomo-sdk-ios
matomo-sdk-ios copied to clipboard
Add better better support for sending events in the background
This PR tries to fix issues (#331, #327) when bringing the app to the background, while dispatching events.
There are multiple approaches.
- Ensure retransmission of the same event doesn't lead to duplicate events in the backend. This requires changes on the backend side.
- Uploading events using a background URLSession. Downside of this approach is that a background session doesn't guarantee timely execution of the request and doesn't give us too much / enough control over how requests are sent or re-sent.
- Starting a background task before transmitting and ending it right after. This is the approach taken in this PR:
1 Error | |
---|---|
:no_entry_sign: | Please add a line to the CHANGELOG.md since you changed the SDK. |
1 Warning | |
---|---|
:warning: | Are there any changes that should be explained in the README.md ? |
Generated by :no_entry_sign: Danger