Skip to content

Commit 10e35a2

Browse files
Release 12.2.0
1 parent b49044d commit 10e35a2

File tree

31 files changed

+161
-57
lines changed

31 files changed

+161
-57
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 12.2.0
2+
###### Release Date: 26-04-2022
3+
4+
### 🚀 Enhancements
5+
* New feature: You can now open a Survey programmatically in your app. We have added a new method to our API to enable this, [presentSurvey](https://developers.intercom.com/installing-intercom/docs/ios-configuration#present-a-survey-programmatically).
6+
17
## 12.1.1
28
###### Release Date: 22-02-2022
39

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 = '12.1.1'
3+
s.version = '12.2.0'
44
s.summary = 'The Intercom iOS SDK, for integrating Intercom into your iOS application.'
55
s.license = { :type => "Apache 2.0", :file => "LICENSE" }
66
s.authors = {"Brian Boyle"=>"[email protected]", "Mike McNamara"=>"[email protected]", "Katherine Brennan"=>"[email protected]", "Himanshi Goyal"=>"[email protected]", "Niamh Coleman"=>"[email protected]"}

Intercom.xcframework/ios-arm64/Intercom.framework/Headers/ICMConfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ static NSString *const kICMLauncherCustomLogoImageLoadedNotification = @"kICMLau
1111
@property (readonly) BOOL accessToTeammateEnabled;
1212
@property (readonly) BOOL helpCenterRequireSearch;
1313
@property (nonatomic, copy) NSString *appName;
14+
- (BOOL)receivedFromServer;
1415
@end
1516

1617
@interface ICMConfig : ICMSafeNetworkModel <ICMConfigProtocol,NSSecureCoding>

Intercom.xcframework/ios-arm64/Intercom.framework/Headers/ICMHTTPClientProtocol.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ typedef void (^ICMHTTPComposerSuggestionsSuccess)(ICMComposerSuggestions *compo
8282
success:(nullable ICMHTTPEmptyBlock)success
8383
error:(nullable ICMHTTPClientError)failure;
8484

85+
+ (void)getSurvey:(NSString *)surveyId
86+
success:(nullable ICMHTTPDictionarySuccess)success
87+
error:(nullable ICMHTTPClientError)failure;
88+
8589

8690

8791

Intercom.xcframework/ios-arm64/Intercom.framework/Headers/ICMPresentationManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
1111
@class ICMConversation;
1212
@class ICMCarousel;
1313
@class ICMMessengerSheetViewController;
14-
@class Survey;
14+
@protocol SurveyInfo;
1515

1616
@interface ICMPresentationManager : NSObject
1717

@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
2525

2626
- (void)setUnreadConversations:(NSArray <ICMConversation *> *)conversations completion:(void (^ __nullable)(void))completion;
2727
- (void)presentCarousel:(ICMCarousel *)carousel;
28-
- (void)presentSurvey:(Survey *)survey;
28+
- (void)presentSurvey:(id<SurveyInfo>)survey;
2929
- (void)presentMessenger;
3030
- (void)presentMessageComposerWithInitialMessage:(nullable NSString *)message;
3131
- (void)presentHomescreen;

Intercom.xcframework/ios-arm64/Intercom.framework/Headers/ICMRootViewController.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
1010
@class ICMHostAppState;
1111
@class ICMCarousel;
1212
@class ICMMessengerSheetViewController;
13-
@class Survey;
13+
@protocol SurveyInfo;
1414

1515
@protocol ICMRootViewControllerDelegate <NSObject>
1616
- (void)hideIntercomWindow;
@@ -33,7 +33,7 @@ static NSString *const kICMRootViewControllerDidDismissPresentedController = @"I
3333
- (instancetype)initWithWindowScene:(UIWindowScene *)windowScene;
3434
- (void)tearDown;
3535
- (void)presentCarousel:(ICMCarousel *)carousel;
36-
- (void)presentSurvey:(Survey *)survey;
36+
- (void)presentSurvey:(id <SurveyInfo>)survey;
3737
- (void)presentMessenger;
3838
- (void)presentMessageComposerWithInitialMessage:(NSString *)message;
3939
- (void)presentHomescreen;

Intercom.xcframework/ios-arm64/Intercom.framework/Headers/Intercom-Swift.h

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,13 +495,19 @@ SWIFT_CLASS("_TtC8Intercom21StartConversationCard")
495495
- (nonnull instancetype)initWithCardInfo:(id <ConversationCardInfoProtocol> _Nonnull)cardInfo delegate:(id <ConversationCardDelegate> _Nonnull)delegate OBJC_DESIGNATED_INITIALIZER;
496496
@end
497497

498+
499+
SWIFT_PROTOCOL("_TtP8Intercom10SurveyInfo_")
500+
@protocol SurveyInfo
501+
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
502+
@end
503+
498504
enum SurveyFormat : NSInteger;
499505
@class SurveyStep;
500506
@class SurveyCustomizationOptions;
501507

502508
SWIFT_CLASS("_TtC8Intercom6Survey")
503-
@interface Survey : NSObject
504-
@property (nonatomic, readonly, copy) NSString * _Nonnull surveyId;
509+
@interface Survey : NSObject <SurveyInfo>
510+
@property (nonatomic, readonly, copy, getter=id) NSString * _Nonnull surveyId;
505511
@property (nonatomic, readonly) NSInteger progressId;
506512
@property (nonatomic, readonly, copy) NSString * _Nullable lastStepId;
507513
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id format:(enum SurveyFormat)format steps:(NSArray<SurveyStep *> * _Nonnull)steps progressId:(NSInteger)progressId customizationOptions:(SurveyCustomizationOptions * _Nullable)customizationOptions stepCount:(NSInteger)stepCount OBJC_DESIGNATED_INITIALIZER;
@@ -532,6 +538,16 @@ typedef SWIFT_ENUM(NSInteger, SurveyFormat, open) {
532538
};
533539

534540

541+
SWIFT_CLASS("_TtC8Intercom8SurveyId")
542+
@interface SurveyId : NSObject <SurveyInfo>
543+
@property (nonatomic, copy) NSString * _Nonnull id;
544+
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id OBJC_DESIGNATED_INITIALIZER;
545+
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
546+
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
547+
@end
548+
549+
550+
535551
SWIFT_CLASS("_TtC8Intercom13SurveyService")
536552
@interface SurveyService : NSObject
537553
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL currentlyDisplayingSurvey;)
@@ -556,7 +572,7 @@ SWIFT_CLASS("_TtC8Intercom10SurveyStep")
556572
SWIFT_CLASS("_TtC8Intercom20SurveyViewController")
557573
@interface SurveyViewController : UIViewController
558574
@property (nonatomic, weak) id <ICMContentViewControllerDelegate> _Nullable contentDelegate;
559-
- (nonnull instancetype)initWith:(Survey * _Nonnull)survey OBJC_DESIGNATED_INITIALIZER;
575+
- (nonnull instancetype)initWith:(id <SurveyInfo> _Nonnull)survey OBJC_DESIGNATED_INITIALIZER;
560576
- (void)viewDidLoad;
561577
- (void)viewDidLayoutSubviews;
562578
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;

Intercom.xcframework/ios-arm64/Intercom.framework/Headers/Intercom.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,14 @@ NS_ASSUME_NONNULL_BEGIN
354354
*/
355355
+ (void)presentCarousel:(nonnull NSString *)carouselId;
356356

357+
#pragma mark - Surveys
358+
359+
/*!
360+
Present a Survey.
361+
@param surveyId The ID of the Survey to be presented.
362+
*/
363+
+ (void)presentSurvey:(nonnull NSString *)surveyId;
364+
357365
#pragma mark - Push Notifications
358366

359367
//=========================================================================================================
0 Bytes
Binary file not shown.
96.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)