Skip to content

Conversation

Naturalclar
Copy link
Collaborator

@Naturalclar Naturalclar commented Dec 28, 2019

Summary

There seemed to be many people who are having trouble with using this library in RN 0.61.x, as shown in #43 and #50

I've upgraded the example directory to get it working with RN 0.61.5

Test Plan

iOS iOS

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added a sample use of the API in the example project (example/App.js)

}

// Required to register for notifications
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
Copy link

@andrewtremblay-pear andrewtremblay-pear Jan 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't these methods still required as long as we continue to target iOS <10.0?

Also, maybe it is time to add the more recent, non-deprecated methods.
https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623022-application?language=objc#declarations

@ecreeth
Copy link

ecreeth commented Feb 10, 2020

@Naturalclar some changes have been made in the core: D19700061

Original summary:
Resolve and reject promise for PushNotificationIOS.requestPermissions by Paige Sun

@Naturalclar
Copy link
Collaborator Author

@ecreeth Thanks for letting me know!
I'll look into it

@AtlantisPleb
Copy link

AtlantisPleb commented Feb 21, 2020

Regarding this line...

import RCTDeviceEventEmitter from 'react-native/Libraries/EventEmitter/RCTDeviceEventEmitter';

...this shorter version works for me (RN 61.5):

import { DeviceEventEmitter } from 'react-native'

@Naturalclar
Copy link
Collaborator Author

@Entryist Thanks so much for the info 👍 updated the example to use DeviceEventEmitter

@Naturalclar Naturalclar merged commit 488eff1 into react-native-push-notification:master Mar 18, 2020
@Naturalclar Naturalclar deleted the chore/updateExample branch March 18, 2020 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants