Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
32c7eb8
refactor: update ios interfaces to enforce non-nullable parameters fo…
lposen Aug 22, 2025
5d8c543
refactor: update parameter types in RNIterableAPI to use Double to ma…
lposen Aug 22, 2025
b6e4488
refactor: update parameter types in RNIterableAPI to reflect automati…
lposen Aug 27, 2025
3e252ee
Update ios/RNIterableAPI/ReactIterableAPI.swift
lposen Aug 27, 2025
e0d026e
refactor: simplify attribution info handling and improve error report…
lposen Aug 27, 2025
dfb4934
refactor: update templateId parameter type to Double in RNIterableAPI…
lposen Aug 27, 2025
5a946b2
refactor: remove redundant error handling in RNIterableAPI to streaml…
lposen Aug 27, 2025
c009a1e
refactor: update templateId type to double in trackPushOpenWithCampai…
lposen Aug 28, 2025
f9aa273
refactor: update templateId parameter type to nullable in trackPushOp…
lposen Aug 28, 2025
560a8c5
refactor: update parameter types to nullable in RNIterableAPI for con…
lposen Aug 28, 2025
91062db
Merge branch 'new-arch/master' into new-arch/MOB-11957-ios-crashes-wh…
lposen Aug 28, 2025
5b7870a
Merge branch 'new-arch/MOB-11955-configure-new-architecture' into new…
lposen Aug 28, 2025
4cc665f
refactor: add wakeApp placeholder method
lposen Aug 28, 2025
7664ace
Merge branch 'new-arch/master' into new-arch/MOB-11957-ios-crashes-wh…
lposen Sep 5, 2025
18bd0af
refactor: update initialize2WithApiKey so that parameters are always …
lposen Sep 5, 2025
26fa44b
fix: update clickedUrl parameter type to allow null values in trackIn…
lposen Sep 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void initializeWithApiKey(String apiKey, ReadableMap configReadableMap, S
promise.resolve(true);
}

