Skip to content

Commit

Permalink
Updating Appboy SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenzhi committed Jul 20, 2015
1 parent 3e85f6f commit 5ab4684
Show file tree
Hide file tree
Showing 116 changed files with 2,117 additions and 453 deletions.
Binary file modified .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions Appboy-WatchKit/ABWKUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/*
* This ABWKUser class is parallel with the ABKUser in the Appboy iOS SDK.
*
* NOTE: Make sure DO NOT pass a nil as a parameter, otherwise the watch SDK will throw an exception
* when trying to parse the data to a dictionary.
* NOTE: Make sure you DO NOT pass a nil as a parameter, otherwise the watch SDK will throw an exception
* when trying to parse the data into a dictionary.
*/
@interface ABWKUser : NSObject

Expand Down
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.12.2"
s.version = "2.13.0"
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 modified AppboyKit/Appboy.bundle/ABKBannerCardCell.nib/objects-8.0+.nib
Binary file not shown.
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 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 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 not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKFeedbackNavBar.nib/objects-8.0+.nib
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/ABKSpinnerView.nib/objects-8.0+.nib
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 not shown.
8 changes: 7 additions & 1 deletion AppboyKit/headers/AppboyKitLibrary/ABKCard.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
@property (nonatomic, assign) ABKCardCategory categories;

/*
* @param cardDictionary The dictionary for card deserialization.
* The property is the unix timestamp of the card's expiration time. When the value is less than 0, it means the card
* doesn't an expire date.
*/
@property (nonatomic, assign, readonly) double expiresAt;

/*
* @param cardDictionary The dictionary for card deserialization.`
*
* 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.
Expand Down
27 changes: 27 additions & 0 deletions AppboyKit/headers/AppboyKitLibrary/ABKLocationManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#import <Foundation/Foundation.h>

@class ABKServerConfig;

@interface ABKLocationManager : NSObject

@property (nonatomic, readonly, assign) BOOL disableLocationTracking;
- (id) initWithServerConfig:(ABKServerConfig *)serverConfig andAppboyOptions:(NSDictionary *)appboyOptions;

/*!
* Calling this method gives Appboy permission to request WhenInUse authorization on your behalf the next time we attempt to collect
* location in the foreground.
*/
- (void) allowRequestWhenInUseLocationPermission;

/*!
* Calling this method gives Appboy permission to request Always authorization on your behalf the next time we attempt to collect
* significant location changes.
*/
- (void) allowRequestAlwaysPermission;

/*!
* Calling this method will log a location using the regular location provider if a location is reported in under
* 60 seconds. After 60 seconds expires the regular location provider will stop collecting location.
*/
- (void) logSingleLocation;
@end
12 changes: 12 additions & 0 deletions AppboyKit/headers/AppboyKitLibrary/ABKPushUtils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#import <Foundation/Foundation.h>

static NSString *const ABKAppboyPushNotificationUninstallTrackingKey = @"appboy_uninstall_tracking";

/*
* Appboy Public API: ABKPushUtils
*/
@interface ABKPushUtils : NSObject

+ (BOOL) isUninstallTrackingNotification:(NSDictionary *)userInfo;

@end
56 changes: 56 additions & 0 deletions AppboyKit/headers/AppboyKitLibrary/ABKTwitterUser.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#import <Foundation/Foundation.h>

/*
* Appboy Public API: ABKTwitterUser
*/
@interface ABKTwitterUser : NSObject

/*!
* @param userDescription The value returned from twitter user API with key "description". Please
* refer to https://dev.twitter.com/overview/api/users for more information.
*/
@property (nonatomic, copy) NSString* userDescription;

/*
* @param twitterName The value returned from twitter user API with key "name". Please
* refer to https://dev.twitter.com/overview/api/users for more information.
*/
@property (nonatomic, copy) NSString* twitterName;

/*
* @param profileImageUrl The value returned from twitter user API with key "profile_image_url". Please
* refer to https://dev.twitter.com/overview/api/users for more information.
*/
@property (nonatomic, copy) NSString* profileImageUrl;

