Skip to content

Commit

Permalink
Updating Appboy SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenzhi committed Jun 7, 2016
1 parent ecc370f commit 8f29080
Show file tree
Hide file tree
Showing 222 changed files with 7,333 additions and 6,495 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Appboy-iOS-SDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Appboy-iOS-SDK"
s.version = "2.20.0"
s.version = "2.20.1"
s.summary = "This is the Appboy iOS SDK for Mobile Marketing Automation"
s.homepage = "http://www.appboy.com"
s.license = { :type => 'Commercial', :text => 'Please refer to https://github.com/Appboy/appboy-ios-sdk/blob/master/LICENSE'}
Expand Down
Binary file added AppboyFeedbackViewController/.DS_Store
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions AppboyKit/ABKIdentifierForAdvertisingProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ @implementation ABKIdentifierForAdvertisingProvider
*
* To enable IDFA collection add a PreProcessor Macro to your build settings called ABK_ENABLE_IDFA_COLLECTION=1
*/
+ (NSString *) getIdentifierForAdvertiser {
+ (NSString *)getIdentifierForAdvertiser {
#ifdef ABK_ENABLE_IDFA_COLLECTION
ASIdentifierManager *sharedManager = [self getASIdentifierManager];
if (sharedManager) {
Expand All @@ -43,11 +43,11 @@ + (NSString *) getIdentifierForAdvertiser {
* in the case that the user has not enabled advertising tracking, but rather the rules surrounding its use become
* more strict.
*/
+ (NSNumber *) getIsAdvertisingTrackingEnabledAsNSNumber {
+ (NSNumber *)getIsAdvertisingTrackingEnabledAsNSNumber {
#ifdef ABK_ENABLE_IDFA_COLLECTION
ASIdentifierManager *sharedManager = [self getASIdentifierManager];
if (sharedManager) {
return [NSNumber numberWithBool:[sharedManager isAdvertisingTrackingEnabled]];
return @([sharedManager isAdvertisingTrackingEnabled]);
}
#endif
return nil;
Expand All @@ -58,7 +58,7 @@ + (NSNumber *) getIsAdvertisingTrackingEnabledAsNSNumber {
* @discussion Returns the [ASIdentifierManager sharedManager] if it is available (i.e., iOS >= 6.0 and app is linked
* against AdSupport framework).
*/
+ (ASIdentifierManager *) getASIdentifierManager {
+ (ASIdentifierManager *)getASIdentifierManager {
Class ASIdentifierManagerClass = NSClassFromString(@"ASIdentifierManager");
if (ASIdentifierManagerClass) {
// Don't use [ASIdentifierManager sharedManager] here so this method doesn't require that the host app link against
Expand Down
Binary file modified AppboyKit/Appboy.bundle/ABKBannerCardCell.nib/objects.nib
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKBannerCardCell.nib/runtime.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKFeedNoConnectionView.nib/objects.nib
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKFeedNoConnectionView.nib/runtime.nib
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKFeedbackContentView.nib/objects.nib
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKFeedbackContentView.nib/runtime.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKFeedbackNavBar.nib/objects.nib
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKFeedbackNavBar.nib/runtime.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKSpinnerView.nib/objects.nib
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKSpinnerView.nib/runtime.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/Info.plist
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ NS_ASSUME_NONNULL_BEGIN
* @param appboyEndpoint A URI string for an Appboy API endpoint
* @return A valid Appboy API endpoint URI
*/
- (NSString *) getApiEndpoint:(NSString *)appboyApiEndpoint;
- (NSString *)getApiEndpoint:(NSString *)appboyApiEndpoint;

@optional
/*!
* This method is deprecated. Appboy SDK will not call this delegate method no matter it is implemented or not.
* Please do not use or implement it.
*/
- (NSString *) getResourceEndpoint:(NSString *)appboyResourceEndpoint __deprecated;
- (NSString *)getResourceEndpoint:(NSString *)appboyResourceEndpoint __deprecated;

@end
NS_ASSUME_NONNULL_END
9 changes: 5 additions & 4 deletions AppboyKit/headers/AppboyKitLibrary/ABKAttributionData.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ NS_ASSUME_NONNULL_BEGIN
*
* @discussion: Creates an ABKAttributionData object to send to Appboy's servers.
*/
- (id) initWithNetwork:(nullable NSString *)network
campaign:(nullable NSString *)campaign
adGroup:(nullable NSString *)adGroup
creative:(nullable NSString *) creative;
- (id)initWithNetwork:(nullable NSString *)network
campaign:(nullable NSString *)campaign
adGroup:(nullable NSString *)adGroup
creative:(nullable NSString *)creative;

@property (nonatomic, readonly, nullable) NSString *network;
@property (nonatomic, readonly, nullable) NSString *campaign;
@property (nonatomic, readonly, nullable) NSString *adGroup;
@property (nonatomic, readonly, nullable) NSString *creative;

@end
NS_ASSUME_NONNULL_END
12 changes: 7 additions & 5 deletions AppboyKit/headers/AppboyKitLibrary/ABKCard.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
NS_ASSUME_NONNULL_BEGIN
@interface ABKCard : NSObject <NSCopying, NSCoding>

/*
* Card's ID.
*/
Expand Down Expand Up @@ -49,25 +50,26 @@ NS_ASSUME_NONNULL_BEGIN
* Deserializes the dictionary to a card for use by wrappers such as Appboy's Unity SDK for iOS.
* When the deserialization isn't successful, this method returns nil; otherwise, it returns the deserialized card.
*/
+ (nullable ABKCard *) deserializeCardFromDictionary:(nullable NSDictionary *)cardDictionary;
+ (nullable ABKCard *)deserializeCardFromDictionary:(nullable NSDictionary *)cardDictionary;

/*
* Serializes the card to binary data for use by wrappers such as Appboy's Unity SDK for iOS.
*/
- (nullable NSData *) serializeToData;
- (nullable NSData *)serializeToData;

/*
* Manually log an impression to Appboy for the card.
* This should only be used for custom news feed view controller. ABKFeedViewController already has card impression logging.
*/
- (void) logCardImpression;
- (void)logCardImpression;

/*
* Manually log a click to Appboy for the card.
* * This should only be used for custom news feed view controller. ABKFeedViewController already has card click logging.
*/
- (void) logCardClicked;
- (void)logCardClicked;

- (BOOL)hasSameId:(ABKCard *)card;

- (BOOL) hasSameId:(ABKCard *)card;
@end
NS_ASSUME_NONNULL_END
1 change: 1 addition & 0 deletions AppboyKit/headers/AppboyKitLibrary/ABKCrossPromotionCard.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@ NS_ASSUME_NONNULL_BEGIN
* This property indicates if the promoted item is universal or not.
*/
@property BOOL universal;

@end
NS_ASSUME_NONNULL_END
8 changes: 5 additions & 3 deletions AppboyKit/headers/AppboyKitLibrary/ABKFacebookUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ extern NSInteger const DefaultNumberOfFriends;
*
* Please checkout the SocialNetworkViewController class for the sample code of how to use ABKFacebookUser.
*/
- (id) initWithFacebookUserDictionary:(nullable NSDictionary *)facebookUserDictionary
numberOfFriends:(NSInteger)numberOfFriends
likes:(nullable NSArray *)likes;
- (id)initWithFacebookUserDictionary:(nullable NSDictionary *)facebookUserDictionary
numberOfFriends:(NSInteger)numberOfFriends
likes:(nullable NSArray *)likes;

@property (readonly, nullable) NSDictionary *facebookUserDictionary;
@property (readonly) NSInteger numberOfFriends;
@property (readonly, nullable) NSArray *likes;

@end
NS_ASSUME_NONNULL_END
11 changes: 6 additions & 5 deletions AppboyKit/headers/AppboyKitLibrary/ABKFeedController.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* where "feedUpdatedNotificationReceived:" is your callback method for handling the notification:
*
* <pre>
* - (void) feedUpdatedNotificationReceived:(NSNotification *)notification {
* BOOL updateIsSuccessful = [[notification.userInfo objectForKey:ABKFeedUpdatedIsSuccessfulKey] boolValue];
* - (void)feedUpdatedNotificationReceived:(NSNotification *)notification {
* BOOL updateIsSuccessful = [notification.userInfo[ABKFeedUpdatedIsSuccessfulKey] boolValue];
* < Do something in response to the notification >
* }
* <pre>
Expand Down Expand Up @@ -77,13 +77,13 @@ typedef NS_OPTIONS(NSUInteger, ABKCardCategory) {
*
* Cards are counted only once even if they appear in multiple feed views or across multiple devices.
*/
- (NSInteger) unreadCardCountForCategories:(ABKCardCategory)categories;
- (NSInteger)unreadCardCountForCategories:(ABKCardCategory)categories;

/*!
* This method returns the total number of currently active cards belongs to given categories. Cards are
* counted only once even if they appear in multiple feed views.
*/
- (NSInteger) cardCountForCategories:(ABKCardCategory)categories;
- (NSInteger)cardCountForCategories:(ABKCardCategory)categories;

/*!
* @param categories An ABKCardCategory indicating the categories that you want to get. You can pass more than one category
Expand All @@ -93,6 +93,7 @@ typedef NS_OPTIONS(NSUInteger, ABKCardCategory) {
* @discussion This method will find the cards of given categories and return them.
* When the given categories don't exist in any card, this method will return an empty array.
*/
- (nullable NSArray *) getCardsInCategories:(ABKCardCategory)categories;
- (nullable NSArray *)getCardsInCategories:(ABKCardCategory)categories;

@end
NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletion AppboyKit/headers/AppboyKitLibrary/ABKFeedViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ABKFeedViewController.h
// AppboySDK
//
// Copyright (c) 2013 Appboy. All rights reserved.
// Copyright (c) 2016 Appboy. All rights reserved.

/*!
* This class is used internally; you don't need to include it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
Called when a card on the news feed is clicked.
*/
- (BOOL) onCardClicked:(ABKCard *)clickedCard feedViewController:(UIViewController *)newsFeed;
- (BOOL)onCardClicked:(ABKCard *)clickedCard feedViewController:(UIViewController *)newsFeed;

@end
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ABKFeedViewControllerGenericContext.h
// AppboySDK
//
// Copyright (c) 2013 Appboy. All rights reserved.
// Copyright (c) 2016 Appboy. All rights reserved.

#import <UIKit/UIKit.h>
#import "ABKFeedViewControllerDelegate.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ABKFeedViewControllerModalContext.h
// AppboySDK
//
// Copyright (c) 2013 Appboy. All rights reserved.
// Copyright (c) 2016 Appboy. All rights reserved.

#import <UIKit/UIKit.h>
#import "ABKFeedViewControllerGenericContext.h"
Expand Down Expand Up @@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN
Called when the feed modal is closed.
*/
- (void) feedViewControllerModalContextCloseTapped:(ABKFeedViewControllerModalContext *)sender;
- (void)feedViewControllerModalContextCloseTapped:(ABKFeedViewControllerModalContext *)sender;

@end
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ABKFeedViewControllerNavigationContext.h
// AppboySDK
//
// Copyright (c) 2013 Appboy. All rights reserved.
// Copyright (c) 2016 Appboy. All rights reserved.

#import "ABKFeedViewController.h"
/* ------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ABKFeedViewControllerPopoverContext.h
// AppboySDK
//
// Copyright (c) 2013 Appboy. All rights reserved.
// Copyright (c) 2016 Appboy. All rights reserved.

#import <UIKit/UIKit.h>
#import "ABKFeedViewControllerGenericContext.h"
Expand Down Expand Up @@ -57,7 +57,7 @@ NS_ASSUME_NONNULL_BEGIN
Called when the Popover context's close button is tapped
*/
- (void) feedViewControllerPopoverContextCloseTapped:(ABKFeedViewControllerPopoverContext *)sender;
- (void)feedViewControllerPopoverContextCloseTapped:(ABKFeedViewControllerPopoverContext *)sender;

@end
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ABKFeedbackViewController.h
// AppboySDK
//
// Copyright (c) 2013 Appboy. All rights reserved.
// Copyright (c) 2016 Appboy. All rights reserved.

/*!
* This class is used internally; you don't need to include it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ABKFeedbackViewControllerModalContext.h
// AppboySDK
//
// Copyright (c) 2013 Appboy. All rights reserved.
// Copyright (c) 2016 Appboy. All rights reserved.

#import "ABKFeedbackViewController.h"
/* ------------------------------------------------------------------------------------------------------
Expand All @@ -19,21 +19,21 @@ NS_ASSUME_NONNULL_BEGIN
Called when the feedback modal is cancelled.
*/
- (void) feedbackViewControllerModalContextCancelTapped:(ABKFeedbackViewControllerModalContext *)sender;
- (void)feedbackViewControllerModalContextCancelTapped:(ABKFeedbackViewControllerModalContext *)sender;

/*!
@param sender The calling context
Called when feedback is sent from the modal.
*/
- (void) feedbackViewControllerModalContextFeedbackSent:(ABKFeedbackViewControllerModalContext *)sender;
- (void)feedbackViewControllerModalContextFeedbackSent:(ABKFeedbackViewControllerModalContext *)sender;

/*!
@param message The feedback message
Called before feedback is submitted. Return a message to be submitted.
*/
- (NSString *) feedbackViewControllerBeforeFeedbackSent:(NSString *)message;
- (NSString *)feedbackViewControllerBeforeFeedbackSent:(NSString *)message;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ABKFeedbackViewControllerNavigationContext.h
// AppboySDK
//
// Copyright (c) 2013 Appboy. All rights reserved..
// Copyright (c) 2016 Appboy. All rights reserved..

#import "ABKFeedbackViewController.h"
/* ------------------------------------------------------------------------------------------------------
Expand All @@ -19,15 +19,15 @@ NS_ASSUME_NONNULL_BEGIN
Called when feedback is sent.
*/
- (void) feedbackViewControllerNavigationContextFeedbackSent:(ABKFeedbackViewControllerNavigationContext *)sender;
- (void)feedbackViewControllerNavigationContextFeedbackSent:(ABKFeedbackViewControllerNavigationContext *)sender;

@optional
/*!
@param message The feedback message
Called before feedback is submitted. Return a message to be submitted.
*/
- (NSString *) feedbackViewControllerBeforeFeedbackSent:(NSString *)message;
- (NSString *)feedbackViewControllerBeforeFeedbackSent:(NSString *)message;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ABKFeedbackViewControllerPopoverContext.h
// AppboySDK
//
// Copyright (c) 2013 Appboy. All rights reserved.
// Copyright (c) 2016 Appboy. All rights reserved.

#import "ABKFeedbackViewController.h"
/* ------------------------------------------------------------------------------------------------------
Expand All @@ -21,22 +21,22 @@ NS_ASSUME_NONNULL_BEGIN
Called when the popover is cancelled.
*/
- (void) feedbackViewControllerPopoverContextCancelTapped:(ABKFeedbackViewControllerPopoverContext *)sender;
- (void)feedbackViewControllerPopoverContextCancelTapped:(ABKFeedbackViewControllerPopoverContext *)sender;

/*!
@param sender The calling context
Called when feedback is sent by the popover.
*/
- (void) feedbackViewControllerPopoverContextFeedbackSent:(ABKFeedbackViewControllerPopoverContext *)sender;
- (void)feedbackViewControllerPopoverContextFeedbackSent:(ABKFeedbackViewControllerPopoverContext *)sender;

@optional
/*!
@param message The feedback message
Called before feedback is submitted. Return a message to be submitted.
*/
- (NSString *) feedbackViewControllerBeforeFeedbackSent:(NSString *)message;
- (NSString *)feedbackViewControllerBeforeFeedbackSent:(NSString *)message;

@end
/*!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
*/
NS_ASSUME_NONNULL_BEGIN
@interface ABKIdentifierForAdvertisingProvider : NSObject
+ (nullable NSString *) getIdentifierForAdvertiser;
+ (nullable NSNumber *) getIsAdvertisingTrackingEnabledAsNSNumber;

+ (nullable NSString *)getIdentifierForAdvertiser;
+ (nullable NSNumber *)getIsAdvertisingTrackingEnabledAsNSNumber;

@end
NS_ASSUME_NONNULL_END
8 changes: 4 additions & 4 deletions AppboyKit/headers/AppboyKitLibrary/ABKInAppMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ NS_ASSUME_NONNULL_BEGIN
*
* Note: Each in-app message can log at most one impression and at most one click.
*/
- (void) logInAppMessageImpression;
- (void) logInAppMessageClicked;
- (void)logInAppMessageImpression;
- (void)logInAppMessageClicked;

/*!
* This method will set the inAppMessageClickActionType property.
Expand All @@ -137,12 +137,12 @@ NS_ASSUME_NONNULL_BEGIN
* ABKInAppMessageDisplayNewsFeed or ABKInAppMessageNoneClickAction, the parameter uri will be ignored, and property uri
* will be set to nil.
*/
- (void) setInAppMessageClickAction:(ABKInAppMessageClickActionType)clickActionType withURI:(nullable NSURL *)uri;
- (void)setInAppMessageClickAction:(ABKInAppMessageClickActionType)clickActionType withURI:(nullable NSURL *)uri;

/*!
* Serializes the in-app message to binary data for use by wrappers such as Appboy's Unity SDK for iOS.
*/
- (nullable NSData *) serializeToData;
- (nullable NSData *)serializeToData;

@end
NS_ASSUME_NONNULL_END
Loading

0 comments on commit 8f29080

Please sign in to comment.