Skip to content

Commit 39f32ac

Browse files
Use uniform tab spacing.
1 parent d855514 commit 39f32ac

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

README.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Attached to the release you will find two framework bundles.
5555

5656
# Initializing the SDK
5757
**Note:** Sample projects are included in this repo.
58-
58+
5959
- [Swift Sample Project](./sample-apps/swift-sample-app)
6060
- [ObjC Sample Project](./sample-apps/objc-sample-app)
6161

@@ -145,7 +145,7 @@ Congratulations! You can now send remote push notifications to your device from
145145
```
146146

147147
2. ##### Deep Linking
148-
148+
149149
* Handling Links from Push Notifications
150150
151151
Push notifications and action buttons may have `openUrl` actions attached to them. When a URL is specified, the SDK first calls `urlDelegate` specified in your `IterableConfig` object. You can use this delegate to handle `openUrl` actions the same way as you handle normal deep links. If the delegate is not set or if it returns `false` (the default), the SDK will open Safari with that URL. If you want to navigate to a UIViewController on receiving a deep link, you should do so in the `urlDelegate`.
@@ -164,30 +164,30 @@ Congratulations! You can now send remote push notifications to your device from
164164
IterableAPI.initialize(apiKey: apiKey, launchOptions:launchOptions, config: config)
165165
...
166166
}
167-
167+
168168
// Iterable URL Delegate. It will be called when you receive
169169
// an `openUrl` event from push notification.
170170
func handle(iterableURL url: URL, inContext context: IterableActionContext) -> Bool {
171-
return DeeplinkHandler.handle(url: url)
171+
return DeeplinkHandler.handle(url: url)
172172
}
173173
```
174174
175175
Objective-C:
176176
177177
```objective-c
178178
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
179-
...
180-
// Initialize Iterable SDK
181-
IterableConfig *config = [[IterableConfig alloc] init];
182-
...
179+
...
180+
// Initialize Iterable SDK
181+
IterableConfig *config = [[IterableConfig alloc] init];
182+
...
183183
config.urlDelegate = self;
184-
[IterableAPI initializeWithApiKey:@"YOUR API KEY" launchOptions:launchOptions config:config];
185-
...
184+
[IterableAPI initializeWithApiKey:@"YOUR API KEY" launchOptions:launchOptions config:config];
185+
...
186186
}
187187
188188
- (BOOL)handleIterableURL:(NSURL *)url context:(IterableActionContext *)context {
189-
// Assuming you have a DeeplinkHandler class that handles all deep link URLs and navigates to the right place in the app
190-
return [DeeplinkHandler handleUrl:url];
189+
// Assuming you have a DeeplinkHandler class that handles all deep link URLs and navigates to the right place in the app
190+
return [DeeplinkHandler handleUrl:url];
191191
}
192192
```
193193
@@ -202,12 +202,12 @@ Congratulations! You can now send remote push notifications to your device from
202202
203203
```swift
204204
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
205-
guard let url = userActivity.webpageURL else {
206-
return false
207-
}
205+
guard let url = userActivity.webpageURL else {
206+
return false
207+
}
208208

209-
// This will track the click, retrieve the original URL and call `handleIterableURL:context:` with the original URL
210-
return IterableAPI.handle(universalLink: url)
209+
// This will track the click, retrieve the original URL and call `handleIterableURL:context:` with the original URL
210+
return IterableAPI.handle(universalLink: url)
211211
}
212212

213213
@@ -216,9 +216,9 @@ Congratulations! You can now send remote push notifications to your device from
216216
Objective-C:
217217
218218
```objective-c
219-
- (BOOL)application:(UIApplication *)application continueUserActivity(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
220-
// This will track the click, retrieve the original URL and call `handleIterableURL:context:` with the original URL
221-
return [IterableAPI handleUniversalLink:userActivity.webpageURL];
219+
- (BOOL)application:(UIApplication *)application continueUserActivity(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
220+
// This will track the click, retrieve the original URL and call `handleIterableURL:context:` with the original URL
221+
return [IterableAPI handleUniversalLink:userActivity.webpageURL];
222222
}
223223
```
224224
@@ -228,29 +228,29 @@ Congratulations! You can now send remote push notifications to your device from
228228
229229
```swift
230230
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
231-
guard let url = userActivity.webpageURL else {
232-
return false
233-
}
234-
235-
IterableAPI.getAndTrack(deeplink: url) { (originalUrl) in
236-
// Handle original url deeplink here
237-
}
238-
return true
231+
guard let url = userActivity.webpageURL else {
232+
return false
233+
}
234+
235+
IterableAPI.getAndTrack(deeplink: url) { (originalUrl) in
236+
// Handle original url deeplink here
237+
}
238+
return true
239239
}
240240
```
241241

242242
Objective-C:
243243
244244
```objective-c
245245
- (BOOL)application:(UIApplication *)application
246-
continueUserActivity(NSUserActivity *)userActivity
247-
restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
248-
249-
[IterableAPI getAndTrackDeeplink:iterableLink callbackBlock:^(NSString* originalURL) {
250-
//Handle Original URL deeplink here
251-
}];
252-
253-
return true;
246+
continueUserActivity(NSUserActivity *)userActivity
247+
restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
248+
249+
[IterableAPI getAndTrackDeeplink:iterableLink callbackBlock:^(NSString* originalURL) {
250+
//Handle Original URL deeplink here
251+
}];
252+
253+
return true;
254254
}
255255
```
256256
@@ -282,7 +282,7 @@ Iterable SDK provides an implementation that handles media attachments and actio
282282
```
283283
// If the target name for the notification extension is 'MyAppNotificationExtension'
284284
target 'MyAppNotificationExtension' do
285-
pod 'IterableAppExtensions'
285+
pod 'IterableAppExtensions'
286286
end
287287
```
288288

@@ -313,13 +313,13 @@ Objective-C: You can not inherit in case of Objective C. You will have to delega
313313

314314
@implementation NotificationService
315315
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
316-
317-
self.baseExtension = [[ITBNotificationServiceExtension alloc] init];
318-
[self.baseExtension didReceiveNotificationRequest:request withContentHandler:contentHandler];
316+
317+
self.baseExtension = [[ITBNotificationServiceExtension alloc] init];
318+
[self.baseExtension didReceiveNotificationRequest:request withContentHandler:contentHandler];
319319
}
320320

321321
- (void)serviceExtensionTimeWillExpire {
322-
[self.baseExtension serviceExtensionTimeWillExpire];
322+
[self.baseExtension serviceExtensionTimeWillExpire];
323323
}
324324
@end
325325

0 commit comments

Comments
 (0)