/*
* @param screenName The value returned from twitter user API with key "screen_name". Please
* refer to https://dev.twitter.com/overview/api/users for more information.
*/
@property (nonatomic, copy) NSString* screenName;

/*
* @param followersCount The value returned from twitter user API with key "followers_count". Please
* refer to https://dev.twitter.com/overview/api/users for more information.
*/
@property (nonatomic, assign) NSInteger followersCount;

/*
* @param friendsCount The value returned from twitter user API with key "friends_count". Please
* refer to https://dev.twitter.com/overview/api/users for more information.
*/
@property (nonatomic, assign) NSInteger friendsCount;

/*
* @param statusesCount The value returned from twitter user API with key "statuses_count". Please
* refer to https://dev.twitter.com/overview/api/users for more information.
*/
@property (nonatomic, assign) NSInteger statusesCount;

/*
* @param twitterID The value returned from twitter user API with key "id". Please
* refer to https://dev.twitter.com/overview/api/users for more information.
*/
@property (nonatomic, assign) NSInteger twitterID;

@end
24 changes: 5 additions & 19 deletions AppboyKit/headers/AppboyKitLibrary/ABKUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#import <Foundation/Foundation.h>

@class ABKFacebookUser;
@class ABKTwitterUser;

/*!
* When setting the custom attributes with custom keys:
Expand Down Expand Up @@ -94,29 +95,14 @@
@property (nonatomic, copy) NSString *avatarImageURL;

/*!
* The Twitter account identifier for this user. If set, Appboy will only attempt to obtain Twitter data from the
* Accounts framework if the account with the specified identifier is available. See the
* ABKSocialAccountAcquisitionPolicy documentation in Appboy.h for more information.
*/
@property (nonatomic, copy) NSString *twitterAccountIdentifier;

/*!
* This property is for when a user's twitter account with the given identifier isn't available, should Appboy also
* delete the saved twitter account in the server of that user.
*
* The default value of this property is NO. If the property is set to YES, when the twitter account data with the given
* twitter identifier(defined in the ABKUser's twitterAccountIdentifier property) isn't available, Appboy will also delete
* Appboy will delete the saved twitter account data of that user in Appboy's database.
*
* This property is only used when in appboyOptions, ABKSocialAccountAcquisitionPolicyOptionKey is set to be
* ABKAutomaticSocialAccountAcquisitionWithIdentifierOnly, and twitterAccountIdentifier property has a valid value.
* The User's Facebook account information. For more detail, please refer to ABKFacebookUser.h.
*/
@property (nonatomic, assign) BOOL clearTwitterDataWhenNoDataOfTwitterIdentifier;
@property (nonatomic, retain) ABKFacebookUser *facebookUser;

/*!
* The User's Facebook account information. For more detail, please refer to ABKFacebookUser.h.
* The User's Twitter account information. For more detail, please refer to ABKTwitterUser.h.
*/
@property (nonatomic, retain) ABKFacebookUser *facebookUser;
@property (nonatomic, retain) ABKTwitterUser *twitterUser;

/* ------------------------------------------------------------------------------------------------------
* Enums
Expand Down
106 changes: 31 additions & 75 deletions AppboyKit/headers/AppboyKitLibrary/Appboy.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#import <UIKit/UIKit.h>

#ifndef APPBOY_SDK_VERSION
#define APPBOY_SDK_VERSION @"2.12.2"
#define APPBOY_SDK_VERSION @"2.13.0"
#endif

@class ABKInAppMessageController;
Expand All @@ -24,6 +24,7 @@
@class ABKInAppMessageViewController;
@protocol ABKInAppMessageControllerDelegate;
@protocol ABKAppboyEndpointDelegate;
@class ABKLocationManager;

/*
* Appboy Public API: Appboy
Expand Down Expand Up @@ -83,13 +84,6 @@
*/
extern NSString *const ABKRequestProcessingPolicyOptionKey;

/*!
* If you want to set the social account acquisition policy at app startup time (useful for avoiding automatic
* social account data requests made by Appboy at startup). You can include one of the ABKSocialAccountAcquisitionPolicy
* enum values as the value for the ABKSocialAccountAcquisitionPolicyOptionKey in the appboyOptions dictionary.
*/
extern NSString *const ABKSocialAccountAcquisitionPolicyOptionKey;

