-
Notifications
You must be signed in to change notification settings - Fork 39
Jwt/all #721
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: new-arch/master
Are you sure you want to change the base?
Jwt/all #721
Conversation
…hFailure event handling
… new enum for failure reasons
…exponential backoff options
…rableAPI directly
Diff Coverage: The code coverage on the diff in this pull request is 100.0%. Total Coverage: This PR will not change total coverage. File Coverage Changes
🛟 Help
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
2 new issues
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
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