Skip to content

Commit

Permalink
Updating Braze SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
chshapiro committed Dec 20, 2018
1 parent 71f6d46 commit 714bdf8
Show file tree
Hide file tree
Showing 47 changed files with 542 additions and 527 deletions.
2 changes: 1 addition & 1 deletion Appboy-Push-Story.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Appboy-Push-Story"
s.version = "3.7.0"
s.version = "3.11.0"
s.summary = "This is the Braze Push Story SDK for Mobile Marketing Automation"
s.homepage = "http://www.braze.com"
s.license = { :type => 'Commercial', :text => 'Please refer to https://github.com/Appboy/appboy-ios-sdk/blob/master/LICENSE'}
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 = "3.10.0"
s.version = "3.11.0"
s.summary = "This is the Braze iOS SDK for Mobile Marketing Automation"
s.homepage = "http://www.braze.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/Info.plist
Binary file not shown.
6 changes: 0 additions & 6 deletions AppboyKit/headers/AppboyKitLibrary/ABKContentCard.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@
*/
- (void)logContentCardImpression;

/*!
* Manually log an impression to Braze for the control card.
* This should only be used for custom content card view controllers.
*/
- (void)logContentCardControlImpression;

/*!
* Manually log a click to Braze for the card.
* This should only be used for custom contentcard view controllers.
Expand Down
4 changes: 2 additions & 2 deletions AppboyKit/headers/AppboyKitLibrary/ABKFeedback.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ typedef enum {
@property (copy) NSString *email;
@property BOOL isBug;

- (instancetype)initWithFeedbackMessage:(NSString *)message email:(NSString *)email isBug:(BOOL)isBug;
- (instancetype)initWithFeedbackMessage:(NSString *)message email:(NSString *)email isBug:(BOOL)isBug __deprecated_msg("The feedback feature is disabled for new accounts, and will be removed in a future SDK release.");

/*!
* This method checks the validation of the feedback object and returns the result.
Expand All @@ -24,7 +24,7 @@ typedef enum {
* - feedback message isn't empty;
* - the email is a valid email address.
*/
- (ABKFeedbackValidation)feedbackValidation;
- (ABKFeedbackValidation)feedbackValidation __deprecated_msg("The feedback feature is disabled for new accounts, and will be removed in a future SDK release.");

@end
NS_ASSUME_NONNULL_END
14 changes: 4 additions & 10 deletions AppboyKit/headers/AppboyKitLibrary/Appboy.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#import <UserNotifications/UserNotifications.h>

#ifndef APPBOY_SDK_VERSION
#define APPBOY_SDK_VERSION @"3.10.0"
#define APPBOY_SDK_VERSION @"3.11.0"
#endif

