Skip to content
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

Check for SDK initialization #688

Merged
merged 4 commits into from
Mar 6, 2024
Merged

Check for SDK initialization #688

merged 4 commits into from
Mar 6, 2024

Conversation

hani-iterable
Copy link
Contributor

@hani-iterable hani-iterable commented Jan 23, 2024

🔹 Jira Ticket(s) if any

✏️ Description

We have added a check for SDK initialization on the necessary method call to address the crash.

@evantk91 evantk91 added the omni-cg PR's from OMNI CG label Jan 24, 2024
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (02cf973) 62.74% compared to head (c25d06c) 62.70%.

Files Patch % Lines
...ain/java/com/iterable/iterableapi/IterableApi.java 33.33% 7 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #688      +/-   ##
==========================================
- Coverage   62.74%   62.70%   -0.04%     
==========================================
  Files          75       75              
  Lines        4678     4687       +9     
  Branches      529      530       +1     
==========================================
+ Hits         2935     2939       +4     
- Misses       1444     1447       +3     
- Partials      299      301       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Ayyanchira Ayyanchira self-requested a review February 9, 2024 08:05
}

/**
* Disables the device from push notifications
*/
public void disablePush() {
IterablePushRegistrationData data = new IterablePushRegistrationData(_email, _userId, _authToken, getPushIntegrationName(), IterablePushRegistrationData.PushRegistrationAction.DISABLE);
IterablePushRegistration.executePushRegistrationTask(data);
if (checkSDKInitialization()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very important checks!

@@ -1110,20 +1123,20 @@ public void updateUser(@NonNull JSONObject dataFields, Boolean mergeNestedObject
* user email or user ID is set before calling this method.
*/
public void registerForPush() {
if (!checkSDKInitialization()) {
return;
if (checkSDKInitialization()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better now..

@jena-chakour jena-chakour merged commit d86bc45 into master Mar 6, 2024
5 checks passed
@jena-chakour jena-chakour deleted the MOB-6916 branch March 6, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
omni-cg PR's from OMNI CG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants