Skip to content

PushNotificationIOS.requestPermissions never resolves in RN 0.56.0 #7

Open
@cpojer

Description

@cpojer

This issue was originally created by @jongirard as facebook/react-native#20821.


(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));

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions