-
Notifications
You must be signed in to change notification settings - Fork 39
[MOB-11032] task-4-ios-bridge-retrypolicy-and-authfailure #728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
Are you sure you want to change the base?
Conversation
…gistration in AppDelegate
…n ReactIterableAPI
…terableAppProvider
Diff Coverage: The code coverage on the diff in this pull request is 100.0%. Total Coverage: This PR will not change total coverage. 🛟 Help
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
*/ | ||
export enum IterableAuthFailureReason { | ||
/** | ||
* An auth token's expiration must be less than one year from its issued-at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is changed because iOS gives back the numeric value instead of the string value
2 new issues
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
…oid-br' into jwt/MOB-11032-task-4-ios-bridge-retrypolicy-and-authfailure
private func setupUserNotificationCenter() { | ||
UNUserNotificationCenter.current().delegate = self | ||
UNUserNotificationCenter.current().getNotificationSettings { settings in | ||
if settings.authorizationStatus != .authorized { | ||
ITBInfo("Not authorized") | ||
// not authorized, ask for permission | ||
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { success, _ in | ||
ITBInfo("auth: \(success)") | ||
if success { | ||
DispatchQueue.main.async { | ||
UIApplication.shared.registerForRemoteNotifications() | ||
} | ||
} | ||
// TODO: Handle error etc. | ||
} | ||
} else { | ||
// already authorized | ||
ITBInfo("Already authorized") | ||
DispatchQueue.main.async { | ||
UIApplication.shared.registerForRemoteNotifications() | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔹 JIRA Ticket(s) if any
✏️ Description
Added retry for iOS
Instructions
cd example watchman watch-del-all yarn start --reset-cache
yarn ios
config.authHandler = () => {
yarn start
, then pressing r)