Skip to content

Commit

Permalink
Updating Braze SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
hokstuff committed Jun 21, 2022
1 parent 4c5fa9b commit 26f8ca6
Show file tree
Hide file tree
Showing 25 changed files with 128 additions and 27 deletions.
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 = "4.4.3"
s.version = "4.4.4"
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
2 changes: 1 addition & 1 deletion Appboy-tvOS-SDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Appboy-tvOS-SDK"
s.version = "4.4.3"
s.version = "4.4.4"
s.summary = "This is the Braze tvOS 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 Appboy-tvOS-SDK/AppboyTVOSKit.framework/AppboyTVOSKit
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (copy, nullable) NSString *domain;

/*
* This property is the aspect ratio of the card's image.
* This property is the aspect ratio of the card's image. It is meant to serve as a hint before
* image loading completes. Note that the property may not be supplied in certain circumstances.
*/
@property float imageAspectRatio;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
@property (copy) NSString *image;

/*
* This property is the aspect ratio of the card's image.
* This property is the aspect ratio of the card's image. It is meant to serve as a hint before
* image loading completes. Note that the property may not be supplied in certain circumstances.
*/
@property float imageAspectRatio;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (copy) NSString *image;

/*
* This property is the aspect ratio of the card's image.
* This property is the aspect ratio of the card's image. It is meant to serve as a hint before
* image loading completes. Note that the property may not be supplied in certain circumstances.
*/
@property float imageAspectRatio;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (copy) NSString *image;

/*
* This property is the aspect ratio of the card's image.
* This property is the aspect ratio of the card's image. It is meant to serve as a hint before
* image loading completes. Note that the property may not be supplied in certain circumstances.
*/
@property float imageAspectRatio;

