Skip to content

Commit 9118b84

Browse files
author
Adam McCarthy
committed
Version 2.2.1
* Added support for closing the SDK’s UI when calling `+setMessagesHidden:` and `+reset`. If any part of the SDK is open when these are called, it will now close. * Fixed #52: Removed firstResponder swizzle completely, fixing https://github.com/intercom/intercom-ios/issues/52. * Fixed #58: Checking for isValidJSONObject on user attributes and event metadata, fixing https://github.com/intercom/intercom-ios/issues/58.
1 parent 4f8c6b8 commit 9118b84

37 files changed

+126
-129
lines changed

CHANGES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
= 2.2.1 (2015-03-03)
2+
3+
* Added support for closing the SDK’s UI when calling `+setMessagesHidden:` and `+reset`. If any part of the SDK is open when these are called, it will now close.
4+
* Fixed #52: Removed firstResponder swizzle completely, fixing https://github.com/intercom/intercom-ios/issues/52.
5+
* Fixed #58: Checking for isValidJSONObject on user attributes and event metadata, fixing https://github.com/intercom/intercom-ios/issues/58.
6+
17
= 2.2 (2015-03-23)
28

39
* Now supports real-time, including real-time message delivery, support for the custom message responder,

Intercom.framework/Versions/A/Headers/Intercom.h

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#import <UIKit/UIKit.h>
1212

1313
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0
14-
#error This version (2.2) of the Intercom iOS SDK supports iOS 7.0 upwards.
14+
#error This version (2.2.1) of the Intercom iOS SDK supports iOS 7.0 upwards.
1515
#endif
1616

