Skip to content

Commit

Permalink
Sailthru Mobile iOS SDK 8.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CarnivalBot committed Sep 3, 2019
1 parent 11f7a9d commit a869a3b
Show file tree
Hide file tree
Showing 14 changed files with 85 additions and 31 deletions.
Binary file modified Carnival.framework/Carnival
Binary file not shown.
30 changes: 24 additions & 6 deletions Carnival.framework/Headers/Carnival.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#import "CarnivalContentItem.h"
#import "CarnivalPurchase.h"

#define CARNIVAL_VERSION @"8.4.0"
#define CARNIVAL_VERSION @"8.5.0"
FOUNDATION_EXPORT double CarnivalSDKVersionNumber;
FOUNDATION_EXPORT const unsigned char CarnivalSDKVersionString[];

Expand All @@ -27,6 +27,12 @@ typedef NS_OPTIONS(NSUInteger, CarnivalDeviceDataType) {
CarnivalDeviceDataTypeEvents = 1 << 2
};

typedef NS_OPTIONS(NSUInteger, CarnivalPushAuthorizationOption) {
CarnivalPushAuthorizationOptionNoRequest, // This option will not request any push authorization permissions for the device. Note that a push token will still be requested. No prompt is required.
CarnivalPushAuthorizationOptionProvisional, // This option will request provisional push authorization, allowing push notifications to be sent to the notification center. No prompt is required. Available iOS 12+, defaults to CarnivalPushAuthorizationOptionNoRequest behaviour for earlier versions.
CarnivalPushAuthorizationOptionFull // This option will request full push authorization for alerts, sounds and badges. Note that this will prompt the user for permission.
};

/* Constants for Auto-Analytics Tracking */
NS_ASSUME_NONNULL_BEGIN
extern NSString * const CarnivalAutoAnalyticsSourceGoogleAnalytics;
Expand All @@ -50,7 +56,7 @@ NS_ASSUME_NONNULL_END
* Make sure your app bundle identifier is the same as whatever it is set to on http://mobile.sailthru.com .
*
* @warning It is important that this method is called at the earliest possible opportunity (e.g. application:didFinishLaunchingWithOptions:),
* calling it later in the app lifecycle can have unintended consequences. No startEngine: calls (overrides included) must not be called more than once.
* calling it later in the app lifecycle can have unintended consequences. Calls to startEngine: (overrides included) must not be made more than once.
*/
+ (void)startEngine:(nonnull NSString *)appKey;

Expand All @@ -59,15 +65,27 @@ NS_ASSUME_NONNULL_END
* @note The device will be registered with the Apple Push Notification service and provided with a push notification token regardless of whether registerForPushNotifications is set to YES or NO. This step does not require a user prompt.
*
* On devices running iOS 12+ provisional authorization will be requested if registerForPushNotifications is set to NO, allowing Quiet push notifications to
* be sent to the device.
* be sent to the device (equivalent to CarnivalPushRegistrationOptionProvisional).
*
* @param appKey The appKey you recieved when setting up your app at http://mobile.sailthru.com .
* @param registerForPushNotifications when this parameter is YES the Carnival iOS SDK will automatically register for push notifications
*
* @warning It is important that this method is called at the earliest possible opportunity (e.g. application:didFinishLaunchingWithOptions:),
* calling it later in the app lifecycle can have unintended consequences. No startEngine: calls (overrides included) must not be called more than once.
* calling it later in the app lifecycle can have unintended consequences. Calls to startEngine: (overrides included) must not be made more than once.
*/
+ (void)startEngine:(nonnull NSString *)appKey registerForPushNotifications:(BOOL)registerForPushNotifications __attribute__((deprecated("use startEngine:withAuthorizationOption: instead.")));