public void initialize2WithApiKey(String apiKey, ReadableMap configReadableMap, String apiEndPointOverride, String version, Promise promise) {
public void initialize2WithApiKey(String apiKey, ReadableMap configReadableMap, String version, String apiEndPointOverride, Promise promise) {
IterableLogger.d(TAG, "initialize2WithApiKey: " + apiKey);
IterableConfig.Builder configBuilder = Serialization.getConfigFromReadableMap(configReadableMap);

Expand Down Expand Up @@ -167,7 +167,7 @@ public void getUserId(Promise promise) {
promise.resolve(RNIterableInternal.getUserId());
}

public void trackEvent(String name, ReadableMap dataFields) {
public void trackEvent(String name, @Nullable ReadableMap dataFields) {
IterableLogger.v(TAG, "trackEvent");
IterableApi.getInstance().track(name, optSerializedDataFields(dataFields));
}
Expand All @@ -177,16 +177,16 @@ public void updateCart(ReadableArray items) {
IterableApi.getInstance().updateCart(Serialization.commerceItemsFromReadableArray(items));
}

public void trackPurchase(double total, ReadableArray items, ReadableMap dataFields) {
public void trackPurchase(double total, ReadableArray items, @Nullable ReadableMap dataFields) {
IterableLogger.v(TAG, "trackPurchase");
IterableApi.getInstance().trackPurchase(total, Serialization.commerceItemsFromReadableArray(items), optSerializedDataFields(dataFields));
}

public void trackPushOpenWithCampaignId(double campaignId, Double templateId, String messageId, boolean appAlreadyRunning, ReadableMap dataFields) {
public void trackPushOpenWithCampaignId(double campaignId, @Nullable Double templateId, String messageId, boolean appAlreadyRunning, @Nullable ReadableMap dataFields) {

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

RNIterableInternal.trackPushOpenWithCampaignId((int) campaignId, templateId != null ? templateId.intValue() : null, messageId, optSerializedDataFields(dataFields));
}

public void updateSubscriptions(ReadableArray emailListIds, ReadableArray unsubscribedChannelIds, ReadableArray unsubscribedMessageTypeIds, ReadableArray subscribedMessageTypeIds, double campaignId, double templateId) {
public void updateSubscriptions(@Nullable ReadableArray emailListIds, @Nullable ReadableArray unsubscribedChannelIds, @Nullable ReadableArray unsubscribedMessageTypeIds, @Nullable ReadableArray subscribedMessageTypeIds, double campaignId, double templateId) {

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

IterableLogger.v(TAG, "updateSubscriptions");
Integer finalCampaignId = null, finalTemplateId = null;
if (campaignId > 0) {
Expand Down Expand Up @@ -265,7 +265,7 @@ public void getAttributionInfo(Promise promise) {
}
}

public void setAttributionInfo(ReadableMap attributionInfoReadableMap) {
public void setAttributionInfo(@Nullable ReadableMap attributionInfoReadableMap) {
IterableLogger.printInfo();
try {
JSONObject attributionInfoJson = Serialization.convertMapToJson(attributionInfoReadableMap);
Expand Down Expand Up @@ -593,7 +593,7 @@ public void removeListeners(double count) {
// Keep: Required for RN built in Event Emitter Calls.
}

public void passAlongAuthToken(String authToken) {
public void passAlongAuthToken(@Nullable String authToken) {
passedAuthToken = authToken;

if (authHandlerCallbackLatch != null) {
Expand Down
19 changes: 8 additions & 11 deletions android/src/newarch/java/com/RNIterableAPIModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public void initializeWithApiKey(String apiKey, ReadableMap configReadableMap, S
}

@Override
public void initialize2WithApiKey(String apiKey, ReadableMap configReadableMap, String apiEndPointOverride, String version, Promise promise) {
moduleImpl.initialize2WithApiKey(apiKey, configReadableMap, apiEndPointOverride, version, promise);
public void initialize2WithApiKey(String apiKey, ReadableMap configReadableMap, String version, String apiEndPointOverride, Promise promise) {

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): initialize2WithApiKey [qlty:function-parameters]

Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): initialize2WithApiKey [qlty:function-parameters]

moduleImpl.initialize2WithApiKey(apiKey, configReadableMap, version, apiEndPointOverride, promise);
}

@Override
Expand Down Expand Up @@ -71,7 +71,7 @@ public void getUserId(Promise promise) {
}

@Override
public void trackEvent(String name, ReadableMap dataFields) {
public void trackEvent(String name, @Nullable ReadableMap dataFields) {
moduleImpl.trackEvent(name, dataFields);
}

Expand All @@ -81,17 +81,17 @@ public void updateCart(ReadableArray items) {
}

@Override
public void trackPurchase(double total, ReadableArray items, ReadableMap dataFields) {
public void trackPurchase(double total, ReadableArray items, @Nullable ReadableMap dataFields) {
moduleImpl.trackPurchase(total, items, dataFields);
}

@Override
public void trackPushOpenWithCampaignId(double campaignId, Double templateId, String messageId, boolean appAlreadyRunning, ReadableMap dataFields) {
public void trackPushOpenWithCampaignId(double campaignId, @Nullable Double templateId, String messageId, boolean appAlreadyRunning, @Nullable ReadableMap dataFields) {

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

moduleImpl.trackPushOpenWithCampaignId(campaignId, templateId, messageId, appAlreadyRunning, dataFields);
}

@Override
public void updateSubscriptions(ReadableArray emailListIds, ReadableArray unsubscribedChannelIds, ReadableArray unsubscribedMessageTypeIds, ReadableArray subscribedMessageTypeIds, double campaignId, double templateId) {
public void updateSubscriptions(@Nullable ReadableArray emailListIds, @Nullable ReadableArray unsubscribedChannelIds, @Nullable ReadableArray unsubscribedMessageTypeIds, @Nullable ReadableArray subscribedMessageTypeIds, double campaignId, double templateId) {

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

moduleImpl.updateSubscriptions(emailListIds, unsubscribedChannelIds, unsubscribedMessageTypeIds, subscribedMessageTypeIds, campaignId, templateId);
}

Expand Down Expand Up @@ -121,7 +121,7 @@ public void getAttributionInfo(Promise promise) {
}

@Override
public void setAttributionInfo(ReadableMap attributionInfoReadableMap) {
public void setAttributionInfo(@Nullable ReadableMap attributionInfoReadableMap) {
moduleImpl.setAttributionInfo(attributionInfoReadableMap);
}

Expand Down Expand Up @@ -185,7 +185,6 @@ public void setAutoDisplayPaused(final boolean paused) {
moduleImpl.setAutoDisplayPaused(paused);
}

@Override
public void wakeApp() {
moduleImpl.wakeApp();
}
Expand All @@ -200,7 +199,6 @@ public void endSession() {
moduleImpl.endSession();
}

@Override
public void updateVisibleRows(ReadableArray visibleRows) {
moduleImpl.updateVisibleRows(visibleRows);
}
Expand All @@ -215,8 +213,7 @@ public void removeListeners(double count) {
moduleImpl.removeListeners(count);
}

@Override
public void passAlongAuthToken(String authToken) {
public void passAlongAuthToken(@Nullable String authToken) {
moduleImpl.passAlongAuthToken(authToken);
}

Expand Down
16 changes: 8 additions & 8 deletions android/src/oldarch/java/com/RNIterableAPIModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public void initializeWithApiKey(String apiKey, ReadableMap configReadableMap, S
}

@ReactMethod
public void initialize2WithApiKey(String apiKey, ReadableMap configReadableMap, String apiEndPointOverride, String version, Promise promise) {
moduleImpl.initialize2WithApiKey(apiKey, configReadableMap, apiEndPointOverride, version, promise);
public void initialize2WithApiKey(String apiKey, ReadableMap configReadableMap, String version, String apiEndPointOverride, Promise promise) {

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): initialize2WithApiKey [qlty:function-parameters]

Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): initialize2WithApiKey [qlty:function-parameters]

moduleImpl.initialize2WithApiKey(apiKey, configReadableMap, version, apiEndPointOverride, promise);
}

@ReactMethod
Expand Down Expand Up @@ -74,7 +74,7 @@ public void getUserId(Promise promise) {
}

@ReactMethod
public void trackEvent(String name, ReadableMap dataFields) {
public void trackEvent(String name, @Nullable ReadableMap dataFields) {
moduleImpl.trackEvent(name, dataFields);
}

Expand All @@ -84,17 +84,17 @@ public void updateCart(ReadableArray items) {
}

@ReactMethod
public void trackPurchase(double total, ReadableArray items, ReadableMap dataFields) {
public void trackPurchase(double total, ReadableArray items, @Nullable ReadableMap dataFields) {
moduleImpl.trackPurchase(total, items, dataFields);
}

@ReactMethod
public void trackPushOpenWithCampaignId(double campaignId, Double templateId, String messageId, boolean appAlreadyRunning, ReadableMap dataFields) {
public void trackPushOpenWithCampaignId(double campaignId, @Nullable Double templateId, String messageId, boolean appAlreadyRunning, @Nullable ReadableMap dataFields) {

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 5): trackPushOpenWithCampaignId [qlty:function-parameters]

moduleImpl.trackPushOpenWithCampaignId(campaignId, templateId, messageId, appAlreadyRunning, dataFields);
}

@ReactMethod
public void updateSubscriptions(ReadableArray emailListIds, ReadableArray unsubscribedChannelIds, ReadableArray unsubscribedMessageTypeIds, ReadableArray subscribedMessageTypeIds, double campaignId, double templateId) {
public void updateSubscriptions(@Nullable ReadableArray emailListIds, @Nullable ReadableArray unsubscribedChannelIds, @Nullable ReadableArray unsubscribedMessageTypeIds, @Nullable ReadableArray subscribedMessageTypeIds, double campaignId, double templateId) {

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): updateSubscriptions [qlty:function-parameters]

moduleImpl.updateSubscriptions(emailListIds, unsubscribedChannelIds, unsubscribedMessageTypeIds, subscribedMessageTypeIds, campaignId, templateId);
}

Expand Down Expand Up @@ -124,7 +124,7 @@ public void getAttributionInfo(Promise promise) {
}

@ReactMethod
public void setAttributionInfo(ReadableMap attributionInfoReadableMap) {
public void setAttributionInfo(@Nullable ReadableMap attributionInfoReadableMap) {
moduleImpl.setAttributionInfo(attributionInfoReadableMap);
}

Expand Down Expand Up @@ -219,7 +219,7 @@ public void removeListeners(double count) {
}

@ReactMethod
public void passAlongAuthToken(String authToken) {
public void passAlongAuthToken(@Nullable String authToken) {
moduleImpl.passAlongAuthToken(authToken);
}

Expand Down
Loading
Loading