/*!
* Sets the data flush interval (in seconds). This only has an effect when the request processing mode is set to
* ABKAutomaticRequestProcessing (which is the default). Values are converted into NSTimeIntervals and must be greater
Expand All @@ -105,6 +99,27 @@ extern NSString *const ABKFlushIntervalOptionKey;
*/
extern NSString *const ABKDisableAutomaticLocationCollectionKey;

/*!
* This key can be set to YES or NO and will configure whether Appboy will automatically collect significant change location events. If this key isn't set and the server doesn't provide a value, it will defaul to false.
*/
extern NSString *const ABKSignificantChangeCollectionEnabledOptionKey;

/*!
* This key can be set to an integer value that represents the minimum distance in meters between location events logged to Appboy.
* If this value is set and significant change location is enabled, this value will be used to filter locations that are received from the significant
* change location provider. The default and minimum value is 50. Note that significant change location updates shouldn't occur if the user has
* gone 50 meters or less.
*/
extern NSString *const ABKSignificantChangeCollectionDistanceFilterOptionKey;

/*!
* This key can be set to an integer value that represents the minimum time in seconds between location events logged to Appboy.
* If this value is set and significant change location is enabled, this value will be used to filter locations that are received from the significant
* change location provider. The default value is 3600 (1 hour); the minimum is 300 (5 minutes).
*/
extern NSString *const ABKSignificantChangeCollectionTimeFilterOptionKey;


/*!
* This key can be set to a class that extends ABKAppboyEndpointDelegate which can be used to modifying or substitute the API and Resource
* (e.g. image) URIs used by the Appboy SDK.
Expand Down Expand Up @@ -145,28 +160,6 @@ typedef NS_ENUM(NSInteger, ABKRequestProcessingPolicy) {
ABKManualRequestProcessing
};

/*!
* Possible values for the SDK's social account acquisition policies:
* ABKAutomaticSocialAccountAcquisition (default) - At app startup and after you've set a social account identifier
* on the user object, Appboy will automatically attempt to fetch Twitter account data
* for the user and flush it to the server. In all cases, Appboy's automatic data acquisition will ensure that the
* user is not prompted or that the UI of your application is otherwise affected. For this reason, when Appboy
* tries to perform the data acquisition, your app must have already been granted the relevant permissions to
* obtain social account data. If you've specified the twitterAccountIdentifier, Appboy will only attempt to grab
* data for that twitter account. If you haven't specified it, Appboy will grab data for the first Twitter account
* returned by the system.
* ABKAutomaticSocialAccountAcquisitionWithIdentifierOnly - Appboy will only attempt to obtain social account information when
* an identifier is set on the user for the corresponding social network. Note: This currently only works for
* Twitter accounts.
* ABKManualSocialAccountAcquisition - Appboy will NOT try to acquire social account data. You must call
* <pre>[[Appboy sharedInstance] promptUserForAccessToSocialNetwork:(ABKSocialNetwork)];</pre>
*/
typedef NS_ENUM(NSInteger, ABKSocialAccountAcquisitionPolicy) {
ABKAutomaticSocialAccountAcquisition,
ABKAutomaticSocialAccountAcquisitionWithIdentifierOnly,
ABKManualSocialAccountAcquisition
};

