Skip to content

Commit 222d945

Browse files
authored
Merge pull request #404 from Iterable/evan/MOB-4984-review-IterableConfig.ts-comments
[MOB-4984] update IterableConfig.ts comments
2 parents a8d8e77 + cac8883 commit 222d945

File tree

1 file changed

+42
-20
lines changed

1 file changed

+42
-20
lines changed

ts/IterableConfig.ts

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,29 @@ import { IterableInAppShowResponse } from './IterableInAppClasses'
1010

1111
import IterableInAppMessage from './IterableInAppMessage'
1212

13-
1413
type AuthCallBack = (() => void)
1514

1615
/**
17-
Iterable Configuration Object. Use this when initializing the API.
16+
* An IterableConfig object sets various properties of the SDK.
17+
* An IterableConfig object is passed into the static initialize method on the Iterable class when initializing the SDK.
1818
*/
19+
1920
class IterableConfig {
2021
/**
21-
* You don't have to set this variable. Set this value only if you are an existing Iterable customer who has already setup mobile integrations in Iterable Web UI.
22-
* In that case, set this variable to the push integration name that you have set for 'APNS' in Iterable Web UI.
23-
* To view your existing integrations, navigate to Settings > Mobile Apps
24-
*/
22+
* The name of the Iterable push integration that will send push notifications to your app.
23+
* Defaults to your app's application ID or bundle ID for iOS.
24+
*
25+
* Note: Don't specify this value unless you are using an older Iterable push integration that
26+
* has a custom name. To view your existing integrations, navigate to Settings > Mobile Apps.
27+
*/
28+
2529
pushIntegrationName?: string
2630

2731
/**
28-
* When set to true, IterableSDK will automatically register and deregister notification tokens.
29-
*/
32+
* When set to true (which is the default value), IterableSDK will automatically register and deregister
33+
* notification tokens when you provide email or userId values to the SDK using Iterable.setEmail or Iterable.setUserId.
34+
*/
35+
3036
autoPushRegistration = true
3137

3238
/**
@@ -36,30 +42,40 @@ class IterableConfig {
3642
checkForDeferredDeeplink = false
3743

3844
/**
39-
* How many seconds to wait before showing the next in-app, if there are more than one present
40-
*/
45+
* Number of seconds to wait when displaying multiple in-app messages in sequence.
46+
* between each. Defaults to 30 seconds.
47+
*/
48+
4149
inAppDisplayInterval: number = 30.0
4250

4351
/**
44-
* How many seconds to wait before showing the next in-app, if there are more than one present
45-
*/
52+
* A callback function used to handle deep link URLs and in-app message button and link URLs.
53+
*/
54+
4655
urlHandler?: (url: string, context: IterableActionContext) => boolean
4756

4857
/**
49-
* How to handle IterableActions which are other than 'openUrl'
50-
*/
58+
* A function expression used to handle `action://` URLs for in-app buttons and links.
59+
*/
60+
5161
customActionHandler?: (action: IterableAction, context: IterableActionContext) => boolean
5262

5363
/**
54-
* Implement this protocol to override default in-app behavior.
64+
* Implement this callback to override default in-app behavior.
5565
* By default, every single in-app will be shown as soon as it is available.
5666
* If more than 1 in-app is available, we show the first.
67+
*
68+
* See "In-App Messages with Iterable's React Native SDK" in support documentation
69+
* for more information.
5770
*/
5871
inAppHandler?: (message: IterableInAppMessage) => IterableInAppShowResponse
5972

6073
/**
61-
* The handler with which your own calls to your backend containing the auth token happen
74+
* A function expression that provides a valid JWT for the app's current user to Iterable's
75+
* React Native SDK. Provide an implementation for this method only if your app uses a
76+
* JWT-enabled API key.
6277
*/
78+
6379
authHandler?:() => Promise<AuthResponse | String | undefined>
6480

6581
/**
@@ -73,23 +89,29 @@ class IterableConfig {
7389
* This is for calls within the React Native layer, and is separate from `logLevel`
7490
* which affects the Android and iOS native SDKs
7591
*/
92+
7693
logReactNativeSdkCalls: boolean = true
7794

7895
/**
79-
* Set the amount of time (in seconds) before the current auth token expires to make a call to retrieve a new one
96+
* The number of seconds before the current JWT's expiration that the SDK should call the
97+
* authHandler to get an updated JWT.
8098
*/
99+
81100
expiringAuthTokenRefreshPeriod: number = 60.0
82101

83102
/**
84-
* We allow navigation only to urls with `https` protocol (for deep links within your app or external links).
85-
* If you want to allow other protocols, such as, `http`, `tel` etc., please add them to the list below
86-
*/
103+
* Use this array to declare the specific URL protocols that the SDK can expect to see on incoming
104+
* links from Iterable, so it knows that it can safely handle them as needed. This array helps
105+
* prevent the SDK from opening links that use unexpected URL protocols.
106+
*/
107+
87108
allowedProtocols: Array<string> = []
88109

89110
/**
90111
* This specifies the `useInMemoryStorageForInApps` config option downstream to the Android SDK layer.
91112
* Please read the `IterableConfig` file for specific details on this config option.
92113
*/
114+
93115
androidSdkUseInMemoryStorageForInApps: boolean = false
94116

95117
toDict(): any {

0 commit comments

Comments
 (0)