1717
// Use these values to constrain an incoming notification view to a defined section of the window.
@@ -31,49 +31,49 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
3131
In order to see your users in Intercom's user list, you must first register them via your iOS application. If you have a
3232
place in your application where you become aware of the user's identity such as a log in view controller, call one of the
3333
following depending on the information you have available for that user:
34-
34+
3535
If you have both a unique user identifier and an email for your users::
3636
37-
[Intercom registerUserWithUserId:@"123456" email:@"[email protected]"];
37+
[Intercom registerUserWithUserId:@"123456" email:@"[email protected]"];
3838
3939
If you only have a unique identifier for your users:
4040
41-
[Intercom registerUserWithUserId:@"123456"];
41+
[Intercom registerUserWithUserId:@"123456"];
4242
4343
Finally, if you only have an email address for your users:
44-
45-
[Intercom registerUserWithEmail:@"[email protected]"];
44+
45+
[Intercom registerUserWithEmail:@"[email protected]"];
4646
4747
## Can I track unidentified users?
4848
4949
Yes, absolutely. If you have an application that doesn't require users to log in, you can call:
5050
51-
[Intercom registerUnidentifiedUser];
51+
[Intercom registerUnidentifiedUser];
5252
53-
If the user subsequently logs in or you learn additional information about them (e.g. get an email address),
54-
calling any of the other user registration methods will update that user's identity in Intercom and contain
53+
If the user subsequently logs in or you learn additional information about them (e.g. get an email address),
54+
calling any of the other user registration methods will update that user's identity in Intercom and contain
5555
all user data tracked previously.
5656
5757
## I'm using a previous SDK version and this looks different, what has changed?
5858
5959
We have re-architected the internals of the iOS SDK to ensure it is as reliable as possible while tracking
6060
your users. We have focused on removing the asynchronous behaviour of the SDK. For example you no longer need
61-
to wait for the completion blocks of the old `beginSession` calls before logging events or updating user data.
61+
to wait for the completion blocks of the old `beginSession` calls before logging events or updating user data.
6262
In doing so the SDK is more nimble and reliable than ever before.
6363
64-
Previous versions of the SDK will migrate with minimal effort. All deprecated methods still work for now,
64+
Previous versions of the SDK will migrate with minimal effort. All deprecated methods still work for now,
6565
excluding the old session listener (since v2.0.6). These methods will be permanently removed in a future
6666
version.
6767
6868
## How do push notifications work?
6969
7070
The Intercom iOS SDK enables your users to receive push notifications for new messages. Simply call:
7171
72-
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
73-
[Intercom setDeviceToken:deviceToken];
74-
}
72+
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
73+
[Intercom setDeviceToken:deviceToken];
74+
}
7575
76-
in your `didRegisterForRemoteNotificationsWithDeviceToken:` method once you have registered your app for
76+
in your `didRegisterForRemoteNotificationsWithDeviceToken:` method once you have registered your app for
7777
push notifications with the `UIApplicationDelegate`.
7878
7979
When your app receives a push notification the SDK checks to see if it is an Intercom push notification
@@ -84,7 +84,7 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
8484
8585
## More information
8686
87-
Full documentation is available [here](http://docs.intercom.io/Install-on-your-mobile-product) and please contact
87+
Full documentation is available [here](http://docs.intercom.io/Install-on-your-mobile-product) and please contact
8888
us directly via Intercom for any support or questions you may have.
8989
9090
*/
@@ -123,7 +123,7 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
123123
/*!
124124
If you call registerUnidentifiedUser, all activity will be tracked anonymously. If you choose to subsequently
125125
identify that user, all that anonymous activity will be merged into the identified user. This means that you
126-
will no longer see the anonymous user in Intercom, but rather the identified one.
126+
will no longer see the anonymous user in Intercom, but rather the identified one.
127127
128128
We recommend this is called from within the application delegate's didFinishLaunchingWithOptions: method.
129129
@@ -171,49 +171,49 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
171171
/*! @name Resetting user data */
172172
//=========================================================================================================
173173
/*!
174-
reset is used to reset all local caches and user data the Intercom SDK has created. Use this at a time when
175-
you wish to log a user out of your app or change a user. Once called, the SDK will no longer communicate with Intercom
176-
until a further registration is made.
174+
reset is used to reset all local caches and user data the Intercom SDK has created. Reset will also close
175+
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
176+
a user. Once called, the SDK will no longer communicate with Intercom until a further registration is made.
177177
*/
178178
+ (void)reset;
179179

180180
//=========================================================================================================
181181
/** @name Updating the user */
182182
//=========================================================================================================
183183
/*!
184-
You can send any data you like to Intercom. Typically our customers see a lot of value in sending data that
184+
You can send any data you like to Intercom. Typically our customers see a lot of value in sending data that
185185
relates to customer development, such as price plan, value of purchases, etc. Once these have been sent to
186186
Intercom you can then apply filters based on these attributes.
187187
188188
A detailed list of the fields you can use to [update a user is available here](https://doc.intercom.io/api/#user-model)
189189
190190
Attributes such as the user email or name can be updated by calling
191191
192-
[Intercom updateUserWithAttributes:@{
193-
@"email" : @"[email protected]",
194-
@"name" : @"Admin Name"
195-
}];
192+
[Intercom updateUserWithAttributes:@{
193+
@"email" : @"[email protected]",
194+
@"name" : @"Admin Name"
195+
}];
196196
197197
Custom user attributes can be created and modified by passing a custom_attributes dictionary
198198
You do not have to create attributes in Intercom beforehand. If one hasn't been seen before, it will be
199199
created for you automatically.
200200
201-
[Intercom updateUserWithAttributes:@{
202-
@"custom_attributes": @{
203-
@"paid_subscriber" : @YES,
204-
@"monthly_spend": @155.5,
205-
@"team_mates": @3
206-
}
207-
}];
201+
[Intercom updateUserWithAttributes:@{
202+
@"custom_attributes": @{
203+
@"paid_subscriber" : @YES,
204+
@"monthly_spend": @155.5,
205+
@"team_mates": @3
206+
}
207+
}];
208208
209209
You can also set company data via this call by submitting an attribute dictionary like
210210
211-
[Intercom updateUserWithAttributes:@{
212-
@"companies": @[ @{
213-
@"name" : @"My Company",
214-
@"id" : @"abcd1234"
215-
}
216-
]}];
211+
[Intercom updateUserWithAttributes:@{
212+
@"companies": @[ @{
213+
@"name" : @"My Company",
214+
@"id" : @"abcd1234"
215+
}
216+
]}];
217217
218218
id is a required field for adding or modifying a company. A detailed description of the
219219
[company model is available here](https://doc.intercom.io/api/#companies-and--users)
@@ -226,9 +226,9 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
226226
/*!
227227
Log an event with a given name.
228228
229-
You can log events in Intercom based on user actions in your app. Events are different
230-
to custom user attributes in that events are information on what Users did and when they
231-
did it, whereas custom user attributes represent the User's current state as seen in their
229+
You can log events in Intercom based on user actions in your app. Events are different
230+
to custom user attributes in that events are information on what Users did and when they
231+
did it, whereas custom user attributes represent the User's current state as seen in their
232232
profile. See details about Events [here](http://doc.intercom.io/api/#events).
233233
234234
@param name The name of the event that it is going to be logged.
@@ -239,13 +239,13 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
239239
Metadata Objects support a few simple types that Intercom can present on your behalf, see the
240240
[Intercom API docs](http://doc.intercom.io/api/#event-metadata-types)
241241
242-
[Intercom logEventWithName:@"ordered_item" metaData:@{
243-
@"order_date": @1392036272,
244-
@"stripe_invoice": @"inv_3434343434",
245-
@"order_number": @{
246-
@"value": @"3434-3434",
247-
@"url": @"https://example.org/orders/3434-3434"
248-
}];
242+
[Intercom logEventWithName:@"ordered_item" metaData:@{
243+
@"order_date": @1392036272,
244+
@"stripe_invoice": @"inv_3434343434",
245+
@"order_number": @{
246+
@"value": @"3434-3434",
247+
@"url": @"https://example.org/orders/3434-3434"
248+
}];
249249
250250
@param name The name of the event you wish to track.
251251
@param metaData contains simple types to present to Intercom
@@ -291,7 +291,7 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
291291
+ (void)setPreviewPosition:(ICMPreviewPosition)previewPosition;
292292

293293
/*!
294-
Depending on the layout of your app you may need to modify the position of the message preview relative to the
294+
Depending on the layout of your app you may need to modify the position of the message preview relative to the
295295
preview's position. Use this method to add sufficient padding using x and y values.
296296
297297
@param x A horizontal padding value.
@@ -305,7 +305,8 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
305305

306306
/*!
307307
Use this to hide all incoming Intercom messages and message previews in the parts of your app where you do
308-
not wish to interrupt users, for example Camera views, parts of a game or other scenarios.
308+
not wish to interrupt users, for example Camera views, parts of a game or other scenarios. If any part of the
309+
SDK's UI is on screen when this is set to YES, it will close itself.
309310
310311
@param hidden A bool that toggles message visibility. Use this to either prevent or allow messages from being
311312
displayed in select parts of your app.
@@ -354,9 +355,9 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
354355
ICMPresentationModeTopRight = 3
355356
};
356357

357-
/**
358-
@warning Deprecated methods will be removed in version 2.4.
359-
*/
358+
/**
359+
@warning Deprecated methods will be removed in version 2.4.
360+
*/
360361
@interface Intercom (Deprecated)
361362

362363
typedef void(^ICMCompletion)(NSError *error) __attribute((deprecated));
@@ -441,6 +442,4 @@ typedef void(^ICMCompletion)(NSError *error) __attribute((deprecated));
441442
*/
442443
+ (void)registerForRemoteNotifications __attribute((deprecated("Use method 'setDeviceToken' instead.")));
443444

444-
@end
445-
446-
445+
@end
-239 KB
Binary file not shown.

Intercom.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Intercom'
3-
s.version = '2.2'
3+
s.version = '2.2.1'
44
s.summary = 'The Intercom iOS SDK, for integrating Intercom into your iOS application.'
55
s.license = { :type => "Apache license", :file => "LICENSE" }
66
s.authors = {"Adam McCarthy"=>"[email protected]", "James Treanor"=>"[email protected]"}

io.intercom.Intercom-iOS-SDK-2.2.docset/Contents/Info.plist renamed to io.intercom.Intercom-iOS-SDK-2.2.1.docset/Contents/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<key>CFBundleDevelopmentRegion</key>
66
<string>en</string>
77
<key>CFBundleIdentifier</key>
8-
<string>io.intercom.Intercom-iOS-SDK-2.2</string>
8+
<string>io.intercom.Intercom-iOS-SDK-2.2.1</string>
99
<key>CFBundleName</key>
10-
<string>Intercom iOS SDK 2.2 Documentation</string>
10+
<string>Intercom iOS SDK 2.2.1 Documentation</string>
1111
<key>CFBundleShortVersionString</key>
1212
<string>1.0</string>
1313
<key>CFBundleVersion</key>
@@ -17,7 +17,7 @@
1717

1818

1919
<key>DocSetFeedName</key>
20-
<string>Intercom iOS SDK 2.2 Documentation</string>
20+
<string>Intercom iOS SDK 2.2.1 Documentation</string>
2121

2222
<key>DocSetMinimumXcodeVersion</key>
2323
<string>3.0</string>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div class="container" class="hide-in-xcode">
1515

1616
<h1 id="library-title">
17-
<a href="../index.html">Intercom iOS SDK 2.2 </a>
17+
<a href="../index.html">Intercom iOS SDK 2.2.1 </a>
1818
</h1>
1919

2020
<p id="developer-home">
@@ -80,7 +80,7 @@ <h1 class="title">ICMCompletion Block Reference</h1>
8080
<footer>
8181
<div class="footer-copyright">
8282

83-
<p class="copyright">Copyright &copy; 2015 Intercom. All rights reserved. Updated: 2015-03-23</p>
83+
<p class="copyright">Copyright &copy; 2015 Intercom. All rights reserved. Updated: 2015-04-03</p>
8484

8585

8686
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1333)</a>.</p>

0 commit comments

Comments
 (0)