Skip to content

Commit 0e68107

Browse files
authored
Merge branch 'jwt/master' into loren/embedded/master
2 parents 307326e + e579386 commit 0e68107

File tree

8 files changed

+702
-35
lines changed

8 files changed

+702
-35
lines changed

android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,6 @@ public void onTokenRegistrationSuccessful(String authToken) {
600600
sendEvent(EventName.handleAuthSuccessCalled.name(), null);
601601
}
602602

603-
public void onTokenRegistrationFailed(Throwable object) {
604-
IterableLogger.v(TAG, "Failed to set authToken");
605-
sendEvent(EventName.handleAuthFailureCalled.name(), null);
606-
}
607-
608603
public void addListener(String eventName) {
609604
// Keep: Required for RN built in Event Emitter Calls.
610605
}

example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1212
779227342DFA3FB500D69EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 779227332DFA3FB500D69EC0 /* AppDelegate.swift */; };
1313
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
14+
81F6A9EA0E1CCC1AD730C5D9 /* libPods-ReactNativeSdkExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 56080B9DEED42A97AD1B3D5C /* libPods-ReactNativeSdkExample.a */; };
1415
A3A40C20801B8F02005FA4C0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 1FC6B09E65A7BD9F6864C5D8 /* PrivacyInfo.xcprivacy */; };
15-
CC7C0C660DB585466CC95446 /* libPods-ReactNativeSdkExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D7C71B2515F0E53180477AEC /* libPods-ReactNativeSdkExample.a */; };
1616
/* End PBXBuildFile section */
1717

1818
/* Begin PBXContainerItemProxy section */
@@ -29,18 +29,18 @@
2929
00E356EE1AD99517003FC87E /* ReactNativeSdkExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactNativeSdkExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3030
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3131
00E356F21AD99517003FC87E /* ReactNativeSdkExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReactNativeSdkExampleTests.m; sourceTree = "<group>"; };
32-
054F9627BFE1F378023F2570 /* Pods-ReactNativeSdkExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.debug.xcconfig"; sourceTree = "<group>"; };
3332
13B07F961A680F5B00A75B9A /* ReactNativeSdkExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactNativeSdkExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
3433
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ReactNativeSdkExample/Images.xcassets; sourceTree = "<group>"; };
3534
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeSdkExample/Info.plist; sourceTree = "<group>"; };
3635
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
3736
1FC6B09E65A7BD9F6864C5D8 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
38-
2BE74655C68E80463F6CD81B /* Pods-ReactNativeSdkExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.release.xcconfig"; sourceTree = "<group>"; };
37+
3A95ED4563D4389808EDEA8F /* Pods-ReactNativeSdkExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.debug.xcconfig"; sourceTree = "<group>"; };
38+
56080B9DEED42A97AD1B3D5C /* libPods-ReactNativeSdkExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeSdkExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3939
779227312DFA3FB500D69EC0 /* ReactNativeSdkExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativeSdkExample-Bridging-Header.h"; sourceTree = "<group>"; };
4040
779227322DFA3FB500D69EC0 /* ReactNativeSdkExampleTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ReactNativeSdkExampleTests-Bridging-Header.h"; sourceTree = "<group>"; };
4141
779227332DFA3FB500D69EC0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = ReactNativeSdkExample/AppDelegate.swift; sourceTree = "<group>"; };
4242
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeSdkExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
43-
D7C71B2515F0E53180477AEC /* libPods-ReactNativeSdkExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeSdkExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
43+
EA19B65827A1D757CC5AAC97 /* Pods-ReactNativeSdkExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeSdkExample.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample.release.xcconfig"; sourceTree = "<group>"; };
4444
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4545
/* End PBXFileReference section */
4646

