Skip to content

Commit 2a1901e

Browse files
committed
2.3.0
1 parent 51fe329 commit 2a1901e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+168
-70
lines changed

CHANGES

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
= 2.3.0 (2015-06-24)
2+
3+
* Users can now send image attachments.
4+
* Fixed bug where `+[Intercom reset]` could behave inconsistently (https://github.com/intercom/intercom-ios/issues/68).
5+
* Intercom now honours `prefersStatusBarHidden` (https://github.com/intercom/intercom-ios/issues/66).
6+
* Added `IntercomDidStartNewConversationNotification` as suggested in https://github.com/intercom/intercom-ios/issues/67.
7+
* Ensure sessions are ended when your app is backgrounded.
8+
* Renamed certs to fix https://github.com/intercom/intercom-cordova/issues/5.
9+
* Improved support for CocoPods Frameworks.
10+
* Added nullability modifiers to Intercom.h for improved Swift compatibility.
11+
112
= 2.2.4 (2015-05-28)
213

314
* Fixed an issue where opening a push might not open the Intercom message if the app is in the background in some cases.

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

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
//
33
// Intercom.h
4-
// Intercom for iOS - Version 2.2.3
4+
// Intercom for iOS - Version 2.3
55
//
66
// Created by Intercom on 8/01/2015.
77
// Copyright (c) 2014 Intercom. All rights reserved.
@@ -11,7 +11,19 @@
1111
#import <UIKit/UIKit.h>
1212

1313
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0
14-
#error This version (2.2.4) of Intercom for iOS supports iOS 7.0 upwards.
14+
#error This version (2.3) of Intercom for iOS supports iOS 7.0 upwards.
15+
#endif
16+
17+
#if __has_feature(nullability)
18+
#define ICM_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
19+
#define ICM_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
20+
#define icm_nullable nullable
21+
#define __icm_nullable __nullable
22+
#else
23+
#define ICM_ASSUME_NONNULL_BEGIN
24+
#define ICM_ASSUME_NONNULL_END
25+
#define icm_nullable
26+
#define __icm_nullable
1527
#endif
1628

1729
// Use these values to constrain an incoming notification view to a defined section of the window.
@@ -101,6 +113,7 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
101113
102114
*/
103115
@interface Intercom : NSObject
116+
ICM_ASSUME_NONNULL_BEGIN
104117

105118
//=========================================================================================================
106119
/*! @name Getting set up */
@@ -335,29 +348,42 @@ typedef NS_ENUM(NSUInteger, ICMPresentationMode){
335348
*/
336349
+ (void)enableLogging;
337350

351+
//=========================================================================================================
352+
/*! @name Status bar handling */
353+
//=========================================================================================================
354+
355+
/*!
356+
If you wish to change your status bar's style or visibility while an Intercom notification may be on
357+
screen, call this method so that Intercom's window can reflect these changes accordingly.
358+
*/
359+
+ (void)setNeedsStatusBarAppearanceUpdate;
360+
338361
//=========================================================================================================
339362
/*! @name Intercom Notifications */
340363
//=========================================================================================================
341364
/*!
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-
is presented.
365+
These are notifications thrown by Intercom for iOS when the Intercom window is displayed and hidden or when
366+
a new conversation has been started. These notifications are fired only when there is a change in the state
367+
of Intercom's UI: when a user receives a message for instance, willShow and didShow notifications will be
368+
fired accordingly when the Intercom Notification (chat head) is presented.
346369
347370
Once the user taps on the chat head, the message is presented in your app. It will be presented covering
348371
the entire screen, but no notifications will be thrown here as Intercom has already been visible.
372+
373+
In the case of a new conversation this notification may be used to prompt users to enable push notifications.
349374
*/
350375

351376
UIKIT_EXTERN NSString *const IntercomWindowWillShowNotification;
352377
UIKIT_EXTERN NSString *const IntercomWindowDidShowNotification;
353378
UIKIT_EXTERN NSString *const IntercomWindowWillHideNotification;
354379
UIKIT_EXTERN NSString *const IntercomWindowDidHideNotification;
380+
UIKIT_EXTERN NSString *const IntercomDidStartNewConversationNotification;
355381

356382
/**
357383
@warning Deprecated methods will be removed in version 2.4.
358384
*/
359385

360-
typedef void(^ICMCompletion)(NSError *error) __attribute((deprecated));
386+
typedef void(^ICMCompletion)(NSError * __icm_nullable) __attribute((deprecated));
361387

362388
//=========================================================================================================
363389
/*! @name Deprecated methods */
@@ -371,17 +397,17 @@ typedef void(^ICMCompletion)(NSError *error) __attribute((deprecated));
371397
/*!
372398
@deprecated Use registerUserWithEmail: instead
373399
*/
374-
+ (void)beginSessionForUserWithEmail:(NSString *)email completion:(ICMCompletion)completion __attribute((deprecated("Use method 'registerUserWithEmail:' instead")));
400+
+ (void)beginSessionForUserWithEmail:(NSString *)email completion:(icm_nullable ICMCompletion)completion __attribute((deprecated("Use method 'registerUserWithEmail:' instead")));
375401

376402
/*!
377403
@deprecated Use registerUserWithUserId: instead
378404
*/
379-
+ (void)beginSessionForUserWithUserId:(NSString *)userId completion:(ICMCompletion)completion __attribute((deprecated("Use method 'registerUserWithUserId:' instead")));
405+
+ (void)beginSessionForUserWithUserId:(NSString *)userId completion:(icm_nullable ICMCompletion)completion __attribute((deprecated("Use method 'registerUserWithUserId:' instead")));
380406

381407
/*!
382408
@deprecated Use registerUnidentifiedUser instead
383409
*/
384-
+ (void)beginSessionForAnonymousUserWithCompletion:(ICMCompletion)completion __attribute((deprecated("Use method 'registerUnidentifiedUser' instead")));
410+
+ (void)beginSessionForAnonymousUserWithCompletion:(icm_nullable ICMCompletion)completion __attribute((deprecated("Use method 'registerUnidentifiedUser' instead")));
385411

386412
/*!
387413
@deprecated Use reset instead
@@ -391,17 +417,17 @@ typedef void(^ICMCompletion)(NSError *error) __attribute((deprecated));
391417
/*!
392418
@deprecated Use updateUserWithAttributes: instead
393419
*/
394-
+ (void)updateUserWithAttributes:(NSDictionary *)attributes completion:(ICMCompletion)completion __attribute((deprecated("Use method 'updateUserWithAttributes:' instead")));
420+
+ (void)updateUserWithAttributes:(NSDictionary *)attributes completion:(icm_nullable ICMCompletion)completion __attribute((deprecated("Use method 'updateUserWithAttributes:' instead")));
395421

396422
/*!
397423
@deprecated Use logEventWithName: instead
398424
*/
399-
+ (void)logEventWithName:(NSString *)name completion:(ICMCompletion)completion __attribute((deprecated("Use method 'logEventWithName:' instead")));
425+
+ (void)logEventWithName:(NSString *)name completion:(icm_nullable ICMCompletion)completion __attribute((deprecated("Use method 'logEventWithName:' instead")));
400426

401427
/*!
402428
@deprecated Use logEventWithName:metaData: instead
403429
*/
404-
+ (void)logEventWithName:(NSString *)name optionalMetaData:(NSDictionary *)metadata completion:(ICMCompletion)completion __attribute((deprecated("Use method 'logEventWithName:metaData:' instead")));
430+
+ (void)logEventWithName:(NSString *)name optionalMetaData:(NSDictionary *)metadata completion:(icm_nullable ICMCompletion)completion __attribute((deprecated("Use method 'logEventWithName:metaData:' instead")));
405431

406432
/*!
407433
@deprecated This is no longer supported
@@ -421,7 +447,7 @@ typedef void(^ICMCompletion)(NSError *error) __attribute((deprecated));
421447
/*!
422448
@deprecated This is no longer supported. You can change your app's theme through settings on Intercom in the web.
423449
*/
424-
+ (void)setBaseColor:(UIColor *)color __attribute((deprecated("This is no longer supported.")));
450+
+ (void)setBaseColor:(icm_nullable UIColor *)color __attribute((deprecated("This is no longer supported.")));
425451

426452
/*!
427453
@deprecated Use setMessagesHidden: instead
@@ -436,11 +462,12 @@ typedef void(^ICMCompletion)(NSError *error) __attribute((deprecated));
436462
/*!
437463
@deprecated This is no longer supported.
438464
*/
439-
+ (void)setSessionListener:(id<IntercomSessionListener>)sessionListener __attribute((deprecated("This is no longer supported.")));
465+
+ (void)setSessionListener:(icm_nullable id<IntercomSessionListener>)sessionListener __attribute((deprecated("This is no longer supported.")));
440466

441467
/*!
442468
@deprecated Use method setDeviceToken instead.
443469
*/
444470
+ (void)registerForRemoteNotifications __attribute((deprecated("Use method 'setDeviceToken' instead.")));
445471

446-
@end
472+
ICM_ASSUME_NONNULL_END
473+
@end
2.82 MB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
485 Bytes
Loading
842 Bytes
Loading
1.22 KB
Loading

Intercom.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Pod::Spec.new do |s|
22
s.name = 'Intercom'
3-
s.version = '2.2.4'
3+
s.version = '2.3.0'
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]"}
77
s.homepage = 'https://github.com/intercom/intercom-ios'
88
s.description = 'The Intercom iOS SDK, for integrating Intercom into your iOS application. The SDK supports iOS 7 and iOS 8.'
9-
s.frameworks = ["Foundation", "UIKit", "Security", "SystemConfiguration", "MobileCoreServices", "ImageIO", "AudioToolbox", "QuartzCore", "CoreGraphics"]
9+
s.frameworks = ["Foundation", "UIKit", "Security", "SystemConfiguration", "MobileCoreServices", "ImageIO", "AudioToolbox", "QuartzCore", "CoreGraphics", 'AssetsLibrary']
1010
s.library = "icucore"
1111
s.requires_arc = true
1212
s.source = { :git => 'https://github.com/intercom/intercom-ios.git', :tag => s.version.to_s }

0 commit comments

Comments
 (0)