|
1 | 1 | [](https://cocoapods.org/pods/IterableSDK) |
2 | 2 | [](https://opensource.org/licenses/MIT) |
3 | | -[](http://cocoadocs.org/docsets/IterableSDK/4.2.0/) |
| 3 | +[](http://cocoadocs.org/docsets/IterableSDK/4.3.0/) |
4 | 4 |
|
5 | 5 | # Iterable iOS SDK |
6 | 6 |
|
@@ -168,6 +168,40 @@ To display the user's InApp notifications call `spawnInAppNotification` with a d |
168 | 168 |
|
169 | 169 | InApp opens and button clicks are automatically tracked when the notification is called via `spawnInAppNotification`. |
170 | 170 |
|
| 171 | +#### Deeplinking |
| 172 | +You can setup your app to track email clicks and maintain deeplinking directly into your app with [iOS Universal Links] (https://support.iterable.com/hc/en-us/articles/115000440206). |
| 173 | + |
| 174 | +From your application's [restorationHandler] (https://developer.apple.com/reference/uikit/uiapplicationdelegate/1623072-application) call `getAndTrackDeeplink` along with a callback to handle the original deeplink url. |
| 175 | + |
| 176 | + |
| 177 | +```swift |
| 178 | +<SWIFT> |
| 179 | +func application(_ application: UIApplication, continue userActivity: NSUserActivity, |
| 180 | + restorationHandler: @escaping ([Any]?) -> Void) -> Bool { |
| 181 | + |
| 182 | + IterableAPI.getAndTrackDeeplink(userActivity.webpageURL!, callbackBlock: { |
| 183 | + (originalURL) in |
| 184 | + //Handle Original URL deeplink here |
| 185 | + }); |
| 186 | + return true |
| 187 | +} |
| 188 | +``` |
| 189 | + |
| 190 | +```objective-c |
| 191 | +<OBJECTIVE-C> |
| 192 | +- (BOOL)application:(UIApplication *)application |
| 193 | + continueUserActivity(NSUserActivity *)userActivity |
| 194 | + restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler { |
| 195 | + |
| 196 | + ITEActionBlock callbackBlock = ^(NSString* originalURL) { |
| 197 | + //Handle Original URL deeplink here |
| 198 | + }; |
| 199 | + [IterableAPI getAndTrackDeeplink:iterableLink callbackBlock:callbackBlock]; |
| 200 | + |
| 201 | + return true; |
| 202 | +} |
| 203 | +``` |
| 204 | +
|
171 | 205 | # Additional Information |
172 | 206 |
|
173 | 207 | See our [setup guide](http://support.iterable.com/hc/en-us/articles/204780589-Push-Notification-Setup-iOS-and-Android-) for more information. |
|
0 commit comments