@@ -56,7 +56,7 @@
5656
isa = PBXFrameworksBuildPhase;
5757
buildActionMask = 2147483647;
5858
files = (
59-
CC7C0C660DB585466CC95446 /* libPods-ReactNativeSdkExample.a in Frameworks */,
59+
81F6A9EA0E1CCC1AD730C5D9 /* libPods-ReactNativeSdkExample.a in Frameworks */,
6060
);
6161
runOnlyForDeploymentPostprocessing = 0;
6262
};
@@ -99,7 +99,7 @@
9999
isa = PBXGroup;
100100
children = (
101101
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
102-
D7C71B2515F0E53180477AEC /* libPods-ReactNativeSdkExample.a */,
102+
56080B9DEED42A97AD1B3D5C /* libPods-ReactNativeSdkExample.a */,
103103
);
104104
name = Frameworks;
105105
sourceTree = "<group>";
@@ -138,8 +138,8 @@
138138
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
139139
isa = PBXGroup;
140140
children = (
141-
054F9627BFE1F378023F2570 /* Pods-ReactNativeSdkExample.debug.xcconfig */,
142-
2BE74655C68E80463F6CD81B /* Pods-ReactNativeSdkExample.release.xcconfig */,
141+
3A95ED4563D4389808EDEA8F /* Pods-ReactNativeSdkExample.debug.xcconfig */,
142+
EA19B65827A1D757CC5AAC97 /* Pods-ReactNativeSdkExample.release.xcconfig */,
143143
);
144144
path = Pods;
145145
sourceTree = "<group>";
@@ -169,13 +169,13 @@
169169
isa = PBXNativeTarget;
170170
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeSdkExample" */;
171171
buildPhases = (
172-
787BEB56F90C9C0AEE4C88D5 /* [CP] Check Pods Manifest.lock */,
172+
B07642200E1BCDE7A80934E9 /* [CP] Check Pods Manifest.lock */,
173173
13B07F871A680F5B00A75B9A /* Sources */,
174174
13B07F8C1A680F5B00A75B9A /* Frameworks */,
175175
13B07F8E1A680F5B00A75B9A /* Resources */,
176176
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
177-
152370F00B0C82FBF20ABDA2 /* [CP] Embed Pods Frameworks */,
178-
6099F4827CE15646F9A0205B /* [CP] Copy Pods Resources */,
177+
756F1571292F7FB66FB0F625 /* [CP] Embed Pods Frameworks */,
178+
C5D9D662E100C568A4F9922D /* [CP] Copy Pods Resources */,
179179
);
180180
buildRules = (
181181
);
@@ -260,7 +260,7 @@
260260
shellPath = /bin/sh;
261261
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
262262
};
263-
152370F00B0C82FBF20ABDA2 /* [CP] Embed Pods Frameworks */ = {
263+
756F1571292F7FB66FB0F625 /* [CP] Embed Pods Frameworks */ = {
264264
isa = PBXShellScriptBuildPhase;
265265
buildActionMask = 2147483647;
266266
files = (
@@ -277,43 +277,43 @@
277277
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-frameworks.sh\"\n";
278278
showEnvVarsInLog = 0;
279279
};
280-
6099F4827CE15646F9A0205B /* [CP] Copy Pods Resources */ = {
280+
B07642200E1BCDE7A80934E9 /* [CP] Check Pods Manifest.lock */ = {
281281
isa = PBXShellScriptBuildPhase;
282282
buildActionMask = 2147483647;
283283
files = (
284284
);
285285
inputFileListPaths = (
286-
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-input-files.xcfilelist",
287286
);
288-
name = "[CP] Copy Pods Resources";
287+
inputPaths = (
288+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
289+
"${PODS_ROOT}/Manifest.lock",
290+
);
291+
name = "[CP] Check Pods Manifest.lock";
289292
outputFileListPaths = (
290-
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-output-files.xcfilelist",
293+
);
294+
outputPaths = (
295+
"$(DERIVED_FILE_DIR)/Pods-ReactNativeSdkExample-checkManifestLockResult.txt",
291296
);
292297
runOnlyForDeploymentPostprocessing = 0;
293298
shellPath = /bin/sh;
294-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources.sh\"\n";
299+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
295300
showEnvVarsInLog = 0;
296301
};
297-
787BEB56F90C9C0AEE4C88D5 /* [CP] Check Pods Manifest.lock */ = {
302+
C5D9D662E100C568A4F9922D /* [CP] Copy Pods Resources */ = {
298303
isa = PBXShellScriptBuildPhase;
299304
buildActionMask = 2147483647;
300305
files = (
301306
);
302307
inputFileListPaths = (
308+
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-input-files.xcfilelist",
303309
);
304-
inputPaths = (
305-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
306-
"${PODS_ROOT}/Manifest.lock",
307-
);
308-
name = "[CP] Check Pods Manifest.lock";
310+
name = "[CP] Copy Pods Resources";
309311
outputFileListPaths = (
310-
);
311-
outputPaths = (
312-
"$(DERIVED_FILE_DIR)/Pods-ReactNativeSdkExample-checkManifestLockResult.txt",
312+
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources-${CONFIGURATION}-output-files.xcfilelist",
313313
);
314314
runOnlyForDeploymentPostprocessing = 0;
315315
shellPath = /bin/sh;
316-
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
316+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeSdkExample/Pods-ReactNativeSdkExample-resources.sh\"\n";
317317
showEnvVarsInLog = 0;
318318
};
319319
/* End PBXShellScriptBuildPhase section */
@@ -406,7 +406,7 @@
406406
};
407407
13B07F941A680F5B00A75B9A /* Debug */ = {
408408
isa = XCBuildConfiguration;
409-
baseConfigurationReference = 054F9627BFE1F378023F2570 /* Pods-ReactNativeSdkExample.debug.xcconfig */;
409+
baseConfigurationReference = 3A95ED4563D4389808EDEA8F /* Pods-ReactNativeSdkExample.debug.xcconfig */;
410410
buildSettings = {
411411
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
412412
CLANG_ENABLE_MODULES = YES;
@@ -436,7 +436,7 @@
436436
};
437437
13B07F951A680F5B00A75B9A /* Release */ = {
438438
isa = XCBuildConfiguration;
439-
baseConfigurationReference = 2BE74655C68E80463F6CD81B /* Pods-ReactNativeSdkExample.release.xcconfig */;
439+
baseConfigurationReference = EA19B65827A1D757CC5AAC97 /* Pods-ReactNativeSdkExample.release.xcconfig */;
440440
buildSettings = {
441441
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
442442
CLANG_ENABLE_MODULES = YES;

ios/RNIterableAPI/Serialization.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,18 @@ extension IterableConfig {
9494
}
9595
}
9696

97+
if let retryPolicyDict = dict["retryPolicy"] as? [AnyHashable: Any] {
98+
if let maxRetry = retryPolicyDict["maxRetry"] as? Int,
99+
let retryInterval = retryPolicyDict["retryInterval"] as? TimeInterval,
100+
let retryBackoffString = retryPolicyDict["retryBackoff"] as? String
101+
{
102+
let retryBackoffType: RetryPolicy.BackoffType =
103+
retryBackoffString == "EXPONENTIAL" ? .exponential : .linear
104+
config.retryPolicy = RetryPolicy(
105+
maxRetry: maxRetry, retryInterval: retryInterval, retryBackoff: retryBackoffType)
106+
}
107+
}
108+
97109
return config
98110
}
99111

src/core/classes/IterableAuthManager.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ export class IterableAuthManager {
2929
* Pass along an auth token to the SDK.
3030
*
3131
* @param authToken - The auth token to pass along
32+
*
33+
* @example
34+
* ```typescript
35+
* const authManager = new IterableAuthManager();
36+
* authManager.passAlongAuthToken(MY_AUTH_TOKEN);
37+
* ```
3238
*/
3339
passAlongAuthToken(
3440
authToken: string | null | undefined

0 commit comments

Comments
 (0)