Closed sairamkotha closed 10 months ago
Hello! Thanks for filing this issue and for the PR. We will take a look at both now. I think we may have gotten our wires crossed on this field. Quick Question: it looks like you may have excluded the token in this request. This is meant to be a required field but we were curious if you just excluded intentionally from the example or it was missing in the payload?
@ndurell I was unable to register PN using this SDK, So I was debugging the SDK and found that my device is in low power mode & background refresh disabled. In these cases, it keeps failing to send the device token to Klaviyo.
Tested out the change and looks good. I do see the token in the request when I test. I'm going to merge your PR and I will post a release probably later today or tomorrow.
Description
Push Tokens are not registering on the dashboard when the background refresh is a UNAVAILABLE field inside the push tokens API. API: https://a.klaviyo.com/client/push-tokens/?company_id=XXXXXX Request body:
Response:
Based on the Swift code: This enum returns UNAVAILABLE and API is returning 400 status code. enum PushBackground: String { case available = "AVAILABLE" case unavailable = "UNAVAILABLE"
Checklist
main
branch of this package.Expected behavior
Push tokens API shouldn't fail for background request status
Actual behavior
No response
Steps to reproduce
No response
The Klaviyo Swift SDK version information
2.2.0 version
Destination operating system
iOS 16.4
Xcode version information
Xcode: 14.3.1
Swift Compiler version information
No response