/**
* Sets the Carnival appKey credentials for this app and optionally registers for push notifications authorization. Authorization request will be determined by the pushAuthorizationOption parameter
* @note The device will be registered with the Apple Push Notification service and provided with a push notification token regardless of the CarnivalPushRegistrationOption supplied. This step does not require a user prompt.
*
* @param appKey The appKey you recieved when setting up your app at http://mobile.sailthru.com .
* @param pushAuthorizationOption The authorization option the SDK should use when requesting push notification authorization
*
* @warning It is important that this method is called at the earliest possible opportunity (e.g. application:didFinishLaunchingWithOptions:),
* calling it later in the app lifecycle can have unintended consequences. Calls to startEngine: (overrides included) must not be made more than once.
*/
+ (void)startEngine:(nonnull NSString *)appKey registerForPushNotifications:(BOOL)registerForPushNotifications;
+ (void)startEngine:(nonnull NSString *)appKey withAuthorizationOption:(CarnivalPushAuthorizationOption)pushAuthorizationOption;

/**
* Sets the logger used by Carnival for any internal informational or debugging logging.
Expand Down Expand Up @@ -348,7 +366,7 @@ NS_ASSUME_NONNULL_END
* Logs a cart abandonment with the Sailthru platform. Use this to initiate cart abandoned flows.
*
* @param purchase The abandoned purchase to log with the platform.
* @param handler callback handler.
* @param block The block to handle the result of the call. May contain an error if the call failed.
*/
+ (void)logAbandonedCart:(nonnull CarnivalPurchase *)purchase withResponse:(nullable void(^)(NSError * _Nullable))block;

