Failing APNS For Independent WatchOS6 App
After setting up a new independent WatchOS6 app, which now supports push notifications, getting the device to request the user for push notifications and capturing the push token. I can’t get my server to send a push notification.
With all the correct credentials and P8 set up on my NodeJS server, I have tried to push messages to the device... This is the error all the time:
Status 400 -
DeviceTokenNotForTopic - Which according to Apple’s documentation, means that the Topic (BundleId of the app) is wrong. But in this case it is not.
Tried 2 different NPM packages (for elimination)
Both providing me with the same issue.
Has anyone successfully managed to complete a Independent WatchOS app with APNs? What am I missing
To test the node service, a further 2 tests have been made:
Created a new app, iOS this time, with the same Bundle Identifier, using the pushToken and sending a message the service was successful
Created a new app, another watchOS, with a different Bundle Identifier, this was again rejected but the APNs for the same
To test production, the only way current is to submit to the store for App Store review. TestFlight option is currently not available for the Watch and there is no way to install a production ad-hoc
.ipa manually. Once it is in the store I will continue with further tests.
Problem has been solved.
Xcode has a couple of issues, if you rely on Xcode to sort out your certificates in the developer portal then please don't.
I have been in touch with support and after a few days back and forth with logs it has been made aware that:
- Apple's documentation for Independent WatchOS applications does not state anywhere that the
topic(which is the bundle id) should be the one ending in .watchkitapp
- Xcode does not allow you to add the Push Notification Capability to the .watchkitapp thus meaning it never creates the AppId in your developer portal.
The solution to the problem, I had, was to manually go to the developer portal and add the .watchkitapp AppId and create the certificates, thus allowing my p8 certificate on the server to allow pushes to that particular application.
- → Maximum call stack exceeded when instantiating class inside of a module
- → Browserify api: how to pass advanced option to script
- → Node.js Passing object from server.js to external modules?
- → gulp-rename makes copies, but does not replace
- → requiring RX.js in node.js
- → Remove an ObjectId from an array of objectId
- → Can not connect to Redis
- → React: How to publish page on server using React-starter-kit
- → Express - better pattern for passing data between middleware functions
- → Can't get plotly + node.js to stream data coming through POST requests
- → IsGenerator implementation
- → Async/Await not waiting
- → (Socket.io on nodejs) Updating div with mysql data stops without showing error