Skip to content

Conversation

lposen and others added 30 commits August 1, 2025 14:05
…ew-arch/MOB-11828-add-backwards-compatibility
…ew-arch/MOB-11828-add-backwards-compatibility
…d-api-and-codegen

[MOB-11826] make-frontend-api-and-codegen
…ew-arch/MOB-11828-add-backwards-compatibility
…ew-arch/MOB-11828-add-backwards-compatibility
…s-compatibility

[MOB-11828] add-backwards-compatibility
Added copilot suggestion

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…t suggestion

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…t suggestion

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…itecture-support

[MOB-11827] add-new-architecture-support
@lposen lposen marked this pull request as ready for review October 9, 2025 10:30
@lposen lposen changed the title New arch/master [SDK-82] New Architecture Oct 14, 2025
Comment on lines +70 to +97
public void initializeWithApiKey(String apiKey, ReadableMap configReadableMap, String version, Promise promise) {
IterableLogger.d(TAG, "initializeWithApiKey: " + apiKey);
IterableConfig.Builder configBuilder = Serialization.getConfigFromReadableMap(configReadableMap);

@Override
public String getName() {
return "RNIterableAPI";
if (configReadableMap.hasKey("urlHandlerPresent") && configReadableMap.getBoolean("urlHandlerPresent") == true) {
configBuilder.setUrlHandler(this);
}

if (configReadableMap.hasKey("customActionHandlerPresent") && configReadableMap.getBoolean("customActionHandlerPresent") == true) {
configBuilder.setCustomActionHandler(this);
}

if (configReadableMap.hasKey("inAppHandlerPresent") && configReadableMap.getBoolean("inAppHandlerPresent") == true) {
configBuilder.setInAppHandler(this);
}

if (configReadableMap.hasKey("authHandlerPresent") && configReadableMap.getBoolean("authHandlerPresent") == true) {
configBuilder.setAuthHandler(this);
}

IterableApi.initialize(reactContext, apiKey, configBuilder.build());
IterableApi.getInstance().setDeviceAttribute("reactNativeSDKVersion", version);

IterableApi.getInstance().getInAppManager().addListener(this);

// MOB-10421: Figure out what the error cases are and handle them appropriately
// This is just here to match the TS types and let the JS thread know when we are done initializing
promise.resolve(true);
Copy link

Choose a reason for hiding this comment

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

Found 2 issues:

1. Function with high complexity (count = 5): initializeWithApiKey [qlty:function-complexity]


2. Function with many parameters (count = 4): initializeWithApiKey [qlty:function-parameters]

Comment on lines 897 to 903
static updateSubscriptions(
emailListIds: number[] | undefined,
unsubscribedChannelIds: number[] | undefined,
unsubscribedMessageTypeIds: number[] | undefined,
subscribedMessageTypeIds: number[] | undefined,
emailListIds: number[] | null,
unsubscribedChannelIds: number[] | null,
unsubscribedMessageTypeIds: number[] | null,
subscribedMessageTypeIds: number[] | null,
campaignId: number,
templateId: number
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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant