Uh oh!
There was an error while loading. Please reload this page.
[PushNotifications] Register for Remote Notifications and Extend AppDelegate - #1019
[PushNotifications] Register for Remote Notifications and Extend AppDelegate#1019lazaronixon wants to merge 2 commits into
Conversation
Added optional callback parameter to requestPermissions Method and Extend AppDelegate so you don’t need to call methods on AppDelegate.h
facebook-github-bot
commented
Apr 26, 2015
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
facebook-github-bot
commented
Apr 26, 2015
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
brentvatne
commented
Apr 28, 2015
@lazaronixon - I definitely like the improvement in the API here, are there any drawbacks to this approach? ObjC isn't my strongest language - is this automatically imported into |
whatupdave
commented
Apr 28, 2015
BTW I'm using this fork in my app, works great. |
tadeuzagallo
commented
Apr 28, 2015
This is pretty fragile... What if the person renames the file? or the folder? or move the library? This would also break any example app... When I wrote it I tried swizzling as well, but it doesn't work because we don't know the AppDelegate's class at load time, we thought about some other options, but none of them seemed to be good. Something that I'm not sure (cc @nicklockwood in case you don't know as well) is whether |
lazaronixon
commented
Apr 28, 2015
You're right @tadeuzagallo it is a price to pay, but too high to me, a solution i found was |
nicklockwood
commented
Apr 28, 2015
With a bit of runtime logic we could just detect if the RCTPushNotificationManager exists, and include the necessary code to call it in the AppDelegate of the standard project template. Maybe that's the best option. |
lazaronixon
commented
Apr 29, 2015
If I move AppDelegate+notification to SampleApp Folder and with |
ghost
commented
Aug 4, 2015
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed. |
tadeuzagallo
commented
Aug 4, 2015
@nicklockwood should we add this code to the SampleApp's AppDelegate, or should I close it for now? |
DannyvanderJagt
commented
Aug 14, 2015
@tadeuzagallo@nicklockwood This PR consists of 3 discussions which are continued here: Extend the appdelegate
Device token PushNotificationIOS.addEventListener('register',function(token){console.log('You are registered and the device token is: ',token)});Error handling I think that this PR can be closed. |
satya164
commented
Dec 22, 2015
@lazaronixon Any updates on this? |
facebook-github-bot
commented
Dec 22, 2015
@lazaronixon updated the pull request. |
satya164
commented
Jan 26, 2016
Closing since no activity on the PR. let's re-open if you wanna work on it again. |
Added optional callback to requestPermissions Method.
If registration is successful, APNs returns a device token.
If there is a problem in obtaining the token, a error message is returned.
Extend AppDelegate so you don’t need to call methods on AppDelegate.h