Skip to content

Commit

Permalink
Carnival iOS SDK 7.2.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
CarnivalBot committed Mar 26, 2018
1 parent fcebd75 commit b46c30a
Show file tree
Hide file tree
Showing 9 changed files with 203 additions and 19 deletions.
Binary file modified Carnival.framework/Carnival
Binary file not shown.
69 changes: 62 additions & 7 deletions Carnival.framework/Headers/Carnival.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Carnival
//
// Created by Carnival Mobile
// Copyright (c) 2015 Carnival Mobile. All rights reserved.
// Copyright (c) 2017 Carnival.io. All rights reserved.
//
// For documentation see http://docs.carnival.io
//
Expand All @@ -14,8 +14,9 @@
#import "CarnivalMessageStream.h"
#import "CarnivalAttributes.h"
#import "CarnivalLogger.h"
#import "CarnivalContentItem.h"

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

Expand Down Expand Up @@ -83,7 +84,7 @@ NS_ASSUME_NONNULL_END
* Asyncronously sets a CarnivalAttributes object with Carnival.
*
* @param attributes A nonnull CarnivalAttributes object with the desired attributes set.
* @param block The block returned from the asyncronous call possibly containing an error.
* @param block The block returned from the asynchronous call. May contain an error.
*/
+ (void)setAttributes:(nonnull CarnivalAttributes *)attributes withResponse:(nullable void(^)(NSError *__nullable error))block;

Expand All @@ -100,7 +101,7 @@ NS_ASSUME_NONNULL_END
* Asyncronously removes a value for a given key.
*
* @param key The string value of the key.
* @param block The block returned from the asyncronous call possibly containing an error.
* @param block The block returned from the asynchronous call. May contain an error.
**/
+ (void)removeAttributeWithKey:(nonnull NSString *)key withResponse:(nullable void(^)(NSError *__nullable error))block;

Expand All @@ -119,7 +120,7 @@ NS_ASSUME_NONNULL_END
* Use this method to clear the device attributes after user logout.
*
* @param types A bitwise OR collection of CarnivalDeviceDataType dictating which sets of data to clear.
* @param block The block returned from the asyncronous call possibly containing an error.
* @param block The block returned from the asynchronous call. May contain an error.
**/
+ (void)clearDeviceData:(CarnivalDeviceDataType)types withResponse:(nullable void(^)(NSError *__nullable error))block;

Expand Down Expand Up @@ -191,7 +192,7 @@ NS_ASSUME_NONNULL_END
*
* @param userId The ID of the user to be set.
*
* @param block The block returned from the asyncronous call possibly containing an error.
* @param block The block returned from the asynchronous call. May contain an error.
*/
+ (void)setUserId:(nullable NSString *)userId withResponse:(nullable void(^)(NSError *__nullable error))block;

Expand All @@ -200,10 +201,64 @@ NS_ASSUME_NONNULL_END
*
* @param userEmail The email of the user to be set.
*
* @param block The block returned from the asyncronous call possibly containing an error.
* @param block The block returned from the asynchronous call. May contain an error.
*/
+ (void)setUserEmail:(nullable NSString *)userEmail withResponse:(nullable void(^)(NSError *__nullable error))block;

/**
* Returns the output from a Site Personalisation Manager section, an array of recommendations for the given user.
* It is suggested you use this in conjunction with setEmail: to identify the user to Sailthru.
*
* @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;

/**
* Registers that the given pageview with Sailthru SPM.
*
* @param url The URL of the content we're tracking a view of. Must be a valid URL with protocol http:// or https:// -
* this generally should correspond to the web link of the content being tracked, and the stored URL in the Sailthru content collection
* @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;

/**
* Registers that the given pageview with Sailthru SPM.
*
* @param url The URL of the content we're tracking a view of. Must be a valid URL with protocol http:// or https:// -
* this generally should correspond to the web link of the content being tracked, and the stored URL in the Sailthru content collection
* @param block The block returned from the asynchronous call. May contain an error.
*/
+ (void)trackPageviewWithUrl:(NSURL *_Nonnull)url 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.
*
* @param sectionID the Section ID on Sailthru SPM corresponding to the section being viewed
* @param urls a List of the URLs of the items contained within this section. Useful if multiple items
* 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;

/**
* Registers an impression - a reasonable expectation that a user has seen a piece of content - with Sailthru SPM.
*
* @param sectionID the Section ID on Sailthru SPM corresponding to the section being viewed
* @param block The block returned from the asynchronous call. May contain an error.
*/
+ (void)trackImpressionWithSection:(NSString *_Nonnull)sectionID andResponse:(nullable void(^)(NSError *__nullable error))block;

/**
* Tracks with Sailthru SPM that a section has been tapped on, transitioning the user to a detail view
*
* @param sectionID the Section ID on Sailthru SPM corresponding to the section being tapped
* @param url the URL of the detail being transitioned to
* @param block The block returned from the asynchronous call. May contain an error.
*/
+ (void)trackClickWithSection:(NSString *_Nonnull)sectionID andUrl:(NSURL *_Nonnull)url andResponse:(nullable void(^)(NSError *__nullable error))block;

/**
* Enabled location tracking based on IP Address. Tracking location tracking is enabled by default.
Expand Down
4 changes: 2 additions & 2 deletions Carnival.framework/Headers/CarnivalAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// CarnivalAttributes.h
// Carnival
//
// Created by Sam Jarman on 4/21/16.
// Copyright © 2016 Carnival Labs . All rights reserved.
// Created by Carnival Mobile
// Copyright (c) 2017 Carnival.io. All rights reserved.
//

#import <Foundation/Foundation.h>
Expand Down
129 changes: 129 additions & 0 deletions Carnival.framework/Headers/CarnivalContentItem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
//
// CarnivalContentItem.h
// Carnival
//
// Created by Carnival Mobile
// Copyright (c) 2017 Carnival.io. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CarnivalContentItem : NSObject

/**
* The unique ID of the content item.
*/
@property (nonatomic, strong, nonnull) NSString *contentItemID;

