You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixes
Fixed the React Native bridge contract for Iterable.initialize on iOS.
The iOS bridge now calls the synchronous native initializer (IterableAPI.initialize) and resolves the JS promise immediately, matching the Android bridge which has always behaved this way.
Previously, the iOS bridge wired the JS promise to the initialize2(callback:) overload, whose callback fires when the first in-app messages fetch settles, not when the SDK is ready to use. That callback is an InAppManager.start() signal and has nothing to do with whether IterableAPI.initialize succeeded.
On iOS, IterableAPI.initialize(...) is synchronous, non-failable, and returns Void. The native SDK is fully usable the moment it returns. There is no init-error channel to await on the native side, and JS callers should not treat the promise as one. await Iterable.initialize(...) is supported for API symmetry but does not gate SDK readiness on any async work.
The user-visible symptom of the old contract was a multi-second to multi-minute hang on the JS promise under JWT or network friction, surfaced as an init failure even though the SDK had already initialized successfully. The error originated in the in-app messages fetch retry budget, not in initialization.
Updates
Added Iterable.registerDeviceToken(token) to re-enable push for the current device.
Android accepts an FCM token string.
iOS accepts a continuous hex string representation of the APNS token.
Replaced the two hardcoded 1000ms magic timeouts in the RN SDK with named, documented, and configurable values (SDK-520).
Added IterableConfig.androidWakeDelayMs (default 1000) to tune the Android deep-link wake delay before the SDK invokes urlHandler. Set to 0 to dispatch synchronously.
Added IterableConfig.authCallbackTimeoutMs (default 6000) to tune the safety-net timeout for the auth callback latch. The default is chosen to comfortably exceed typical mobile auth round-trips while staying well below the native 30s auth latch ceiling on both iOS and Android.
The auth callback gate is now event-driven: the native handleAuthSuccessCalled / handleAuthFailureCalled events resolve the latch immediately. The timer survives only as a fallback when no native event arrives within the configured window, instead of being the primary resolution mechanism.