Skip to content

Commit d6c07d6

Browse files
authored
Merge pull request #196 from rees46/feat/in-up-notification-update
docs(mobile-in-app-push-notifications): needReinitialization descript…
2 parents cd9d42f + e360026 commit d6c07d6

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

Diff for: source/includes/_mobile_in_app_push_notifications.md.erb

+27-13
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ SDK initialization example with parentViewController. Initialize the SDK first,
2020

2121
parentViewController - parameter required for alerts
2222

23-
stream - parameter is required if you are going to use alrts
23+
needReInitialization - pop-ups are delivered only during the initialization phase, when this parameter's value is true it triggers reinitialization
24+
25+
stream - parameter is required if you are going to use alerts
2426

2527
*/
2628

2729
let sdk = createPersonalizationSDK(
2830
shopId: "YOUR_SHOP_ID",
2931
apiDomain: "YOUR_API_DOMEN"
3032
parentViewController: rootViewController,
33+
needReInitialization = true,
3134
stream: "ios",
3235
onError: { error in
3336
print("Initialization error: \(error.localizedDescription)")
@@ -88,12 +91,13 @@ notificationWidget?.showBottomDialog(
8891

8992
### initialization parameters for iOS
9093

91-
| Parameter | Category | Description |
92-
|----------------------|-------------|-----------------------------------------------------------------------------------------------------------------|
93-
| shopId | required | Your shop ID |
94-
| apiDomain | required | API endpoint for URL request creation |
95-
| parentViewController | optional | This parameter must be provided if you want to enable alerts |
96-
| stream | conditional | Platform specific value "ios" must be passed if alerts are enabled (parentViewController parameter is provided) |
94+
| Parameter | Category | Description |
95+
|----------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------|
96+
| shopId | required | Your shop ID |
97+
| apiDomain | required | API endpoint for URL request creation |
98+
| parentViewController | optional | This parameter must be provided if you want to enable alerts |
99+
| needReInitialization | required | Pop-ups are delivered only during the initialization phase, and this flag triggers the necessary reinitialization to receive them. |
100+
| stream | conditional | Platform specific value "ios" must be passed if alerts are enabled (parentViewController parameter is provided) |
97101

98102
### Alert management
99103

@@ -126,11 +130,20 @@ Supported Alert Types:
126130

127131
Initialize the SDK first, then set up the fragmentManagers.
128132

133+
shopId - your shop ID
134+
135+
context - the part that provides access to the core resources of your App
136+
137+
needReInitialization - pop-ups are delivered only during the initialization phase, when this parameter's value is true it triggers reinitialization
138+
139+
stream - parameter is required if you are going to use alerts
140+
129141
*/
130142

131143
sdk.initialize(
132144
context = "YOUR_CONTEXT",
133-
shopId = "YOUR_SHOP_ID"
145+
shopId = "YOUR_SHOP_ID",
146+
needReInitialization = true
134147
)
135148

136149
sdk.initializeFragmentManager(
@@ -142,11 +155,12 @@ sdk.initializeFragmentManager(
142155

143156
### initialization parameters for Android
144157

145-
| Parameter | Category | Description |
146-
|-----------|-------------|-----------------------------------------------------------------------------------------|
147-
| shopId | required | Your shop ID |
148-
| context | required | The part that provides access to the core resources of your App |
149-
| stream | conditional | Platform specific value "android" must be passed if the fragmentManager was initialized |
158+
| Parameter | Category | Description |
159+
|----------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------|
160+
| shopId | required | Your shop ID |
161+
| context | required | The part that provides access to the core resources of your App |
162+
| needReInitialization | required | Pop-ups are delivered only during the initialization phase, and this flag triggers the necessary reinitialization to receive them. |
163+
| stream | conditional | Platform specific value "android" must be passed if the fragmentManager was initialized |
150164

151165
The `fragmentManager` must be initialized separately if you want to enable alerts.
152166

0 commit comments

Comments
 (0)