/**
* The unique ID of the content item's url.
*/
@property (nonatomic, strong, nonnull) NSString *contentItemHashID;

/**
* The title of the content item.
*/
@property (nonatomic, strong, nonnull) NSString *title;

/**
* The description of the content item.
*/
@property (nonatomic, strong, nullable) NSString *contentItemDescription;

/**
* The amount of views of the content item.
*/
@property (nonatomic, strong, nullable) NSNumber *views;

/**
* The URL for the location of the content item.
*/
@property (nonatomic, strong, nonnull) NSURL *URL;

/**
* The URL of image associated with content item.
*/
@property (nonatomic, strong, nullable) NSURL *imageURL;

/**
* The URL of the thumbnail image associated with content item.
*/
@property (nonatomic, strong, nullable) NSURL *imageThumbURL;

/**
* The URL of the full size image associated with content item.
*/
@property (nonatomic, strong, nullable) NSURL *imageFullURL;

/**
* A dictionary of all image sizes and URLs of images associated with content item.
*/
@property (nonatomic, strong, nullable) NSDictionary *images;

/**
* The date the content was created, if applicable.
*/
@property (nonatomic, strong, nullable) NSDate *date;

/**
* The tags associated with the content item.
*/
@property (nonatomic, strong, nullable) NSArray<NSString *>* tags;

/**
* The vars associated with the content item.
*/
@property (nonatomic, strong, nullable) NSDictionary *vars;

/**
* The date the content expires, if applicable.
*/
@property (nonatomic, strong, nullable) NSDate *expireDate;

/**
* Any additional fields associated with the content item's data.
*/
@property (nonatomic, strong, nullable) NSDictionary *extraFields;


/* Media Items properties */

/**
* The author of the content item, if applicable.
*/
@property (nonatomic, strong, nullable) NSString *author;

/**
* The location of the content item's origin.
*/
@property (nonatomic, strong, nullable) NSString *location;


/* Ecommerce Items properties */

/**
* The stock keeping unit of the content item.
*/
@property (nonatomic, strong, nullable) NSString *SKU;

/**
* The amount of inventory of the item.
*/
@property (nonatomic, strong, nullable) NSNumber *inventory;

/**
* The name of the site the item comes from.
*/
@property (nonatomic, strong, nullable) NSString *siteName;

/**
* The price of the content item.
*/
@property (nonatomic, strong, nullable) NSNumber *price;

/**
* The purchase quantity of the content item, if applicable.
*/
@property (nonatomic, strong, nullable) NSNumber *purchaseQuantity;

@end
4 changes: 2 additions & 2 deletions Carnival.framework/Headers/CarnivalLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// CarnivalLogger.h
// Carnival
//
// Created by Carnival Mobile on 28/11/16.
// Copyright © 2016 Carnival Mobile . All rights reserved.
// Created by Carnival Mobile
// Copyright (c) 2017 Carnival.io. All rights reserved.
//

typedef NS_ENUM(NSInteger, CarnivalLogLevel) {
Expand Down
2 changes: 1 addition & 1 deletion Carnival.framework/Headers/CarnivalMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Carnival
//
// Created by Carnival Mobile
// Copyright (c) 2015 Carnival Mobile. All rights reserved.
// Copyright (c) 2017 Carnival.io. All rights reserved.
//
// For documentation see http://docs.carnival.io
//
Expand Down
2 changes: 1 addition & 1 deletion Carnival.framework/Headers/CarnivalMessageStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Carnival
//
// Created by Carnival Mobile
// Copyright (c) 2015 Carnival Mobile. All rights reserved.
// Copyright (c) 2017 Carnival.io. All rights reserved.
//
// For documentation see http://docs.carnival.io
//
Expand Down
Binary file modified Carnival.framework/Info.plist
Binary file not shown.
12 changes: 6 additions & 6 deletions Carnival.podspec
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
Pod::Spec.new do |s|
s.name = 'Carnival'
s.version = '7.1.1'
s.version = '7.2.0-beta'
s.summary = 'Carnival iOS SDK for integrating with http://carnival.io messaging and analytics service.'
s.author = {
'Carnival Mobile' => '[email protected]'
}
s.homepage = 'http://docs.carnival.io'
s.source = {
s.source = {
:git => 'https://github.com/carnivalmobile/carnival-ios-sdk.git',
:tag => s.version.to_s
}
}
s.source_files = 'Carnival.framework/Headers/*.h'
s.xcconfig = {
'FRAMEWORK_SEARCH_PATHS' => '"$(PODS_ROOT)/Carnival/**"'
}
s.platform = :ios
s.ios.deployment_target = '8.0'
s.resources = 'Carnival.framework/*.png'
s.ios.deployment_target = '8.0'
s.resources = 'Carnival.framework/*.png'
s.public_header_files = 'Carnival.framework/Headers/*.h'
s.vendored_frameworks = 'Carnival.framework'
s.preserve_paths = 'Carnival.framework'
s.preserve_paths = 'Carnival.framework'
s.frameworks = 'UIKit', 'Foundation', 'CoreLocation', 'CoreGraphics', 'QuartzCore', 'UserNotifications'
s.license = {:type => 'commercial', :text =>'Please refer to our privacy policy and terms of service at http://carnival.io'}
s.requires_arc = true
Expand Down

0 comments on commit b46c30a

Please sign in to comment.