/*!
* Values representing the Social Networks recognized by the SDK.
*/
Expand All @@ -193,6 +186,12 @@ typedef NS_OPTIONS(NSUInteger, ABKSocialNetwork) {
*/
@property (nonatomic, retain, readonly) ABKUser *user;

/*!
* The Appboy location manager provides access to location related functionality in the Appboy SDK.
* See ABKLocationManager.h.
*/
@property (nonatomic, readonly) ABKLocationManager *locationManager;

/*!
* Appboy UI elements can be themed using the NUI framework. See https://github.com/tombenner/nui and the Appboy docs.
* To enable NUI, take the following steps:
Expand All @@ -213,32 +212,6 @@ typedef NS_OPTIONS(NSUInteger, ABKSocialNetwork) {
*/
@property (nonatomic, assign) BOOL useNUITheming;

/*!
* The total number of currently active cards displayed in any feed view. Cards are
* counted only once even if they appear in multiple feed views.
* @deprecated This property is now deprecated and will be removed in the future. Please use
* [[Appboy sharedInstance].feedController cardCountForCategories:ABKCardCategoryAll] instead.
*/
@property (readonly, nonatomic, assign) NSInteger cardCount __deprecated_msg("Please use \n"
"[[Appboy sharedInstance].feedController cardCountForCategories:ABKCardCategoryAll] instead");

/*!
* unreadCardCount is the number of currently active cards which have not been viewed.
* A "view" happens when a card becomes visible in the feed view. This differentiates
* between cards which are off-screen in the scrolling view, and those which
* are on-screen; when a card scrolls onto the screen, it's counted as viewed.
*
* Cards are counted as viewed only once -- if a card scrolls off the screen and
* back on, it's not re-counted.
*
* Cards are counted only once even if they appear in multiple feed views or across multiple devices.
*
* @deprecated This property is now deprecated and will be removed in the future. Please use
* [[Appboy sharedInstance].feedController unreadCardCountForCategories:ABKCardCategoryAll] instead.
*/
@property (readonly, nonatomic, assign) NSInteger unreadCardCount __deprecated_msg("Please use \n"
"[[Appboy sharedInstance].feedController unreadCardCountForCategories:ABKCardCategoryAll] instead");

/*!
* The policy regarding processing of network requests by the SDK. See the enumeration values for more information on
* possible options. This value can be set at runtime, or can be injected in at startup via the appboyOptions dictionary.
Expand Down Expand Up @@ -469,25 +442,6 @@ didReceiveRemoteNotification:(NSDictionary *)notification
*/
- (void) logSocialShare:(ABKSocialNetwork)socialNetwork;

/*!
* @param socialNetworks An ABKSocialNetwork indicating the network that you wish to access.
*
* @discussion Use this method to prompt the user for permission to use social network data (you don't need to use it
* if permission has has been given at another point in your app -- Appboy is already collecting data).
*
* After permission is given, Appboy starts collecting any social network data available on the device (e.g. name, e-mail, etc.)
* and reporting it to the server.
*
* We generally advise that you don't call this method on startup, as it will immediately prompt your users for
* Twitter access.
*
* Please note that In versions 2.10 and above, Appboy will no longer prompt users to connect their Facebook accounts.
* Please refer to the method "promptUserToConnectFacebookAccountOnDeviceAndFetchAccountData" in SocialNetworkViewController.m
* (https://github.com/Appboy/appboy-ios-sdk/blob/master/Example/Stopwatch/SocialNetworkViewController.m) to continue
* prompting users to connect their Facebook account.
*/
- (void) promptUserForAccessToSocialNetwork:(ABKSocialNetwork)socialNetwork;

/*!
* @param replyToEmail The email address to send feedback replies to.
* @param message The message input by the user. Must be non-null and non-empty.
Expand Down Expand Up @@ -532,6 +486,8 @@ didReceiveRemoteNotification:(NSDictionary *)notification
*/
- (void) requestInAppMessageRefresh;

- (BOOL) handleWatchKitExtensionRequest:(NSDictionary *)userInfo reply:(void (^)(NSDictionary *replyInfo))reply;

/*!
* Enqueues an in-app message request for the current user. Note that this is deprecated from version 2.11.0. Please use
* requestInAppMessageRefresh instead.
Expand Down
1 change: 1 addition & 0 deletions AppboyKit/headers/AppboyKitLibrary/AppboyKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#import "ABKUser.h"
#import "ABKAppboyEndpointDelegate.h"
#import "ABKFacebookUser.h"
#import "ABKTwitterUser.h"

// Feedback
#import "ABKFeedbackViewController.h"
Expand Down
Binary file modified AppboyKit/libAppboyKitLibrary.a
Binary file not shown.
Loading

0 comments on commit 5ab4684

Please sign in to comment.