1
1
2
2
//
3
3
// Intercom.h
4
- // Intercom for iOS SDK - Version 2.2.2
4
+ // Intercom for iOS - Version 2.2.3
5
5
//
6
6
// Created by Intercom on 8/01/2015.
7
7
// Copyright (c) 2014 Intercom. All rights reserved.
11
11
#import < UIKit/UIKit.h>
12
12
13
13
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0
14
- #error This version (2.2.1 ) of the Intercom iOS SDK supports iOS 7.0 upwards.
14
+ #error This version (2.2.3 ) of Intercom for iOS supports iOS 7.0 upwards.
15
15
#endif
16
16
17
17
// Use these values to constrain an incoming notification view to a defined section of the window.
@@ -66,30 +66,30 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
66
66
calling any of the other user registration methods will update that user's identity in Intercom and contain
67
67
all user data tracked previously.
68
68
69
- ## I'm using a previous SDK version and this looks different, what has changed?
69
+ ## I'm using a previous version and this looks different, what has changed?
70
70
71
- We have re-architected the internals of the iOS SDK to ensure it is as reliable as possible while tracking
72
- your users. We have focused on removing the asynchronous behaviour of the SDK . For example you no longer need
73
- to wait for the completion blocks of the old `beginSession` calls before logging events or updating user data.
74
- In doing so the SDK is more nimble and reliable than ever before.
71
+ We have re-architected the internals of Intercom for iOS to ensure it is as reliable as possible while tracking
72
+ your users. We have focused on removing asynchronous behaviour. For example you no longer need to wait for the
73
+ completion blocks of the old `beginSession` calls before logging events or updating user data.
74
+ In doing so the it is more nimble and reliable than ever before.
75
75
76
- Previous versions of the SDK will migrate with minimal effort. All deprecated methods still work for now,
76
+ Previous versions of Intercom for iOS will migrate with minimal effort. All deprecated methods still work for now,
77
77
excluding the old session listener (since v2.0.6). These methods will be permanently removed in a future
78
78
version.
79
79
80
80
## How do push notifications work?
81
81
82
- The Intercom iOS SDK enables your users to receive push notifications for new messages. Simply call:
82
+ Intercom for iOS enables your users to receive push notifications for new messages. Simply call:
83
83
84
84
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
85
- [Intercom setDeviceToken:deviceToken];
85
+ [Intercom setDeviceToken:deviceToken];
86
86
}
87
87
88
88
in your `didRegisterForRemoteNotificationsWithDeviceToken:` method once you have registered your app for
89
89
push notifications with the `UIApplicationDelegate`.
90
90
91
- When your app receives a push notification the SDK checks to see if it is an Intercom push notification
92
- and opens the SDK if required . You do not need to implement any additional code in order to launch the SDK .
91
+ When your app receives a push notification Intercom for iOS checks to see if it is an Intercom push notification
92
+ and opens the message . You do not need to implement any additional code in order to launch the message window .
93
93
94
94
To do this we [safely swizzle](http://blog.newrelic.com/2014/04/16/right-way-to-swizzle/) the public methods
95
95
in `UIApplicationDelegate` that handle receiving push notifications. We do not use any private APIs to do this.
@@ -109,7 +109,7 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
109
109
Initialize Intercom with your iOS API key and App ID. This will allow your app to connect with Intercom.
110
110
This is best done in the application delegate's didFinishLaunchingWithOptions: method.
111
111
112
- @param apiKey The iOS-SDK API key found on the API Key settings page.
112
+ @param apiKey The iOS API key found on the API Key settings page.
113
113
@param appId The App ID of your Intercom app.
114
114
*/
115
115
+ (void )setApiKey : (NSString *)apiKey forAppId : (NSString *)appId ;
@@ -119,9 +119,9 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
119
119
// =========================================================================================================
120
120
/* !
121
121
Secure Mode helps to make sure that conversations between you and your users are kept private, and that one
122
- user can't impersonate another. In Secure Mode the iOS SDK will sign all requests going to the Intercom servers
122
+ user can't impersonate another. In Secure Mode Intercom for iOS will sign all requests going to the Intercom servers
123
123
with tokens. It requires your mobile application to have its own server which authenticates the app's users,
124
- and which can store a secret. More information on secure mode can be found [here](http://docs.intercom.io/Install-on-your-mobile-product/secure-mode-ios-sdk ).
124
+ and which can store a secret. More information on secure mode can be found [here](http://docs.intercom.io/Install-on-your-mobile-product/enabling- secure-mode-in-intercom-for-ios ).
125
125
126
126
@note This should be called before any user registration takes place.
127
127
@param hmac A HMAC digest of data.
@@ -152,7 +152,7 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
152
152
This is a userId, supplied by you (e.g. from an existing web service for your product) to represent your
153
153
user in Intercom, once set it cannot be changed.
154
154
155
- If you are putting the Intercom SDK into an app that has persisted an authentication token or equivalent
155
+ If you are putting Intercom for iOS into an app that has persisted an authentication token or equivalent
156
156
so your users don't have to log in repeatedly (like most apps) then we advise putting the user registration
157
157
call in the `didBecomeActive:` method in your application delegate. This won't have any negative impact if
158
158
you also add it to your authentication success method elsewhere in your app.
@@ -183,9 +183,9 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
183
183
/* ! @name Resetting user data */
184
184
// =========================================================================================================
185
185
/* !
186
- reset is used to reset all local caches and user data the Intercom SDK has created. Reset will also close
187
- and active UI that is on screen. Use this at a time when you wish to log a user out of your app or change
188
- a user. Once called, the SDK will no longer communicate with Intercom until a further registration is made.
186
+ reset is used to reset all local caches and user data Intercom has created. Reset will also close any active
187
+ UI that is on screen. Use this at a time when you wish to log a user out of your app or change a user.
188
+ Once called, Intercom for iOS will no longer communicate with Intercom until a further registration is made.
189
189
*/
190
190
+ (void )reset ;
191
191
@@ -282,9 +282,9 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
282
282
/* ! @name Working with push notifications */
283
283
// =========================================================================================================
284
284
/* !
285
- Set the device token for push notifications. Once the device token is set, the SDK safely swizzles the methods
286
- for receiving push notifications so it can intercept ones sent from Intercom. When a push notification from
287
- Intercom is received, the SDK will automatically react and launch according to your preferences .
285
+ Set the device token for push notifications. Once the device token is set, the methods for receiving push
286
+ notifications are safely swizzled so ones sent from Intercom can be intercepted . When a push notification from
287
+ Intercom is received, Intercom for iOS will automatically launch the message from the notification .
288
288
289
289
@param deviceToken The device token provided in the `didRegisterForRemoteNotificationsWithDeviceToken` method.
290
290
*/
@@ -317,8 +317,8 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
317
317
318
318
/* !
319
319
Use this to hide all incoming Intercom messages and message previews in the parts of your app where you do
320
- not wish to interrupt users, for example Camera views, parts of a game or other scenarios. If any part of the
321
- SDK 's UI is on screen when this is set to YES, it will close itself.
320
+ not wish to interrupt users, for example Camera views, parts of a game or other scenarios. If any part of
321
+ Intercom for iOS 's UI is on screen when this is set to YES, it will close itself.
322
322
323
323
@param hidden A bool that toggles message visibility. Use this to either prevent or allow messages from being
324
324
displayed in select parts of your app.
@@ -330,7 +330,7 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
330
330
// =========================================================================================================
331
331
332
332
/* !
333
- Enable logging for the Intercom SDK . By calling this method, Intercom will display debug information.
333
+ Enable logging for Intercom for iOS . By calling this method, Intercom will display debug information.
334
334
@note it is recommended to use it only while debugging)
335
335
*/
336
336
+ (void )enableLogging ;
@@ -339,13 +339,13 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
339
339
/* ! @name Intercom Notifications */
340
340
// =========================================================================================================
341
341
/* !
342
- Notifications thrown by the SDK when the SDK window is displayed and hidden. These notifications are fired
343
- only when there is a change in the state of the SDK 's UI: when a user receives a message for instance,
344
- willShow and didShow notifications will be fired accordingly when the Intercom Notification (chat head)
342
+ Notifications thrown by Intercom for iOS when the Intercom window is displayed and hidden. These notifications
343
+ are fired only when there is a change in the state of Intercom 's UI: when a user receives a message for
344
+ instance, willShow and didShow notifications will be fired accordingly when the Intercom Notification (chat head)
345
345
is presented.
346
346
347
347
Once the user taps on the chat head, the message is presented in your app. It will be presented covering
348
- the entire screen, but no notifications will be thrown here as the SDK has already been visible.
348
+ the entire screen, but no notifications will be thrown here as Intercom has already been visible.
349
349
*/
350
350
351
351
UIKIT_EXTERN NSString *const IntercomWindowWillShowNotification;
0 commit comments