-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): Updated readme for APNs installation (#93)
- Loading branch information
Showing
1 changed file
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tahourj I'm going to update the example project and will do a PR if the example is working
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free :) I'am wondering how did the implementation worked without adding capabilities as you get Warning/Error if you try to use Push Notification without capabilities ?
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tahourj already added my PR but unf. this lib still doesn't work properly .... the onRegister event never gets triggered even the native call
[RCTSharedApplication() registerForRemoteNotifications];
will definitely executed. o.Oc8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On simulator you don't get event but error, for event you need real device :)
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know :) currently using an iPhone 11 with 13.4 and iPhone 7 with 13.1.3
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you maybe check out my PR and run the example project? maybe i've missed something?!
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So implement :
1 - Request permissions to prompt persmission alert to user
PushNotificationIOS.requestPermissions();
2 - After permission you need to add register event to get token
PushNotificationIOS.addEventListener("register", (token) => { callback( token, null ) });
3- then don't forget error handling for simulator
PushNotificationIOS.addEventListener("registrationError", (error) => { callback( null, error ) // {message: string, code: number, details: any}. });
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non of this breakpoints ever get triggered
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has I said getNotificationSettingsWithCompletionHandler need to be called on main thread.
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's quite common issue on iOS.
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know how to :
Just move all getNotificationSettingsWithCompletionHandler call inside the dispatch block that @kylekurz added
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like this? ...did not work either :/
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well yeah i can send u some Team viewer logins if you like... by email or twitter DM?
But just to be sure my example project form my PR is working on your maschine?
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No no it's not your project I did the main thread thing myself as the PR wasn't yet approved
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Send me your teamviewver credential
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could check it out here https://github.com/Psiiirus/push-notification-ios/tree/Example-project-fixes
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mhh did u make any changes to my fork? ...thats all seems to be really really odd
c8c350d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.