Iterable / swift-sdk

Iterable's iOS SDK. Receive and track pushes to Iterable from your iOS app.
https://iterable.com/
MIT License
86 stars 67 forks source link

Add `onLogoutPreviousUserFailed` delegate to the `IterableAuthDelegate` #671

Open woosiki-prestolabs opened 10 months ago

woosiki-prestolabs commented 10 months ago

🔹 Jira Ticket(s)

I can not make Jira ticket for this because I don't have permission to access Jira.

✏️ Description

I am a iOS software engineer at PrestoLabs and was asked by Daryl Greaves to make a PR what I requested specifications. I requested the specifications below but I only made this PR for 3rd one.

  1. Can I use disableDeviceForAllUsers when I set autoPushRegistration as true?
    • I got a response that I can use disableDeviceForAllUsers.
  2. Could you make a patch that retry register api when it failed by network error?
    • I found a onFailure callback when register api was failed.
    • IterableAPI.register(token: Data, , onSuccess: OnSuccessHandler? = nil, onFailure: OnFailureHandler? = nil)
  3. Could you make a patch that notify when unregister device failed by 401 error?
woosiki-prestolabs commented 10 months ago

I have a question about function of disableDeviceForAllUsers. I call this when jwt token already disabled, but it still fail as {"msg":"JWT Authorization header is not set","code":"BadAuthorizationHeader","params":null}. Did you know how I can disable device for all users when user already logged out?

스크린샷 2023-08-30 오후 5 55 12