-
Notifications
You must be signed in to change notification settings - Fork 39
Jwt/other fixes #725
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/other fixes #725
Conversation
…hFailure event handling
… new enum for failure reasons
…exponential backoff options
…rableAPI directly
…Iterable SDK initialization
Diff Coverage: The code coverage on the diff in this pull request is 0.0%. Total Coverage: This PR will decrease coverage by 0.66%. File Coverage Changes
🛟 Help
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
❌ 4 blocking issues (6 total)
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
@@ -0,0 +1,39 @@ | |||
/** |
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.
@@ -0,0 +1,7 @@ | |||
/** |
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.
@@ -0,0 +1,18 @@ | |||
import type { IterableAuthFailureReason } from "../enums/IterableAuthFailureReason"; |
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.
@@ -0,0 +1,13 @@ | |||
import type { IterableRetryBackoff } from "../enums"; |
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.
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