#if !TARGET_OS_TV
Expand Down Expand Up @@ -413,21 +413,18 @@ typedef NS_OPTIONS(NSUInteger, ABKDeviceOptions) {
/*!
* This method is equivalent to calling logPurchase:inCurrency:atPrice:withQuantity:andProperties: with a quantity of 1 and nil properties.
* Please see logPurchase:inCurrency:atPrice:withQuantity:andProperties: for more information.
*
*/
- (void)logPurchase:(NSString *)productIdentifier inCurrency:(NSString *)currencyCode atPrice:(NSDecimalNumber *)price;

/*!
* This method is equivalent to calling logPurchase:inCurrency:atPrice:withQuantity:andProperties with a quantity of 1.
* Please see logPurchase:inCurrency:atPrice:withQuantity:andProperties: for more information.
*
*/
- (void)logPurchase:(NSString *)productIdentifier inCurrency:(NSString *)currencyCode atPrice:(NSDecimalNumber *)price withProperties:(nullable NSDictionary *)properties;

/*!
* This method is equivalent to calling logPurchase:inCurrency:atPrice:withQuantity:andProperties with nil properties.
* Please see logPurchase:inCurrency:atPrice:withQuantity:andProperties: for more information.
*
*/
- (void)logPurchase:(NSString *)productIdentifier inCurrency:(NSString *)currencyCode atPrice:(NSDecimalNumber *)price withQuantity:(NSUInteger)quantity;

Expand Down Expand Up @@ -461,7 +458,6 @@ typedef NS_OPTIONS(NSUInteger, ABKDeviceOptions) {
*
* Note: Braze supports purchases in multiple currencies. Purchases that you report in a currency other than USD will
* be shown in the dashboard in USD based on the exchange rate at the date they were reported.
*
*/
- (void)logPurchase:(NSString *)productIdentifier inCurrency:(NSString *)currencyCode atPrice:(NSDecimalNumber *)price withQuantity:(NSUInteger)quantity andProperties:(nullable NSDictionary *)properties;

Expand All @@ -474,9 +470,8 @@ typedef NS_OPTIONS(NSUInteger, ABKDeviceOptions) {
* @discussion Submits a piece of feedback to the Braze feedback center so that it can be handled in the Braze dashboard.
* The request to submit feedback is made immediately, however, this method does not block and will return as soon as the
* feedback request is placed on the network queue.
*
*/
- (BOOL)submitFeedback:(NSString *)replyToEmail message:(NSString *)message isReportingABug:(BOOL)isReportingABug;
- (BOOL)submitFeedback:(NSString *)replyToEmail message:(NSString *)message isReportingABug:(BOOL)isReportingABug __deprecated_msg("The feedback feature is disabled for new accounts, and will be removed in a future SDK release.");

/*!
* @param feedback The feedback object with feedback message, email, and is-bug flag.
Expand All @@ -486,9 +481,8 @@ typedef NS_OPTIONS(NSUInteger, ABKDeviceOptions) {
* @discussion Submits a piece of feedback to the Braze feedback center so that it can be handled in the Braze dashboard.
* The request to submit feedback is made immediately. However, this method does not block and will return as soon as the
* feedback request is placed on the network queue.
*
*/
- (void)submitFeedback:(ABKFeedback *)feedback withCompletionHandler:(nullable void (^)(ABKFeedbackSentResult feedbackSentResult))completionHandler;
- (void)submitFeedback:(ABKFeedback *)feedback withCompletionHandler:(nullable void (^)(ABKFeedbackSentResult feedbackSentResult))completionHandler __deprecated_msg("The feedback feature is disabled for new accounts, and will be removed in a future SDK release.");

/*!
* If you're displaying cards on your own instead of using ABKFeedViewController, you should still report impressions of
Expand All @@ -501,7 +495,7 @@ typedef NS_OPTIONS(NSUInteger, ABKDeviceOptions) {
* impressions of the feedback page back to Braze with this method so that your campaign reporting features still work
* in the dashboard.
*/
- (void)logFeedbackDisplayed;
- (void)logFeedbackDisplayed __deprecated_msg("The feedback feature is disabled for new accounts, and will be removed in a future SDK release.");

/*!
* If you're displaying content cards on your own instead of using ABKContentCardsViewController, you should still report
Expand Down
Binary file modified AppboyKit/libAppboyKitLibrary.a
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,12 @@ - (void)logCardImpressionIfNeeded:(ABKContentCard *)card {
return;
}

if ([card isControlCard]) {
[card logContentCardControlImpression];
} else {
if (![card isControlCard]) {
if (card.viewed == NO) {
[self.unviewedOnScreenCards addObject:card.idString];
}
[card logContentCardImpression];
}
[card logContentCardImpression];
[self.cardImpressions addObject:card.idString];
}

Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 3.11.0

##### Added
- Adds the ability to set or remove custom location attributes for a specific user from within HTML IAMs.
- Updates the SDK to report users who disable banner notifications but are still opted-in to push notifications as push enabled. Note this change does not affect provisionally authorized users on iOS 12, who were considered push enabled before this release regardless of their banner notification settings.

##### Changed
- Deprecates the Feedback feature.

##### Fixed
- Fixes an issue with the JS bridge when trying to set a custom attribute with the character '&'.

## 3.10.0

##### Added
Expand Down
36 changes: 18 additions & 18 deletions Example/Stopwatch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@
E32835A91CC6C6F200E2C2DE /* Sources */,
E32835AA1CC6C6F200E2C2DE /* Frameworks */,
E32835AB1CC6C6F200E2C2DE /* Resources */,
9EB86FDE13A503073A5932E4 /* [CP] Embed Pods Frameworks */,
F510F74012FB54169470D7E5 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -768,7 +768,7 @@
E397F4091CC5BA540095A3ED /* Sources */,
E397F40A1CC5BA540095A3ED /* Frameworks */,
E397F40B1CC5BA540095A3ED /* Resources */,
267CB6FF43F3D4F05D60B269 /* [CP] Embed Pods Frameworks */,
4A8D71BDB75ABFCFFCCE9DFC /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -1332,7 +1332,7 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Stopwatch/Pods-Stopwatch-resources.sh\"\n";
showEnvVarsInLog = 0;
};
267CB6FF43F3D4F05D60B269 /* [CP] Embed Pods Frameworks */ = {
4A8D71BDB75ABFCFFCCE9DFC /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -1386,40 +1386,40 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9EB86FDE13A503073A5932E4 /* [CP] Embed Pods Frameworks */ = {
E0E774FD2DD369EADF647C2F /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-tvOS_TVML_Stopwatch/Pods-tvOS_TVML_Stopwatch-frameworks.sh",
"${PODS_ROOT}/../../../Appboy-tvOS-SDK/Appboy-tvOS-SDK/AppboyTVOSKit.framework",
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Embed Pods Frameworks";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppboyTVOSKit.framework",
"$(DERIVED_FILE_DIR)/Pods-tvOS_Stopwatch-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOS_TVML_Stopwatch/Pods-tvOS_TVML_Stopwatch-frameworks.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E0E774FD2DD369EADF647C2F /* [CP] Check Pods Manifest.lock */ = {
F510F74012FB54169470D7E5 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
"${SRCROOT}/Pods/Target Support Files/Pods-tvOS_TVML_Stopwatch/Pods-tvOS_TVML_Stopwatch-frameworks.sh",
"${PODS_ROOT}/../../../Appboy-tvOS-SDK/Appboy-tvOS-SDK/AppboyTVOSKit.framework",
);
name = "[CP] Check Pods Manifest.lock";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-tvOS_Stopwatch-checkManifestLockResult.txt",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppboyTVOSKit.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-tvOS_TVML_Stopwatch/Pods-tvOS_TVML_Stopwatch-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -1618,7 +1618,7 @@
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.appboy.stopwatch;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "fbc30420-4ac5-400b-a7e4-7260267c79eb";
PROVISIONING_PROFILE = "fffc448f-2d06-43a2-9678-7760d4829913";
PROVISIONING_PROFILE_SPECIFIER = "match Development com.appboy.stopwatch";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
Expand Down Expand Up @@ -1849,7 +1849,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.appboy.stopwatch.StopwatchNotificationContentExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "0dd393d6-5dfe-4257-9e7a-843a2913deef";
PROVISIONING_PROFILE = "38ce5e1a-7175-4352-8e2b-680ed323ab60";
PROVISIONING_PROFILE_SPECIFIER = "match Development com.appboy.stopwatch.StopwatchNotificationContentExtension";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -2095,7 +2095,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.appboy.stopwatch.StopwatchNotificationService;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "fec6b0ff-b42d-494e-86a1-c6a9366c97ec";
PROVISIONING_PROFILE = "a7f22f14-95cb-417f-80f3-75661b4f2817";
PROVISIONING_PROFILE_SPECIFIER = "match Development com.appboy.stopwatch.StopwatchNotificationService";
SKIP_INSTALL = YES;
};
Expand Down
9 changes: 2 additions & 7 deletions Example/Stopwatch/ContainerViewController.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#import <UIKit/UIKit.h>
#import <AppboyKit.h>
#import "ABKNewsFeedViewController.h"

/**
* ContainerViewController is a custom container view controller that switches child views based on the
Expand All @@ -14,23 +13,19 @@
@property (weak, nonatomic) IBOutlet UIView *containerView;
@property (weak, nonatomic) IBOutlet UIViewController *currentViewController;
@property UISegmentedControl *segmentedControl;
@property BOOL hasFeedAndFlushButtons;
@property BOOL hasFlushButton;
@property NSMutableArray *childViewControllers;
@property NSArray *segmentIndexToViewControllerId;
@property ABKNewsFeedViewController *modalFeedViewController;

// This method fills in the data for switching between child view controllers and must be called before the view controller is presented
- (void)initWithArray:(NSArray *)segmentIndexToViewControllerId andTitle:(NSString *)title andImageName:(NSString *)imageName withFeedAndFlushButtons:(BOOL)hasButtons;
- (void)initWithArray:(NSArray *)segmentIndexToViewControllerId andTitle:(NSString *)title andImageName:(NSString *)imageName withFlushButton:(BOOL)hasFlushButton;

// Displays view controller for the selected segment index
- (void)displayViewForSegmentAtIndex:(NSUInteger)index;

// Switches between children view controllers
- (IBAction)changeViewController:(id)sender;

// Open up a modal NewsFeedViewController
- (IBAction)newsfeedButtonTapped:(id)sender;

// Manually flush data to Braze
- (IBAction)flushDataToAppboy:(id)sender;

Expand Down
21 changes: 5 additions & 16 deletions Example/Stopwatch/ContainerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ @implementation ContainerViewController
@param segmentIndexToViewControllerId An array where indices represent UISegmentedControl segment indices and values are the child UIViewController storyboard restoration IDs (NSString*) associated with that segment index. Restoration IDs also double as UISegmentedControl titles for a given segment.
@param title The UITabBarItem title for this tab in the root UITabBarController
@param imageName The image filename associated with the UITabBarItem image for this tab
@param withNavigationButtons A boolean indicating whether this ContainerViewController will have News Feed and Data Flush UIBarButtonItems in the UINavigationBar
@param withFlushButton A boolean for whether this ContainerViewController will have a Data Flush UIBarButtonItem in the UINavigationBar
*/
- (void)initWithArray:(NSArray *)segmentIndexToViewControllerId andTitle:(NSString *)title andImageName:(NSString *)imageName withFeedAndFlushButtons:(BOOL)hasButtons {
- (void)initWithArray:(NSArray *)segmentIndexToViewControllerId andTitle:(NSString *)title andImageName:(NSString *)imageName withFlushButton:(BOOL)hasFlushButton {
self.segmentIndexToViewControllerId = segmentIndexToViewControllerId;
self.hasFeedAndFlushButtons = hasButtons;
self.hasFlushButton = hasFlushButton;

self.tabBarItem.title = title;
self.tabBarItem.image = [UIImage imageNamed:imageName];
Expand All @@ -25,14 +25,8 @@ - (void)viewDidLoad {
[self.navigationItem setTitleView:self.segmentedControl];
[self displayViewForSegmentAtIndex:[self.segmentedControl selectedSegmentIndex]];

// Add Feed and Flush navigation bar items
if (self.hasFeedAndFlushButtons) {
self.modalFeedViewController = [[ABKNewsFeedViewController alloc] init];

self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"newsfeed"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(newsfeedButtonTapped:)];
// Add Flush navigation bar item
if (self.hasFlushButton) {
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"appboy"]
style:UIBarButtonItemStylePlain
target:self
Expand Down Expand Up @@ -89,11 +83,6 @@ - (IBAction)changeViewController:(id)sender {
[self displayViewForSegmentAtIndex:[sender selectedSegmentIndex]];
}

// Open up modal news feed view controller when feed button is tapped
- (IBAction)newsfeedButtonTapped:(id)sender {
[self presentViewController:self.modalFeedViewController animated:YES completion:nil];
}

- (IBAction)flushDataToAppboy:(id)sender {
[[Appboy sharedInstance] flushDataAndProcessRequestQueue];
}
Expand Down
Loading

0 comments on commit 714bdf8

Please sign in to comment.