sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

didRegisterForRemoteNotificationsWithDeviceToken #22

Closed croossin closed 7 years ago

croossin commented 7 years ago

When accepting the enable notification .. didRegisterForRemoteNotificationsWithDeviceToken is not being called... I would expect that to be the case? How else would I go about getting the device token after they accepted enabling notifications?

ivanvorobei commented 7 years ago

@croosin It must work. You can create empty project and try it again? Or send me your project, I am look at

croossin commented 7 years ago

I'm certain... must I do anything else special besides implementing that protocol function and including .notifications?

ivanvorobei commented 7 years ago

@croossin after native notification request you should get the token

Nothing do additional

croossin commented 7 years ago

So I just have to add .notifications to the array and then once they accept that should get fired, correct?

ivanvorobei commented 7 years ago

@croossin

yes, when they accept notification request you get token

croossin commented 7 years ago

I just tried downloading your example project and it still does not call that? Are you sure there is nothing else needed to do.

vmacavero commented 7 years ago

chase, i'm on mobile so i am not sure. Did you enable push on xcode? and did you set permission privacy setting in plist file? Victor

Il giorno 04 mag 2017, alle ore 16:40, Chase notifications@github.com ha scritto:

I just tried downloading your example project and it still does not call that? Are you sure there is nothing else needed to do.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

croossin commented 7 years ago

Yes I have done all of that. The example project doesn't even fire the call...

vmacavero commented 7 years ago

did you try on a real phone ?

Victor

2017-05-04 17:46 GMT+02:00 Chase notifications@github.com:

Yes I have done all of that. The example project doesn't even fire the call...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IvanVorobei/RequestPermission/issues/22#issuecomment-299226163, or mute the thread https://github.com/notifications/unsubscribe-auth/ACYS3tZEbTjU3XQvj0ck_j4_g2HuqwDsks5r2fLpgaJpZM4NQG7I .

croossin commented 7 years ago

Yes tested on a real device...

vmacavero commented 7 years ago

give a look to this : http://stackoverflow.com/questions/39403752/didregisterforremotenotificationswithdevicetoken-is-not-called-in-xcode-8

2017-05-04 19:40 GMT+02:00 Chase notifications@github.com:

Yes tested on a real device...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/IvanVorobei/RequestPermission/issues/22#issuecomment-299257456, or mute the thread https://github.com/notifications/unsubscribe-auth/ACYS3ol-HV8Y6RWrtGS8O3LTFvEC1HVkks5r2g2LgaJpZM4NQG7I .

croossin commented 7 years ago

Does the demo work while on Xcode 8... I will take a look at the SO article.

On May 4, 2017 at 11:36:18, vmacavero (notifications@github.com) wrote:

give a look to this :

http://stackoverflow.com/questions/39403752/didregisterforremotenotificationswithdevicetoken-is-not-called-in-xcode-8

2017-05-04 19:40 GMT+02:00 Chase notifications@github.com:

Yes tested on a real device...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/IvanVorobei/RequestPermission/issues/22#issuecomment-299257456 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ACYS3ol-HV8Y6RWrtGS8O3LTFvEC1HVkks5r2g2LgaJpZM4NQG7I

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/IvanVorobei/RequestPermission/issues/22#issuecomment-299272159, or mute the thread https://github.com/notifications/unsubscribe-auth/AG59bWCi7NRJbWsw4ErttUo84S6_ziS_ks5r2hqigaJpZM4NQG7I .

PavelKandziuba commented 7 years ago

Guys did you enable push capabilities in Targets -> Capabilities? http://joxi.ru/bmoYMMpcVwE0Ay

I just tried and after enabling and reinstalling app - I got push token in App delegate call-back

croossin commented 7 years ago

Yes. I'll try again :)

croossin commented 7 years ago

I have got it to work! Clean project, remove from device, reinstall... Sorry for the hassle!

ivanvorobei commented 7 years ago

Thank everybody for help!