Please sign in to comment.
Expose content-available APS key for iOS silent push
Summary: <details> Thanks for submitting a PR! Please read these instructions carefully: - [ ] Explain the **motivation** for making this change. - [ ] Provide a **test plan** demonstrating that the code is solid. - [ ] Match the **code formatting** of the rest of the codebase. - [ ] Target the `master` branch, NOT a "stable" branch. Please read the [Contribution Guidelines](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md) to learn more about contributing to React Native. </details> _What existing problem does the pull request solve? In iOS when sending a silent push notification you need to configure the 'content-available' APS key to the value of 1 (When this key is present, the system wakes up your app in the background and delivers the notification to its app delegate, see [apple docs](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html#//apple_ref/doc/uid/TP40008194-CH17-SW1)). This PR exposes this property to the notification event handler so app code can handle silent push scenario specifically. Currently this property is not available. I've updated the PushNotificationIOSExample in the RNTester. 1. Open RNTester in xcode 2. Enable the push notifications capability 3. run on device 4. Go to PushNotificationIOS 5. click on "send fake notification" 6. verify alert message contains 'content-available' with a value of 1. Closes #14584 Differential Revision: D5279181 Pulled By: shergin fbshipit-source-id: d2288e147d89ba267f54265d819aa0a9969095e7
- Loading branch information...
Showing with 21 additions and 2 deletions.