Closed Ariandr closed 6 years ago
I also hit this issue. I haven't started to look at the code of this repo, my workaround is to setup a server which talks with apns by myself.
@Ariandr @yajiex Hi, thanks for using my app. I just fixed it, you can now check https://github.com/onmyway133/PushNotifications/releases/tag/1.2.1
@onmyway133 Thanks a lot!
@onmyway133 There is another problem now. When I run the app, it's just blank.
@Ariandr Hi, there was problem with electron-packager so the packaged app is not correct. I will have a look
@onmyway133 great, thanks!
@Ariandr I opened the issue here https://github.com/electron-userland/electron-packager/issues/787, hopefully get an answer then I can continue making new release
@onmyway133 hi, thank you!
@Ariandr @yajiex Hi, can you try https://github.com/onmyway133/PushNotifications/releases/tag/1.2.3
With 1.3.0 I'm getting Failed: BadDeviceToken, but I get the token directly from the device getToken method...
@jaumard Hi, you probably use a wrong token. You should use the token received from this method after you send a request to register for Push Notifications.
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let tokenString = deviceToken.reduce("", {$0 + String(format: "%02X", $1)})
print("deviceToken: \(tokenString)")
}
It seems there is a problem when I switch to the Production environment when I use .p8 token. I get the error: "Failed: BadDeviceToken". But device token is right for Production and I don't get that error, when I use my own server to send the same notification with all the same data (Key Id, Team Id, ...). So, it seems the app doesn't switch environments. Because while I was using Sandbox, everything worked ok.![screenshot at nov 30 18-13-09](https://user-images.githubusercontent.com/13591333/33441224-d9922000-d5fa-11e7-93f9-411216bd4b8e.png)