Expand Down
39 changes: 39 additions & 0 deletions Appboy-tvOS-SDK/AppboyTVOSKit.framework/Headers/ABKSdkMetadata.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*!
* Enum representing the accepted SDK Metatadata.
* See addSdkMetadata for more details.
*/
typedef NSString *ABKSdkMetadata NS_TYPED_EXTENSIBLE_ENUM;
extern ABKSdkMetadata const ABKSdkMetadataAdjust;
extern ABKSdkMetadata const ABKSdkMetadataAirBridge;
extern ABKSdkMetadata const ABKSdkMetadataAppsFlyer;
extern ABKSdkMetadata const ABKSdkMetadataBluedot;
extern ABKSdkMetadata const ABKSdkMetadataBranch;
extern ABKSdkMetadata const ABKSdkMetadataCordova;
extern ABKSdkMetadata const ABKSdkMetadataCarthage;
extern ABKSdkMetadata const ABKSdkMetadataCocoaPods;
extern ABKSdkMetadata const ABKSdkMetadataCordovaPM;
extern ABKSdkMetadata const ABKSdkMetadataExpo;
extern ABKSdkMetadata const ABKSdkMetadataFoursquare;
extern ABKSdkMetadata const ABKSdkMetadataFlutter;
extern ABKSdkMetadata const ABKSdkMetadataGoogleTagManager;
extern ABKSdkMetadata const ABKSdkMetadataGimbal;
extern ABKSdkMetadata const ABKSdkMetadataGraddle;
extern ABKSdkMetadata const ABKSdkMetadataIonic;
extern ABKSdkMetadata const ABKSdkMetadataKochava;
extern ABKSdkMetadata const ABKSdkMetadataManual;
extern ABKSdkMetadata const ABKSdkMetadataMParticle;
extern ABKSdkMetadata const ABKSdkMetadataNativeScript;
extern ABKSdkMetadata const ABKSdkMetadataNPM;
extern ABKSdkMetadata const ABKSdkMetadataNuGet;
extern ABKSdkMetadata const ABKSdkMetadataPub;
extern ABKSdkMetadata const ABKSdkMetadataRadar;
extern ABKSdkMetadata const ABKSdkMetadataReactNative;
extern ABKSdkMetadata const ABKSdkMetadataSegment;
extern ABKSdkMetadata const ABKSdkMetadataSingular;
extern ABKSdkMetadata const ABKSdkMetadataSwiftPM;
extern ABKSdkMetadata const ABKSdkMetadataTealium;
extern ABKSdkMetadata const ABKSdkMetadataUnreal;
extern ABKSdkMetadata const ABKSdkMetadataUnityPM;
extern ABKSdkMetadata const ABKSdkMetadataUnity;
extern ABKSdkMetadata const ABKSdkMetadataVizbee;
extern ABKSdkMetadata const ABKSdkMetadataXamarin;
16 changes: 16 additions & 0 deletions Appboy-tvOS-SDK/AppboyTVOSKit.framework/Headers/ABKUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,22 @@ typedef NS_ENUM(NSInteger, ABKNotificationSubscriptionType) {
*/
- (BOOL)setPushNotificationSubscriptionType:(ABKNotificationSubscriptionType)pushNotificationSubscriptionType;

/*!
* Adds the user to a Subscription Group.
*
* @param groupId The string UUID corresponding to the subscription group, provided by the Braze dashboard.
* @return YES if the user was successfully added, else NO. If not, the groupId might have been nil or invalid.
*/
- (BOOL)addToSubscriptionGroupWithGroupId:(NSString *)groupId;

/*!
* Removes the user from a Subscription Group.
*
* @param groupId The string UUID corresponding to the subscription group, provided by the Braze dashboard.
* @return YES if the user was successfully removed, else NO. If not, the groupId might have been nil or invalid.
*/
- (BOOL)removeFromSubscriptionGroupWithGroupId:(NSString *)groupId;

/*!
* @param key The String name of the custom user attribute
* @param value A boolean value to set as a custom attribute
Expand Down
30 changes: 26 additions & 4 deletions Appboy-tvOS-SDK/AppboyTVOSKit.framework/Headers/Appboy.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
#import <UIKit/UIKit.h>
#import <UserNotifications/UserNotifications.h>

#import "ABKSdkMetadata.h"

#ifndef APPBOY_SDK_VERSION
#define APPBOY_SDK_VERSION @"4.3.2"
#define APPBOY_SDK_VERSION @"4.4.4"
#endif

#if !TARGET_OS_TV
Expand Down Expand Up @@ -152,13 +154,24 @@ extern NSString *const ABKDeviceAllowlistKey;
*/
extern NSString *const ABKDeviceWhitelistKey __deprecated_msg("ABKDeviceWhitelistKey is deprecated. Please use ABKDeviceAllowlistKey instead.");

extern NSString *const ABKEphemeralEventsKey;

/*!
* This key can be set to a string value representing the app group name for the Push Story Notification
* Content extension. This is required for the SDK to fetch data from and handle user interactions
* with the Push Story app extension.
*/
extern NSString *const ABKPushStoryAppGroupKey;

/*!
* This key can be set to an integer value to specify the level of the log statements output by the Braze SDK.
*
* The default log level is 8 and will minimally log info. To enable verbose logging for debugging, use log level 0.
*
* This selection will override any LogLevel value set in the Info.plist.
*/
extern NSString *const ABKLogLevelKey;

/* ------------------------------------------------------------------------------------------------------
* Enums
*/
Expand Down Expand Up @@ -268,8 +281,7 @@ typedef NS_ENUM(NSInteger, ABKChannel) {
* @param apiKey The app's API key
* @param application The current app
* @param launchOptions The options NSDictionary that you get from application:didFinishLaunchingWithOptions
* @param appboyOptions An optional NSDictionary with startup configuration values for Braze. This currently supports
* ABKRequestProcessingPolicyOptionKey, ABKSocialAccountAcquisitionPolicyOptionKey and ABKFlushIntervalOptionKey. See below
* @param appboyOptions An optional NSDictionary with startup configuration values for Braze. See below
* for more information.
*
* @discussion Starts up Braze and tells it that your app is done launching. You should call this
Expand Down Expand Up @@ -378,7 +390,8 @@ typedef NS_ENUM(NSInteger, ABKChannel) {
* @param userId The new user's ID (from the host application).
*
* @discussion
* This method changes the user's ID.
* This method changes the user's ID. These user IDs should be private and not easily obtained (e.g. not a plain
* email address or username).
*
* When you first start using Braze on a device, the user is considered "anonymous". You can use this method to
* optionally identify a user with a unique ID, which enables the following:
Expand Down Expand Up @@ -630,6 +643,15 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response

#endif

/*!
* Adds SDK Metadata values to those automatically collected by the SDK.
*
* Metadata tell Braze how the SDK is integrated (e.g. wrapper, package manager, etc.)
*
* @param metadata The metadata values reflecting the current SDK integration.
*/
- (void)addSdkMetadata:(NSArray<ABKSdkMetadata> *)metadata;

/* ------------------------------------------------------------------------------------------------------
* Data processing configuration methods.
*/
Expand Down
Binary file modified Appboy-tvOS-SDK/AppboyTVOSKit.framework/Info.plist
Binary file not shown.
Binary file modified AppboyKit/Appboy.bundle/Info.plist
Binary file not shown.
8 changes: 7 additions & 1 deletion AppboyKit/include/ABKInAppMessageWebViewBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,19 @@ NS_ASSUME_NONNULL_BEGIN
@protocol ABKInAppMessageWebViewBridgeDelegate <NSObject>

/*!
* Tells the delegate the bridge has received a click action to execute
* Tells the delegate that the bridge has received a click action to execute
* @param webViewBridge The bridge informing the delegate
* @param clickAction The clickAction performed
*/
- (void)webViewBridge:(ABKInAppMessageWebViewBridge *)webViewBridge
receivedClickAction:(ABKInAppMessageClickActionType)clickAction;

/*!
* Tells the delegate that a close message action was received
* @param webViewBridge The bridge informing the delegate
*/
- (void)closeMessageWithWebViewBridge:(ABKInAppMessageWebViewBridge *)webViewBridge;

@end

NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletion AppboyKit/include/Appboy.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#import "ABKSdkMetadata.h"

#ifndef APPBOY_SDK_VERSION
#define APPBOY_SDK_VERSION @"4.4.3"
#define APPBOY_SDK_VERSION @"4.4.4"
#endif

#if !TARGET_OS_TV
Expand Down
Binary file modified AppboyPushStory/Resources/ABKPageView.nib
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati
NSLog(@"In-app message body click not registered. Automatic body clicks are disabled.");
}
}

