Azure-Samples / Azure-Samples/communication-services-ios-quickstarts
chatclient startPushNotifications "Service returned invalid status code"
- Dominant language
- Swift
- Stars
- 13
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
### This issue is for a: (mark with an `x`)
```
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```
### Minimal steps to reproduce
I'm working on a React Native app that needs to implemet Azure Communication Chat. I've made a Swift native module that should take care of enabling push notification via chatclient. Therefore I've followed the instructions to integrate the iOS sdk on the native part of my app.
What is working:
- Communication between React Native components and Swift module
- ChatClient generation (I can list threads)
What is not working:
When I call the `chatclient.startPushNotifications` method, passig of course the correct `deviceToken`, I get an error and the push notifications don't get enabled.
### Any log messages given by the failure
This is the error throwed by the library
`error: client("Failed to start push notifications", Optional(AzureCore.AzureError.client("Failed to start push notifications", Optional(AzureCore.AzureError.client("Registration request failed.", Optional(AzureCore.AzureError.client("Registration request failed.", Optional(AzureCore.AzureError.service("Service returned invalid status code [400]", nil)))))))))]}`
### Expected/desired behavior
Since the deviceToken is generated correctly and sucesfuly used for other remote push notifications services, it should register just fine for Azure Chat.
### OS and Version?
The error is occourring on iOS 13 running on an emulator.
### Versions
AzureCommunicationChat iOS SDK 1.3.1
Contributor guide
Assessment
This issue has not been assessed yet.