Open
Description
This issue was originally created by @jongirard as facebook/react-native#20821.
- [ √ ] Review the documentation: https://facebook.github.io/react-native
- [ √ ] Search for existing issues: https://github.com/facebook/react-native/issues
- [ √ ] Use the latest React Native release: https://github.com/facebook/react-native/releases
(Related issue marked as fixed but problem still exists: facebook/react-native#9105)
Environment
System:
OS: macOS High Sierra 10.13.5
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 29.44 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.5.0 - /usr/local/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 6.1.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
IDEs:
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
react-native-cli: 2.0.1
Description
As per the React Native documentation, PushNotificationIOS.requestPermissions
method should return a promise to wait for user input, but nothing is ever returned. I've also tried adding an event listener in componentWillMount
like PushNotificationIOS.addEventListener('register', (token) => {});
which also does not resolve the requestPermissions promise.
Reproducible Demo
PushNotificationIOS.requestPermissions().then((permissions) => console.log(permissions));