Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update example to RN0.61.5 #51

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)

@@ -34,31 +30,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
return YES;
}

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

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.

None yet

4 participants