Skip to content

Commit

Permalink
Merge pull request #29 from carnivalmobile/release-3.0.3
Browse files Browse the repository at this point in the history
Release 3.0.3
  • Loading branch information
igstewart3 authored May 16, 2019
2 parents c7830e0 + 7ae7bd9 commit 26fd347
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected static void setWrapperInfo() {

setWrapperMethod = Carnival.class.getDeclaredMethod("setWrapper", cArg);
setWrapperMethod.setAccessible(true);
setWrapperMethod.invoke(null, "React Native", "3.0.2");
setWrapperMethod.invoke(null, "React Native", "3.0.3");
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
Expand Down
Binary file modified ios/Carnival.framework/Carnival
Binary file not shown.
71 changes: 41 additions & 30 deletions ios/Carnival.framework/Headers/Carnival.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#import "CarnivalLogger.h"
#import "CarnivalContentItem.h"

#define CARNIVAL_VERSION @"7.3.0-beta"
#define CARNIVAL_VERSION @"8.2.3"
FOUNDATION_EXPORT double CarnivalSDKVersionNumber;
FOUNDATION_EXPORT const unsigned char CarnivalSDKVersionString[];

Expand Down Expand Up @@ -54,7 +54,11 @@ NS_ASSUME_NONNULL_END
+ (void)startEngine:(nonnull NSString *)appKey;

/**
* Sets the Carnival appKey credentials for this app and optionally registers for push notifications with the badge, alert and sound UIUserNotificationType's
* Sets the Carnival appKey credentials for this app and optionally registers for push notifications authorization with the badge, alert and sound UIUserNotificationTypes.
* @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.
*
* @param appKey The appKey you recieved when setting up your app at http://app.carnivalmobile.com .
* @param registerForPushNotifications when this parameter is YES the Carnival iOS SDK will automatically register for push notifications
Expand All @@ -66,17 +70,17 @@ NS_ASSUME_NONNULL_END

/**
* Sets the logger used by Carnival for any internal informational or debugging logging.
* @param logger An object implementing the CarnivalLogger protocol.
*/
+ (void)setLogger:(nonnull id<CarnivalLogger>)logger;

/**
* Enables AutoAnalytics tracking for a given array of event sources. This is opt-in as of Carnival 5.0.0.
*
*
* @param enableArray - An array of const strings beginning with CarnivalAutoAnalyticsSource.
*/
+ (void)enableAutoAnalytics:(nonnull NSArray *)enableArray;
+ (void)enableAutoAnalytics:(nonnull NSArray<NSString *> *)enableArray;

/** @name Custom Attributes */

Expand All @@ -88,15 +92,6 @@ NS_ASSUME_NONNULL_END
*/
+ (void)setAttributes:(nonnull CarnivalAttributes *)attributes withResponse:(nullable void(^)(NSError *__nullable error))block;

/**
* Syncronously sets a CarnivalAttributes object with Carnival.
*
* @param attributes A nonnull CarnivalAttributes object with the desired attributes set.
* @param error A pointer to an error which will be non-nil if there is an error.
*/
+ (void)setAttributes:(nonnull CarnivalAttributes *)attributes error:(NSError *__nullable *__nullable)error;


/**
* Asyncronously removes a value for a given key.
*
Expand All @@ -105,16 +100,6 @@ NS_ASSUME_NONNULL_END
**/
+ (void)removeAttributeWithKey:(nonnull NSString *)key withResponse:(nullable void(^)(NSError *__nullable error))block;

/**
* Syncronously removes a value for a given key.
*
* @param key The string value of the key.
* @param error A pointer to an error which will be non-nil if there is an error.
**/
+ (void)removeAttributeWithKey:(nonnull NSString *)key error:(NSError *__nullable *__nullable)error;



/**
* Asyncronously clears any of the Attribute, Message Stream, or Event data from the device.
* Use this method to clear the device attributes after user logout.
Expand Down Expand Up @@ -158,6 +143,11 @@ NS_ASSUME_NONNULL_END
*/
+ (void)handleNotification:(nonnull NSDictionary *)notificationDict;

/**
* Tells the Carnival SDK that the notification settings have been updated and that it should synchronize the new settings with the Carnival platform. This method is only required if auto integration has been disabled. It should be called after either the requestAuthorizationWithOptions:completionHandler: or registerUserNotificationSettings: methods have been used to request push notifications authorization.
*/
+ (void)syncNotificationSettings;

/** @name Device details */

/**
Expand All @@ -176,8 +166,6 @@ NS_ASSUME_NONNULL_END
*
* @param url the Sailthru Link to be unrolled
* @return the destination that the Sailthru link points to, or nil if the link isn't a valid Sailthru Link.
*/
+ (NSURL * _Nullable)handleSailthruLink:(NSURL * _Nonnull)url;

Expand All @@ -199,6 +187,14 @@ NS_ASSUME_NONNULL_END
*/
+ (void)logEvent:(nonnull NSString *)name;

/**
* Logs a custom event with the given name and associated vars.
*
* @param name The name of the custom event to be logged.
* @param vars The associated variables for the event.
*/
+ (void)logEvent:(nonnull NSString *)name withVars:(NSDictionary<NSString *, id> *__nullable)vars;

/** @name Users */

/**
Expand Down Expand Up @@ -226,7 +222,7 @@ NS_ASSUME_NONNULL_END
* @param sectionID An SPM section ID. The section must be set up to use JSON as the output format.
* @param block A block which gets called with an array of CarnivalContentItem objects and a possible error. Cannot be NULL.
*/
+ (void)recommendationsWithSection:(NSString *_Nonnull)sectionID withResponse:(nullable void(^)(NSArray * _Nullable contentItems, NSError *__nullable error))block;
+ (void)recommendationsWithSection:(NSString *_Nonnull)sectionID withResponse:(nullable void(^)(NSArray<CarnivalContentItem *> * _Nullable contentItems, NSError *__nullable error))block;

/**
* Registers that the given pageview with Sailthru SPM.
Expand All @@ -236,7 +232,7 @@ NS_ASSUME_NONNULL_END
* @param tags Tags for this content
* @param block The block returned from the asynchronous call. May contain an error.
*/
+ (void)trackPageviewWithUrl:(NSURL *_Nonnull)url andTags:(NSArray *_Nonnull)tags andResponse:(nullable void(^)(NSError *__nullable error))block;
+ (void)trackPageviewWithUrl:(NSURL *_Nonnull)url andTags:(NSArray<NSString *> *_Nonnull)tags andResponse:(nullable void(^)(NSError *__nullable error))block;

/**
* Registers that the given pageview with Sailthru SPM.
Expand All @@ -255,7 +251,7 @@ NS_ASSUME_NONNULL_END
* of content are contained within a section, otherwise just pass a single-item array.
* @param block The block returned from the asynchronous call. May contain an error.
*/
+ (void)trackImpressionWithSection:(NSString *_Nonnull)sectionID andUrls:(NSArray *_Nonnull)urls andResponse:(nullable void(^)(NSError *__nullable error))block;
+ (void)trackImpressionWithSection:(NSString *_Nonnull)sectionID andUrls:(NSArray<NSURL *> *_Nonnull)urls andResponse:(nullable void(^)(NSError *__nullable error))block;

/**
* Registers an impression - a reasonable expectation that a user has seen a piece of content - with Sailthru SPM.
Expand All @@ -274,6 +270,21 @@ NS_ASSUME_NONNULL_END
*/
+ (void)trackClickWithSection:(NSString *_Nonnull)sectionID andUrl:(NSURL *_Nonnull)url andResponse:(nullable void(^)(NSError *__nullable error))block;

/**
* Sets the profile vars on the server.
*
* @param vars the vars to set on the server.
* @param block the block returned from the asynchronous call. May contain an error.
*/
+ (void)setProfileVars:(NSDictionary<NSString *, id> * _Nonnull)vars withResponse:(nullable void(^)(NSError * _Nullable))block;

/**
* Retrieves the profile vars from the server.
*
* @param block the block returned from the asynchronous call. May contain an error.
*/
+ (void)getProfileVarsWithResponse:(nullable void(^)(NSDictionary<NSString *, id> * _Nullable, NSError * _Nullable))block;

/**
* Enabled location tracking based on IP Address. Tracking location tracking is enabled by default.
* Use this method for users who may not want to have their location tracked at all.
Expand All @@ -285,7 +296,7 @@ NS_ASSUME_NONNULL_END
/**
* Enable crash tracking for recording sessions which end in a crash.
* Warning: This is for advanced uses where in some cases, crash handlers from Test Flight or Fabric (Crashlytics) interrupt Carnival crash detection.
* If you are not experiencing these issues, do not use this method.
* If you are not experiencing these issues, do not use this method.
*
* @param enabled A boolean value indicating whether or not to install the crash handlers. Defaults to YES.
*/
Expand Down
4 changes: 2 additions & 2 deletions ios/Carnival.framework/Headers/CarnivalMessageStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ typedef NS_ENUM(NSInteger, CarnivalImpressionType) {
*
* @param handler A block object which returns an error which will be non-nil if there was a problem marking the messages as read.
*/
+ (void)markMessagesAsRead:(nonnull NSArray *)messages withResponse:(nullable void(^)(NSError *__nullable error))handler;
+ (void)markMessagesAsRead:(nonnull NSArray<CarnivalMessage *> *)messages withResponse:(nullable void(^)(NSError *__nullable error))handler;

/**
* Returns an array of Carnival Messages for the device.
*
* @param block A block which gets called with an array of CarnivalMessage objects and a possbile error. Cannot be NULL.
*/
+ (void)messages:(nonnull void (^)(NSArray *__nullable messages, NSError *__nullable error))block;
+ (void)messages:(nonnull void (^)(NSArray<CarnivalMessage *> *__nullable messages, NSError *__nullable error))block;

/**
* Removes the message with the given messageID from the Carnival Message Stream
Expand Down
Binary file modified ios/Carnival.framework/Info.plist
Binary file not shown.
Binary file removed ios/Carnival.framework/en.lproj/InfoPlist.strings
Binary file not shown.
Loading

0 comments on commit 26fd347

Please sign in to comment.