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
[Deferred deep linking](https://en.wikipedia.org/wiki/Deferred_deep_linking) allows a user who does not have a specific app installed to:
255
+
256
+
- Click on a deep link that would normally open content in that app.
257
+
- Install the app from the App Store.
258
+
- Open the app and immediately see the content referenced by the link.
259
+
260
+
As the name implies, the deep link is _deferred_ until the app has been installed.
261
+
262
+
After tapping a deep link in an email from an Iterable campaign, users without the associated app will be directed to the App Store to install it. If the app uses the IterableSDK and has deferred deep linking enabled, the content associated with the deep link will load on first launch.
263
+
264
+
#### Enabling deferred deep linking
265
+
266
+
Set `IterableConfig.checkForDeferredDeeplink = true` to enable deferred deep linking for IterableSDK.
251
267
252
-
#### In-app messages
268
+
### In-app messages
269
+
270
+
If you are already using in-app messages with IterableSDK, please check out the [migration section](#Migrating-in-app-messages-from-the-previous-version-of-the-SDK).
271
+
272
+
In-app messages are handled via silent push messages from the server. When your application receives a silent push, you need to call IterableSDK in your AppDelegate as in the following code:
If you are already using in-app messages with IterableSDK, please check out the [migration section](#Migrating-in-app-messages-from-previous-version-of-SDK).
By default, when an in-app message arrives from the server, the SDK automatically shows it if the app is in the foreground. If an in-app message is already showing when the new message arrives, the new in-app message will be shown 30 seconds after the currently displayed in-app message closes ([see how to change this default value below](#Changing-the-display-interval-between-in-app-messages)). Once an in-app message is shown, it will be "consumed" from the server queue and removed from the local queue as well. There is no need to write any code to get this default behavior.
259
294
260
-
##### Overriding whether to show or skip a particular in-app message
295
+
#### Overriding whether to show or skip a particular in-app message
261
296
262
297
An incoming in-app message triggers a call to the `onNew` method of `IterableConfig.inAppDelegate` (an object of type `IterableInAppDelegate`). To override the default behavior, set `IterableConfig.inAppDelegate` to a custom class that overrides the `onNew` method. `onNew` should return `.show` to show the incoming in-app message or `.skip` to skip showing it.
263
298
@@ -302,7 +337,7 @@ config.inAppDelegate = self; // or other class implementing the protocol
302
337
[IterableAPI initializeWithApiKey:@"YOUR API KEY" launchOptions:launchOptions config:config];
303
338
```
304
339
305
-
##### Getting the local queue of in-app messages
340
+
#### Getting the local queue of in-app messages
306
341
Until they are consumed by the app, all in-app messages that arrive from the server are stored in a local queue. To access that local queue, use the read-only `IterableAPI.inAppManager` property (which conforms to the `InAppManager` protocol). By default, all in-app messages in the local queue will be consumed and removed from this queue. To keep in-app messages around after they are shown, override the default behavior (as described above).
##### When user clicks a button/link in the in-app message
371
+
#### When user clicks a button/link in the in-app message
337
372
338
373
Button/link clicks from in-app are handled similar to deep links from notifications and emails. Please see those sections above. If the in-app message's clicked button/link's `href` contains a URL (which is usually the case), tapping that button/link will call the `handle` method of `IterableConfig.urlDelegate` (an object of type `IterableURLDelegate`), if one is set. By default if this delegate is not set, tapping the button/link will open Safari with the `href` of the clicked button/link.
#####Changing the display interval between in-app messages
385
+
#### Changing the display interval between in-app messages
351
386
352
387
To customize the time delay between successive in-app messages (default value of 30 seconds), set `IterableConfig.inAppDisplayInterval` to an appropriate value (in seconds).
353
388
354
-
#####Migrating in-app messages from the previous version of the SDK
389
+
#### Migrating in-app messages from the previous version of the SDK
355
390
356
391
If you are already using in-app messages, then you will have to make the following changes to your code:
357
392
@@ -360,21 +395,21 @@ If you are already using in-app messages, then you will have to make the followi
360
395
3. Remove calls to 'IterableAPI.getInAppMessages()' and use `IterableAPI.inAppManager.getInAppMessages()` instead.
361
396
362
397
363
-
####Tracking custom events
398
+
### Tracking custom events
364
399
365
400
Custom events can be tracked using `IterableAPI.track(event:...)` calls.
366
401
367
-
####Updating user fields
402
+
### Updating user fields
368
403
369
404
User fields can be modified using `IterableAPI.updateUser` call. You also have `updateEmail` and `updateSubscriptions` methods.
370
405
371
-
####Disabling push notifications to a device
406
+
### Disabling push notifications to a device
372
407
373
408
When a user logs out, you typically want to disable push notifications to that user/device. This can be accomplished by calling `disableDeviceForCurrentUser`. Please note that it will only attempt to disable the device if you have previously called `registerToken`.
374
409
375
410
In order to re-enable push notifcations to that device, simply call `registerToken` as usual when the user logs back in.
376
411
377
-
####Uninstall tracking
412
+
### Uninstall tracking
378
413
379
414
Iterable will track uninstalls with no additional work by you.
0 commit comments