Skip to content

Commit

Permalink
Release 12.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
intercom-ios-release-robot committed Apr 26, 2022
1 parent b49044d commit 10e35a2
Show file tree
Hide file tree
Showing 31 changed files with 161 additions and 57 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 12.2.0
###### Release Date: 26-04-2022

### 🚀 Enhancements
* 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).

## 12.1.1
###### Release Date: 22-02-2022

Expand Down
2 changes: 1 addition & 1 deletion Intercom.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Intercom'
s.version = '12.1.1'
s.version = '12.2.0'
s.summary = 'The Intercom iOS SDK, for integrating Intercom into your iOS application.'
s.license = { :type => "Apache 2.0", :file => "LICENSE" }
s.authors = {"Brian Boyle"=>"brian.boyle@intercom.io", "Mike McNamara"=>"mike.mcnamara@intercom.io", "Katherine Brennan"=>"katherine.brennan@intercom.io", "Himanshi Goyal"=>"himanshi.goyal@intercom.io", "Niamh Coleman"=>"niamh.coleman@intercom.io"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ static NSString *const kICMLauncherCustomLogoImageLoadedNotification = @"kICMLau
@property (readonly) BOOL accessToTeammateEnabled;
@property (readonly) BOOL helpCenterRequireSearch;
@property (nonatomic, copy) NSString *appName;
- (BOOL)receivedFromServer;
@end

@interface ICMConfig : ICMSafeNetworkModel <ICMConfigProtocol,NSSecureCoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ typedef void (^ICMHTTPComposerSuggestionsSuccess)(ICMComposerSuggestions *compo
success:(nullable ICMHTTPEmptyBlock)success
error:(nullable ICMHTTPClientError)failure;

+ (void)getSurvey:(NSString *)surveyId
success:(nullable ICMHTTPDictionarySuccess)success
error:(nullable ICMHTTPClientError)failure;




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
@class ICMConversation;
@class ICMCarousel;
@class ICMMessengerSheetViewController;
@class Survey;
@protocol SurveyInfo;

@interface ICMPresentationManager : NSObject

Expand All @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN

- (void)setUnreadConversations:(NSArray <ICMConversation *> *)conversations completion:(void (^ __nullable)(void))completion;
- (void)presentCarousel:(ICMCarousel *)carousel;
- (void)presentSurvey:(Survey *)survey;
- (void)presentSurvey:(id<SurveyInfo>)survey;
- (void)presentMessenger;
- (void)presentMessageComposerWithInitialMessage:(nullable NSString *)message;
- (void)presentHomescreen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
@class ICMHostAppState;
@class ICMCarousel;
@class ICMMessengerSheetViewController;
@class Survey;
@protocol SurveyInfo;

@protocol ICMRootViewControllerDelegate <NSObject>
- (void)hideIntercomWindow;
Expand All @@ -33,7 +33,7 @@ static NSString *const kICMRootViewControllerDidDismissPresentedController = @"I
- (instancetype)initWithWindowScene:(UIWindowScene *)windowScene;
- (void)tearDown;
- (void)presentCarousel:(ICMCarousel *)carousel;
- (void)presentSurvey:(Survey *)survey;
- (void)presentSurvey:(id <SurveyInfo>)survey;
- (void)presentMessenger;
- (void)presentMessageComposerWithInitialMessage:(NSString *)message;
- (void)presentHomescreen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,19 @@ SWIFT_CLASS("_TtC8Intercom21StartConversationCard")
- (nonnull instancetype)initWithCardInfo:(id <ConversationCardInfoProtocol> _Nonnull)cardInfo delegate:(id <ConversationCardDelegate> _Nonnull)delegate OBJC_DESIGNATED_INITIALIZER;
@end


SWIFT_PROTOCOL("_TtP8Intercom10SurveyInfo_")
@protocol SurveyInfo
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
@end

enum SurveyFormat : NSInteger;
@class SurveyStep;
@class SurveyCustomizationOptions;

SWIFT_CLASS("_TtC8Intercom6Survey")
@interface Survey : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull surveyId;
@interface Survey : NSObject <SurveyInfo>
@property (nonatomic, readonly, copy, getter=id) NSString * _Nonnull surveyId;
@property (nonatomic, readonly) NSInteger progressId;
@property (nonatomic, readonly, copy) NSString * _Nullable lastStepId;
- (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;
Expand Down Expand Up @@ -532,6 +538,16 @@ typedef SWIFT_ENUM(NSInteger, SurveyFormat, open) {
};


SWIFT_CLASS("_TtC8Intercom8SurveyId")
@interface SurveyId : NSObject <SurveyInfo>
@property (nonatomic, copy) NSString * _Nonnull id;
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end



SWIFT_CLASS("_TtC8Intercom13SurveyService")
@interface SurveyService : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL currentlyDisplayingSurvey;)
Expand All @@ -556,7 +572,7 @@ SWIFT_CLASS("_TtC8Intercom10SurveyStep")
SWIFT_CLASS("_TtC8Intercom20SurveyViewController")
@interface SurveyViewController : UIViewController
@property (nonatomic, weak) id <ICMContentViewControllerDelegate> _Nullable contentDelegate;
- (nonnull instancetype)initWith:(Survey * _Nonnull)survey OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWith:(id <SurveyInfo> _Nonnull)survey OBJC_DESIGNATED_INITIALIZER;
- (void)viewDidLoad;
- (void)viewDidLayoutSubviews;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,14 @@ NS_ASSUME_NONNULL_BEGIN
*/
+ (void)presentCarousel:(nonnull NSString *)carouselId;

#pragma mark - Surveys

/*!
Present a Survey.
@param surveyId The ID of the Survey to be presented.
*/
+ (void)presentSurvey:(nonnull NSString *)surveyId;

#pragma mark - Push Notifications

//=========================================================================================================
Expand Down
Binary file modified Intercom.xcframework/ios-arm64/Intercom.framework/Info.plist
Binary file not shown.
Binary file modified Intercom.xcframework/ios-arm64/Intercom.framework/Intercom
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,21 @@ extension ICMColor {
public struct SurveySender : Swift.Equatable {
public static func == (a: SurveySender, b: SurveySender) -> Swift.Bool
}
@objc public protocol SurveyInfo {
@objc var id: Swift.String { get }
}
@objc public class SurveyId : ObjectiveC.NSObject, SurveyInfo {
@objc public var id: Swift.String
@objc public init(id: Swift.String)
@objc deinit
}
@_hasMissingDesignatedInitializers @objc final public class SurveyCustomizationOptions : ObjectiveC.NSObject {
@objc final public let backgroundColor: UIKit.UIColor
@objc final public let buttonColor: UIKit.UIColor
@objc public init(backgroundColor: UIKit.UIColor, buttonColor: UIKit.UIColor)
@objc deinit
}
@objc final public class Survey : ObjectiveC.NSObject {
@objc final public class Survey : ObjectiveC.NSObject, SurveyInfo {
@objc(surveyId) final public let id: Swift.String
@objc final public let progressId: Swift.Int
@objc final public var lastStepId: Swift.String? {
Expand Down Expand Up @@ -244,7 +252,7 @@ extension UIKit.UIFont {
}
@_hasMissingDesignatedInitializers @objc @_Concurrency.MainActor(unsafe) final public class SurveyViewController : UIKit.UIViewController {
@_Concurrency.MainActor(unsafe) @objc weak final public var contentDelegate: ICMContentViewControllerDelegate?
@objc @_Concurrency.MainActor(unsafe) public init(with survey: Survey)
@objc @_Concurrency.MainActor(unsafe) public init(with survey: SurveyInfo)
@_Concurrency.MainActor(unsafe) @objc override final public func viewDidLoad()
@_Concurrency.MainActor(unsafe) @objc override final public func viewDidLayoutSubviews()
@objc deinit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ static NSString *const kICMLauncherCustomLogoImageLoadedNotification = @"kICMLau
@property (readonly) BOOL accessToTeammateEnabled;
@property (readonly) BOOL helpCenterRequireSearch;
@property (nonatomic, copy) NSString *appName;
- (BOOL)receivedFromServer;
@end

@interface ICMConfig : ICMSafeNetworkModel <ICMConfigProtocol,NSSecureCoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ typedef void (^ICMHTTPComposerSuggestionsSuccess)(ICMComposerSuggestions *compo
success:(nullable ICMHTTPEmptyBlock)success
error:(nullable ICMHTTPClientError)failure;

+ (void)getSurvey:(NSString *)surveyId
success:(nullable ICMHTTPDictionarySuccess)success
error:(nullable ICMHTTPClientError)failure;




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
@class ICMConversation;
@class ICMCarousel;
@class ICMMessengerSheetViewController;
@class Survey;
@protocol SurveyInfo;

@interface ICMPresentationManager : NSObject

Expand All @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN

- (void)setUnreadConversations:(NSArray <ICMConversation *> *)conversations completion:(void (^ __nullable)(void))completion;
- (void)presentCarousel:(ICMCarousel *)carousel;
- (void)presentSurvey:(Survey *)survey;
- (void)presentSurvey:(id<SurveyInfo>)survey;
- (void)presentMessenger;
- (void)presentMessageComposerWithInitialMessage:(nullable NSString *)message;
- (void)presentHomescreen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
@class ICMHostAppState;
@class ICMCarousel;
@class ICMMessengerSheetViewController;
@class Survey;
@protocol SurveyInfo;

@protocol ICMRootViewControllerDelegate <NSObject>
- (void)hideIntercomWindow;
Expand All @@ -33,7 +33,7 @@ static NSString *const kICMRootViewControllerDidDismissPresentedController = @"I
- (instancetype)initWithWindowScene:(UIWindowScene *)windowScene;
- (void)tearDown;
- (void)presentCarousel:(ICMCarousel *)carousel;
- (void)presentSurvey:(Survey *)survey;
- (void)presentSurvey:(id <SurveyInfo>)survey;
- (void)presentMessenger;
- (void)presentMessageComposerWithInitialMessage:(NSString *)message;
- (void)presentHomescreen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,19 @@ SWIFT_CLASS("_TtC8Intercom21StartConversationCard")
- (nonnull instancetype)initWithCardInfo:(id <ConversationCardInfoProtocol> _Nonnull)cardInfo delegate:(id <ConversationCardDelegate> _Nonnull)delegate OBJC_DESIGNATED_INITIALIZER;
@end


SWIFT_PROTOCOL("_TtP8Intercom10SurveyInfo_")
@protocol SurveyInfo
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
@end

enum SurveyFormat : NSInteger;
@class SurveyStep;
@class SurveyCustomizationOptions;

SWIFT_CLASS("_TtC8Intercom6Survey")
@interface Survey : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull surveyId;
@interface Survey : NSObject <SurveyInfo>
@property (nonatomic, readonly, copy, getter=id) NSString * _Nonnull surveyId;
@property (nonatomic, readonly) NSInteger progressId;
@property (nonatomic, readonly, copy) NSString * _Nullable lastStepId;
- (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;
Expand Down Expand Up @@ -534,6 +540,16 @@ typedef SWIFT_ENUM(NSInteger, SurveyFormat, open) {
};


SWIFT_CLASS("_TtC8Intercom8SurveyId")
@interface SurveyId : NSObject <SurveyInfo>
@property (nonatomic, copy) NSString * _Nonnull id;
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end



SWIFT_CLASS("_TtC8Intercom13SurveyService")
@interface SurveyService : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL currentlyDisplayingSurvey;)
Expand All @@ -558,7 +574,7 @@ SWIFT_CLASS("_TtC8Intercom10SurveyStep")
SWIFT_CLASS("_TtC8Intercom20SurveyViewController")
@interface SurveyViewController : UIViewController
@property (nonatomic, weak) id <ICMContentViewControllerDelegate> _Nullable contentDelegate;
- (nonnull instancetype)initWith:(Survey * _Nonnull)survey OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWith:(id <SurveyInfo> _Nonnull)survey OBJC_DESIGNATED_INITIALIZER;
- (void)viewDidLoad;
- (void)viewDidLayoutSubviews;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
Expand Down Expand Up @@ -1175,13 +1191,19 @@ SWIFT_CLASS("_TtC8Intercom21StartConversationCard")
- (nonnull instancetype)initWithCardInfo:(id <ConversationCardInfoProtocol> _Nonnull)cardInfo delegate:(id <ConversationCardDelegate> _Nonnull)delegate OBJC_DESIGNATED_INITIALIZER;
@end


SWIFT_PROTOCOL("_TtP8Intercom10SurveyInfo_")
@protocol SurveyInfo
@property (nonatomic, readonly, copy) NSString * _Nonnull id;
@end

enum SurveyFormat : NSInteger;
@class SurveyStep;
@class SurveyCustomizationOptions;

SWIFT_CLASS("_TtC8Intercom6Survey")
@interface Survey : NSObject
@property (nonatomic, readonly, copy) NSString * _Nonnull surveyId;
@interface Survey : NSObject <SurveyInfo>
@property (nonatomic, readonly, copy, getter=id) NSString * _Nonnull surveyId;
@property (nonatomic, readonly) NSInteger progressId;
@property (nonatomic, readonly, copy) NSString * _Nullable lastStepId;
- (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;
Expand Down Expand Up @@ -1212,6 +1234,16 @@ typedef SWIFT_ENUM(NSInteger, SurveyFormat, open) {
};


SWIFT_CLASS("_TtC8Intercom8SurveyId")
@interface SurveyId : NSObject <SurveyInfo>
@property (nonatomic, copy) NSString * _Nonnull id;
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end



SWIFT_CLASS("_TtC8Intercom13SurveyService")
@interface SurveyService : NSObject
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL currentlyDisplayingSurvey;)
Expand All @@ -1236,7 +1268,7 @@ SWIFT_CLASS("_TtC8Intercom10SurveyStep")
SWIFT_CLASS("_TtC8Intercom20SurveyViewController")
@interface SurveyViewController : UIViewController
@property (nonatomic, weak) id <ICMContentViewControllerDelegate> _Nullable contentDelegate;
- (nonnull instancetype)initWith:(Survey * _Nonnull)survey OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWith:(id <SurveyInfo> _Nonnull)survey OBJC_DESIGNATED_INITIALIZER;
- (void)viewDidLoad;
- (void)viewDidLayoutSubviews;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,14 @@ NS_ASSUME_NONNULL_BEGIN
*/
+ (void)presentCarousel:(nonnull NSString *)carouselId;

#pragma mark - Surveys

/*!
Present a Survey.
@param surveyId The ID of the Survey to be presented.
*/
+ (void)presentSurvey:(nonnull NSString *)surveyId;

#pragma mark - Push Notifications

//=========================================================================================================
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,21 @@ extension ICMColor {
public struct SurveySender : Swift.Equatable {
public static func == (a: SurveySender, b: SurveySender) -> Swift.Bool
}
@objc public protocol SurveyInfo {
@objc var id: Swift.String { get }
}
@objc public class SurveyId : ObjectiveC.NSObject, SurveyInfo {
@objc public var id: Swift.String
@objc public init(id: Swift.String)
@objc deinit
}
@_hasMissingDesignatedInitializers @objc final public class SurveyCustomizationOptions : ObjectiveC.NSObject {
@objc final public let backgroundColor: UIKit.UIColor
@objc final public let buttonColor: UIKit.UIColor
@objc public init(backgroundColor: UIKit.UIColor, buttonColor: UIKit.UIColor)
@objc deinit
}
@objc final public class Survey : ObjectiveC.NSObject {
@objc final public class Survey : ObjectiveC.NSObject, SurveyInfo {
@objc(surveyId) final public let id: Swift.String
@objc final public let progressId: Swift.Int
@objc final public var lastStepId: Swift.String? {
Expand Down Expand Up @@ -244,7 +252,7 @@ extension UIKit.UIFont {
}
@_hasMissingDesignatedInitializers @objc @_Concurrency.MainActor(unsafe) final public class SurveyViewController : UIKit.UIViewController {
@_Concurrency.MainActor(unsafe) @objc weak final public var contentDelegate: ICMContentViewControllerDelegate?
@objc @_Concurrency.MainActor(unsafe) public init(with survey: Survey)
@objc @_Concurrency.MainActor(unsafe) public init(with survey: SurveyInfo)
@_Concurrency.MainActor(unsafe) @objc override final public func viewDidLoad()
@_Concurrency.MainActor(unsafe) @objc override final public func viewDidLayoutSubviews()
@objc deinit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,21 @@ extension ICMColor {
public struct SurveySender : Swift.Equatable {
public static func == (a: SurveySender, b: SurveySender) -> Swift.Bool
}
@objc public protocol SurveyInfo {
@objc var id: Swift.String { get }
}
@objc public class SurveyId : ObjectiveC.NSObject, SurveyInfo {
@objc public var id: Swift.String
@objc public init(id: Swift.String)
@objc deinit
}
@_hasMissingDesignatedInitializers @objc final public class SurveyCustomizationOptions : ObjectiveC.NSObject {
@objc final public let backgroundColor: UIKit.UIColor
@objc final public let buttonColor: UIKit.UIColor
@objc public init(backgroundColor: UIKit.UIColor, buttonColor: UIKit.UIColor)
@objc deinit
}
@objc final public class Survey : ObjectiveC.NSObject {
@objc final public class Survey : ObjectiveC.NSObject, SurveyInfo {
@objc(surveyId) final public let id: Swift.String
@objc final public let progressId: Swift.Int
@objc final public var lastStepId: Swift.String? {
Expand Down Expand Up @@ -244,7 +252,7 @@ extension UIKit.UIFont {
}
@_hasMissingDesignatedInitializers @objc @_Concurrency.MainActor(unsafe) final public class SurveyViewController : UIKit.UIViewController {
@_Concurrency.MainActor(unsafe) @objc weak final public var contentDelegate: ICMContentViewControllerDelegate?
@objc @_Concurrency.MainActor(unsafe) public init(with survey: Survey)
@objc @_Concurrency.MainActor(unsafe) public init(with survey: SurveyInfo)
@_Concurrency.MainActor(unsafe) @objc override final public func viewDidLoad()
@_Concurrency.MainActor(unsafe) @objc override final public func viewDidLayoutSubviews()
@objc deinit
Expand Down
Loading

0 comments on commit 10e35a2

Please sign in to comment.