Expand Down
Binary file modified Carnival.framework/Info.plist
Binary file not shown.
8 changes: 4 additions & 4 deletions Carnival.framework/_CodeSignature/CodeResources
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Headers/Carnival.h</key>
<data>
gHQ73s18nOmzEt2Bi1MElN2W/yU=
djR0GQLPRBdBFVkP7dAdUyTZk/c=
</data>
<key>Headers/CarnivalAttributes.h</key>
<data>
Expand Down Expand Up @@ -38,7 +38,7 @@
</data>
<key>Info.plist</key>
<data>
2x8CvMvI5SZhmJeScN3/XAP+8co=
B7K8diyd3jOsuXgAq2DTxO1bHJM=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down Expand Up @@ -128,11 +128,11 @@
<dict>
<key>hash</key>
<data>
gHQ73s18nOmzEt2Bi1MElN2W/yU=
djR0GQLPRBdBFVkP7dAdUyTZk/c=
</data>
<key>hash2</key>
<data>
c2RDVZuOelU8ISbjP8l0tg56Y21LuDNDOiMTT6s0GLo=
ACucLBQnWumsV6sXDHu83pDzNB4RGU1d6ZpClg5qjTA=
</data>
</dict>
<key>Headers/CarnivalAttributes.h</key>
Expand Down
2 changes: 1 addition & 1 deletion Carnival.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Carnival'
s.version = '8.4.0'
s.version = '8.5.0'
s.summary = 'Carnival iOS SDK for integrating with http://carnival.io messaging and analytics service.'
s.author = {
'Carnival Mobile' => '[email protected]'
Expand Down
Binary file modified CarnivalExtension.framework/CarnivalExtension
Binary file not shown.
Binary file modified ExampleProject/ExampleProject/Carnival.framework/Carnival
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#import "CarnivalContentItem.h"
#import "CarnivalPurchase.h"

#define CARNIVAL_VERSION @"8.4.0"
#define CARNIVAL_VERSION @"8.5.0"
FOUNDATION_EXPORT double CarnivalSDKVersionNumber;
FOUNDATION_EXPORT const unsigned char CarnivalSDKVersionString[];

Expand All @@ -27,6 +27,12 @@ typedef NS_OPTIONS(NSUInteger, CarnivalDeviceDataType) {
CarnivalDeviceDataTypeEvents = 1 << 2
};

typedef NS_OPTIONS(NSUInteger, CarnivalPushAuthorizationOption) {
CarnivalPushAuthorizationOptionNoRequest, // This option will not request any push authorization permissions for the device. Note that a push token will still be requested. No prompt is required.
CarnivalPushAuthorizationOptionProvisional, // This option will request provisional push authorization, allowing push notifications to be sent to the notification center. No prompt is required. Available iOS 12+, defaults to CarnivalPushAuthorizationOptionNoRequest behaviour for earlier versions.
CarnivalPushAuthorizationOptionFull // This option will request full push authorization for alerts, sounds and badges. Note that this will prompt the user for permission.
};

/* Constants for Auto-Analytics Tracking */
NS_ASSUME_NONNULL_BEGIN
extern NSString * const CarnivalAutoAnalyticsSourceGoogleAnalytics;
Expand All @@ -50,7 +56,7 @@ NS_ASSUME_NONNULL_END
* Make sure your app bundle identifier is the same as whatever it is set to on http://mobile.sailthru.com .
*
* @warning It is important that this method is called at the earliest possible opportunity (e.g. application:didFinishLaunchingWithOptions:),
* calling it later in the app lifecycle can have unintended consequences. No startEngine: calls (overrides included) must not be called more than once.
* calling it later in the app lifecycle can have unintended consequences. Calls to startEngine: (overrides included) must not be made more than once.
*/
+ (void)startEngine:(nonnull NSString *)appKey;

Expand All @@ -59,15 +65,27 @@ NS_ASSUME_NONNULL_END
* @note The device will be registered with the Apple Push Notification service and provided with a push notification token regardless of whether registerForPushNotifications is set to YES or NO. This step does not require a user prompt.
*
* On devices running iOS 12+ provisional authorization will be requested if registerForPushNotifications is set to NO, allowing Quiet push notifications to
* be sent to the device.
* be sent to the device (equivalent to CarnivalPushRegistrationOptionProvisional).
*
* @param appKey The appKey you recieved when setting up your app at http://mobile.sailthru.com .
* @param registerForPushNotifications when this parameter is YES the Carnival iOS SDK will automatically register for push notifications
*
* @warning It is important that this method is called at the earliest possible opportunity (e.g. application:didFinishLaunchingWithOptions:),
* calling it later in the app lifecycle can have unintended consequences. No startEngine: calls (overrides included) must not be called more than once.
* calling it later in the app lifecycle can have unintended consequences. Calls to startEngine: (overrides included) must not be made more than once.
*/
+ (void)startEngine:(nonnull NSString *)appKey registerForPushNotifications:(BOOL)registerForPushNotifications __attribute__((deprecated("use startEngine:withAuthorizationOption: instead.")));

/**
* Sets the Carnival appKey credentials for this app and optionally registers for push notifications authorization. Authorization request will be determined by the pushAuthorizationOption parameter
* @note The device will be registered with the Apple Push Notification service and provided with a push notification token regardless of the CarnivalPushRegistrationOption supplied. This step does not require a user prompt.
*
* @param appKey The appKey you recieved when setting up your app at http://mobile.sailthru.com .
* @param pushAuthorizationOption The authorization option the SDK should use when requesting push notification authorization
*
* @warning It is important that this method is called at the earliest possible opportunity (e.g. application:didFinishLaunchingWithOptions:),
* calling it later in the app lifecycle can have unintended consequences. Calls to startEngine: (overrides included) must not be made more than once.
*/
+ (void)startEngine:(nonnull NSString *)appKey registerForPushNotifications:(BOOL)registerForPushNotifications;
+ (void)startEngine:(nonnull NSString *)appKey withAuthorizationOption:(CarnivalPushAuthorizationOption)pushAuthorizationOption;

/**
* Sets the logger used by Carnival for any internal informational or debugging logging.
Expand Down Expand Up @@ -348,7 +366,7 @@ NS_ASSUME_NONNULL_END
* Logs a cart abandonment with the Sailthru platform. Use this to initiate cart abandoned flows.
*
* @param purchase The abandoned purchase to log with the platform.
* @param handler callback handler.
* @param block The block to handle the result of the call. May contain an error if the call failed.
*/
+ (void)logAbandonedCart:(nonnull CarnivalPurchase *)purchase withResponse:(nullable void(^)(NSError * _Nullable))block;

Expand Down
Binary file modified ExampleProject/ExampleProject/Carnival.framework/Info.plist
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Headers/Carnival.h</key>
<data>
gHQ73s18nOmzEt2Bi1MElN2W/yU=
djR0GQLPRBdBFVkP7dAdUyTZk/c=
</data>
<key>Headers/CarnivalAttributes.h</key>
<data>
Expand Down Expand Up @@ -38,7 +38,7 @@
</data>
<key>Info.plist</key>
<data>
AXEaircTSO/lKGu/HZZkAR+HsFc=
Q4xayS1FXClvJzoejrhxQc/MgCc=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down Expand Up @@ -128,11 +128,11 @@
<dict>
<key>hash</key>
<data>
gHQ73s18nOmzEt2Bi1MElN2W/yU=
djR0GQLPRBdBFVkP7dAdUyTZk/c=
</data>
<key>hash2</key>
<data>
c2RDVZuOelU8ISbjP8l0tg56Y21LuDNDOiMTT6s0GLo=
ACucLBQnWumsV6sXDHu83pDzNB4RGU1d6ZpClg5qjTA=
</data>
</dict>
<key>Headers/CarnivalAttributes.h</key>
Expand Down
Binary file modified SwiftExampleProject/SwiftExampleProject/Carnival.framework/Carnival
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#import "CarnivalContentItem.h"
#import "CarnivalPurchase.h"

#define CARNIVAL_VERSION @"8.4.0"
#define CARNIVAL_VERSION @"8.5.0"
FOUNDATION_EXPORT double CarnivalSDKVersionNumber;
FOUNDATION_EXPORT const unsigned char CarnivalSDKVersionString[];

Expand All @@ -27,6 +27,12 @@ typedef NS_OPTIONS(NSUInteger, CarnivalDeviceDataType) {
CarnivalDeviceDataTypeEvents = 1 << 2
};

typedef NS_OPTIONS(NSUInteger, CarnivalPushAuthorizationOption) {
CarnivalPushAuthorizationOptionNoRequest, // This option will not request any push authorization permissions for the device. Note that a push token will still be requested. No prompt is required.
CarnivalPushAuthorizationOptionProvisional, // This option will request provisional push authorization, allowing push notifications to be sent to the notification center. No prompt is required. Available iOS 12+, defaults to CarnivalPushAuthorizationOptionNoRequest behaviour for earlier versions.
CarnivalPushAuthorizationOptionFull // This option will request full push authorization for alerts, sounds and badges. Note that this will prompt the user for permission.
};

/* Constants for Auto-Analytics Tracking */
NS_ASSUME_NONNULL_BEGIN
extern NSString * const CarnivalAutoAnalyticsSourceGoogleAnalytics;
Expand All @@ -50,7 +56,7 @@ NS_ASSUME_NONNULL_END
* Make sure your app bundle identifier is the same as whatever it is set to on http://mobile.sailthru.com .
*
* @warning It is important that this method is called at the earliest possible opportunity (e.g. application:didFinishLaunchingWithOptions:),
* calling it later in the app lifecycle can have unintended consequences. No startEngine: calls (overrides included) must not be called more than once.
* calling it later in the app lifecycle can have unintended consequences. Calls to startEngine: (overrides included) must not be made more than once.
*/
+ (void)startEngine:(nonnull NSString *)appKey;

Expand All @@ -59,15 +65,27 @@ NS_ASSUME_NONNULL_END
* @note The device will be registered with the Apple Push Notification service and provided with a push notification token regardless of whether registerForPushNotifications is set to YES or NO. This step does not require a user prompt.
*
* On devices running iOS 12+ provisional authorization will be requested if registerForPushNotifications is set to NO, allowing Quiet push notifications to
* be sent to the device.
* be sent to the device (equivalent to CarnivalPushRegistrationOptionProvisional).
*
* @param appKey The appKey you recieved when setting up your app at http://mobile.sailthru.com .
* @param registerForPushNotifications when this parameter is YES the Carnival iOS SDK will automatically register for push notifications
*
* @warning It is important that this method is called at the earliest possible opportunity (e.g. application:didFinishLaunchingWithOptions:),
* calling it later in the app lifecycle can have unintended consequences. No startEngine: calls (overrides included) must not be called more than once.
* calling it later in the app lifecycle can have unintended consequences. Calls to startEngine: (overrides included) must not be made more than once.
*/
+ (void)startEngine:(nonnull NSString *)appKey registerForPushNotifications:(BOOL)registerForPushNotifications __attribute__((deprecated("use startEngine:withAuthorizationOption: instead.")));

/**
* Sets the Carnival appKey credentials for this app and optionally registers for push notifications authorization. Authorization request will be determined by the pushAuthorizationOption parameter
* @note The device will be registered with the Apple Push Notification service and provided with a push notification token regardless of the CarnivalPushRegistrationOption supplied. This step does not require a user prompt.
*
* @param appKey The appKey you recieved when setting up your app at http://mobile.sailthru.com .
* @param pushAuthorizationOption The authorization option the SDK should use when requesting push notification authorization
*
* @warning It is important that this method is called at the earliest possible opportunity (e.g. application:didFinishLaunchingWithOptions:),
* calling it later in the app lifecycle can have unintended consequences. Calls to startEngine: (overrides included) must not be made more than once.
*/
+ (void)startEngine:(nonnull NSString *)appKey registerForPushNotifications:(BOOL)registerForPushNotifications;
+ (void)startEngine:(nonnull NSString *)appKey withAuthorizationOption:(CarnivalPushAuthorizationOption)pushAuthorizationOption;

/**
* Sets the logger used by Carnival for any internal informational or debugging logging.
Expand Down Expand Up @@ -348,7 +366,7 @@ NS_ASSUME_NONNULL_END
* Logs a cart abandonment with the Sailthru platform. Use this to initiate cart abandoned flows.
*
* @param purchase The abandoned purchase to log with the platform.
* @param handler callback handler.
* @param block The block to handle the result of the call. May contain an error if the call failed.
*/
+ (void)logAbandonedCart:(nonnull CarnivalPurchase *)purchase withResponse:(nullable void(^)(NSError * _Nullable))block;

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Headers/Carnival.h</key>
<data>
gHQ73s18nOmzEt2Bi1MElN2W/yU=
djR0GQLPRBdBFVkP7dAdUyTZk/c=
</data>
<key>Headers/CarnivalAttributes.h</key>
<data>
Expand Down Expand Up @@ -38,7 +38,7 @@
</data>
<key>Info.plist</key>
<data>
AXEaircTSO/lKGu/HZZkAR+HsFc=
Q4xayS1FXClvJzoejrhxQc/MgCc=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down Expand Up @@ -128,11 +128,11 @@
<dict>
<key>hash</key>
<data>
gHQ73s18nOmzEt2Bi1MElN2W/yU=
djR0GQLPRBdBFVkP7dAdUyTZk/c=
</data>
<key>hash2</key>
<data>
c2RDVZuOelU8ISbjP8l0tg56Y21LuDNDOiMTT6s0GLo=
ACucLBQnWumsV6sXDHu83pDzNB4RGU1d6ZpClg5qjTA=
</data>
</dict>
<key>Headers/CarnivalAttributes.h</key>
Expand Down

0 comments on commit a869a3b

Please sign in to comment.