[parentViewController inAppMessageClickedWithActionType:self.inAppMessage.inAppMessageClickActionType
URL:url
openURLInWebView:[self getOpenURLInWebView:queryParams]];
Expand Down Expand Up @@ -417,11 +416,20 @@ - (void)webViewBridge:(ABKInAppMessageWebViewBridge *)webViewBridge
receivedClickAction:(ABKInAppMessageClickActionType)clickAction {
ABKInAppMessageWindowController *parentViewController =
(ABKInAppMessageWindowController *)self.parentViewController;

[self.inAppMessage setInAppMessageClickAction:clickAction withURI:nil];
[parentViewController inAppMessageClickedWithActionType:self.inAppMessage.inAppMessageClickActionType
URL:nil
openURLInWebView:false];
}

- (void)closeMessageWithWebViewBridge:(ABKInAppMessageWebViewBridge *)webViewBridge {
ABKInAppMessageWindowController *parentViewController =
(ABKInAppMessageWindowController *)self.parentViewController;
if ([parentViewController.inAppMessageUIDelegate respondsToSelector:@selector(onInAppMessageDismissed:)]) {
[parentViewController.inAppMessageUIDelegate onInAppMessageDismissed:self.inAppMessage];
}
[super hideInAppMessage:self.inAppMessage.animateOut];
}

@end
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 4.4.4

##### Fixed
- Calling `appboyBridge.closeMessage()` or `brazeBridge.closeMessage()` from an HTML in-app message now correctly triggers `ABKInAppMessageUIDelegate.onInAppMessageDismissed:` when implemented.
- Fixes an issue in `4.4.3` where the tvOS SDK incorrectly referenced an older SDK version.

## 4.4.3

##### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Example/Stopwatch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Apple Development";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 4.4.3;
CURRENT_PROJECT_VERSION = 4.4.4;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand Down Expand Up @@ -1357,7 +1357,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Apple Distribution";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 4.4.3;
CURRENT_PROJECT_VERSION = 4.4.4;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down
2 changes: 1 addition & 1 deletion Example/Stopwatch/Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


<key>CFBundleShortVersionString</key>
<string>4.4.3</string>
<string>4.4.4</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleDevelopmentRegion</key>
Expand Down
4 changes: 2 additions & 2 deletions HelloSwift/HelloSwiftTests/AppboyPushUnitTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* A collection of test cases to verify a successful implementation of push
* notifications using Braze.
* In a unit testing target, as long as the `AppboyPushTests` module is included,
* the target will run all of this class's unit tests. No added code is required.
* In a unit testing target, as long as this file is included,
* the target will run all of this class's unit tests. No additional code is required.
*
* @seealso https://www.braze.com/docs/developer_guide/platform_integration_guides/ios/push_notifications/integration/
*/
Expand Down
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ let package = Package(
targets: [
.binaryTarget(
name: "AppboyKitLibrary",
url: "https://github.com/Appboy/appboy-ios-sdk/releases/download/4.4.3/AppboyKitLibrary.xcframework.zip",
checksum: "66f13ebff3323d7eeccfba4fb67ab2174402a2b021c6b5a28990737316041510"
url: "https://github.com/Appboy/appboy-ios-sdk/releases/download/4.4.4/AppboyKitLibrary.xcframework.zip",
checksum: "bf9170291c7eb894a4d96c0e11bcd6b5de90391795919223e59342df0827064b"
),
.target(
name: "AppboyKit",
Expand Down Expand Up @@ -53,8 +53,8 @@ let package = Package(
),
.binaryTarget(
name: "AppboyPushStoryFramework",
url: "https://github.com/Appboy/appboy-ios-sdk/releases/download/4.4.3/AppboyPushStoryFramework.xcframework.zip",
checksum: "950a16e8d8ad665f92986d4d0af405316ea28b2655228ac798d0f156ca892718"
url: "https://github.com/Appboy/appboy-ios-sdk/releases/download/4.4.4/AppboyPushStoryFramework.xcframework.zip",
checksum: "ce8f7999106a7f14400a18c18037dbc0bc44b925086514835ec86db0f06c839f"
),
.target(
name: "AppboyPushStory",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

</br>

<img src="https://github.com/Appboy/appboy-ios-sdk/blob/master/braze-logo.png" width="300" title="Braze Logo" />
<img src="braze-logo.png" width="300" title="Braze Logo" />

# iOS SDK

Expand Down
Loading

0 comments on commit 26f8ca6

Please sign in to comment.