Skip to content

Commit

Permalink
Updating Braze SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
hokstuff committed Mar 5, 2021
1 parent e003b72 commit 3d3b844
Show file tree
Hide file tree
Showing 50 changed files with 482 additions and 505 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,3 @@ xcuserdata/
# Fastlane Autogenerated files
**/fastlane/README.md
**/fastlane/report.xml

# Cocoapod release artifact
Appboy_iOS_SDK.zip
AppboyPushStory.zip
4 changes: 2 additions & 2 deletions 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.33.1"
s.version = "3.34.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 Expand Up @@ -29,7 +29,7 @@ Pod::Spec.new do |s|
sc.source_files = 'AppboyKit/headers/AppboyKitLibrary/*.h', 'AppboyKit/ABKModalWebViewController.m', 'AppboyKit/ABKNoConnectionLocalization.m', 'AppboyKit/ABKLocationManagerProvider.m'
sc.resource_bundle = { 'Appboy' => 'AppboyKit/Appboy.bundle/*.lproj' }
sc.vendored_libraries = 'AppboyKit/libAppboyKitLibrary.a'
sc.weak_framework = 'CoreTelephony', 'Social', 'Accounts', 'AdSupport', 'UserNotifications'
sc.weak_framework = 'CoreTelephony', 'Social', 'Accounts', 'UserNotifications'
end

s.subspec 'UI' do |sui|
Expand Down
2 changes: 1 addition & 1 deletion Appboy-tvOS-SDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.documentation_url = 'https://www.braze.com/docs'
s.tvos.frameworks = 'SystemConfiguration'
s.tvos.weak_framework = 'AdSupport', 'StoreKit'
s.tvos.weak_framework = 'StoreKit'
s.preserve_paths = 'Appboy-tvOS-SDK/AppboyTVOSKit.framework'
s.vendored_frameworks = 'Appboy-tvOS-SDK/AppboyTVOSKit.framework'

Expand Down
Binary file modified AppboyKit/Appboy.bundle/Info.plist
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/*!
* When the content cards are updated, Appboy will post a notification through the NSNotificationCenter.
* When Content Cards are updated, Braze will post a notification through the NSNotificationCenter.
* The name of the notification is the string constant referred to by ABKContentCardsProcessedNotification. The
* userInfo dictionary associated with the notification will has one object, with key the same string
* as ABKContentCardsProcessedIsSuccessfulKey, to indicate whether the update is successful or not.
Expand Down Expand Up @@ -45,7 +45,7 @@ extern NSString *const ABKContentCardsProcessedIsSuccessfulKey;
@property (readonly, getter=getContentCards) NSArray *contentCards;

/*!
* The NSDate object that indicates the last time the contentCards property was updated from Appboy server.
* The NSDate object that indicates the last time the contentCards property was updated from Braze server.
*/
@property (readonly, nullable) NSDate *lastUpdate;

Expand Down
6 changes: 3 additions & 3 deletions AppboyKit/headers/AppboyKitLibrary/ABKFeedController.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/*!
* When the news feed is updated, Appboy will post a notification through the NSNotificationCenter.
* When the news feed is updated, Braze will post a notification through the NSNotificationCenter.
* The name of the notification is the string constant referred to by ABKFeedUpdatedNotification. The
* userInfo dictionary associated with the notification will has one object, with key the same string
* as ABKFeedUpdatedIsSuccessfulKey, to indicate whether the update is successful or not.
Expand Down Expand Up @@ -55,14 +55,14 @@ typedef NS_OPTIONS(NSUInteger, ABKCardCategory) {
@interface ABKFeedController : NSObject

/*!
* The latest cards of Appboy news feed that is saved in memory and disk. Right now the available card types are ABKBannerCard,
* The latest cards of the Braze News Feed saved in memory and disk. Right now the available card types are ABKBannerCard,
* ABKCaptionedImageCard, ABKClassicCard and ABKTextAnnouncementCard. They are all subclasses
* of ABKCard.
*/
@property (readonly, getter=getNewsFeedCards) NSArray *newsFeedCards;

/*!
* The NSDate object that indicates the last time the newsFeedCards property was updated from Appboy server.
* The NSDate object that indicates the last time the newsFeedCards property was updated from the Braze server.
*/
@property (readonly, nullable) NSDate *lastUpdate;

Expand Down
2 changes: 1 addition & 1 deletion 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.33.1"
#define APPBOY_SDK_VERSION @"3.34.0"
#endif

#if !TARGET_OS_TV
Expand Down
Binary file modified AppboyPushStory/Resources/ABKPageView.nib
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,20 @@
@optional

/*!
* Asks the delegate if the Appboy SDK should handle the content card click action.
* Asks the delegate if the Braze SDK should handle the content card click action.
*
* @warning This method might not be called if you overrode handleCardClick:
*
* @param viewController The view controller displaying the content card.
* @param url The content card's url.
* @return YES to let the Appboy SDK handle the click action, NO if you wish to handle the click action
* @return YES to let the Braze SDK handle the click action, NO if you wish to handle the click action
* yourself.
*/
- (BOOL)contentCardTableViewController:(ABKContentCardsTableViewController *)viewController
shouldHandleCardClick:(NSURL *)url;

/*!
* Informs the delegate that the content card click action was handled by the Appboy SDK.
* Informs the delegate that the content card click action was handled by the Braze SDK.
*
* This method is not called if the delegate method `contentCardTableViewController:shouldHandleCardClick:`
* returns NO.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ - (void)awakeFromNib {
self.rootViewBottomConstraint.constant = self.cardSpacing / 2.0;
self.rootViewLeadingConstraint.constant = self.cardSidePadding;
self.rootViewTrailingConstraint.constant = self.cardSidePadding;

self.pinImageView.image = [self.pinImageView.image imageFlippedForRightToLeftLayoutDirection];
}

# pragma mark - Cell UI Configuration
Expand Down
5 changes: 3 additions & 2 deletions AppboyUI/ABKInAppMessage/ABKInAppMessageUIButton.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#import "ABKInAppMessageUIButton.h"
#import "ABKUIUtils.h"

#define DefaultTitleSize UIFontTextStyleSubheadline
static CGFloat const ButtonCornerRadius = 5.0f;
static CGFloat const DefaultTitleSize = 14.0f;
static CGFloat const ButtonTitleSidePadding = 12.0;

@interface ABKInAppMessageUIButton ()
Expand Down Expand Up @@ -35,7 +35,8 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder {
}

- (void)setUp {
self.titleLabel.font = [UIFont boldSystemFontOfSize:DefaultTitleSize];
self.titleLabel.font = [ABKUIUtils preferredFontForTextStyle:DefaultTitleSize weight:UIFontWeightBold];
self.titleLabel.adjustsFontForContentSizeCategory = YES;
self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
self.originalBackgroundColor = self.backgroundColor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down Expand Up @@ -37,13 +38,16 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qMw-Fs-Mb1">
<rect key="frame" x="0.0" y="0.0" width="364" height="56"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" placeholderIntrinsicWidth="280" placeholderIntrinsicHeight="26" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ThZ-Tl-ewt">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" placeholderIntrinsicWidth="280" placeholderIntrinsicHeight="26" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ThZ-Tl-ewt">
<rect key="frame" x="0.0" y="0.0" width="364" height="26"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" staticText="YES" header="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="999" verticalCompressionResistancePriority="1000" placeholderIntrinsicWidth="252" placeholderIntrinsicHeight="20" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i8e-sy-Bhj">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="999" verticalCompressionResistancePriority="1000" placeholderIntrinsicWidth="252" placeholderIntrinsicHeight="20" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i8e-sy-Bhj">
<rect key="frame" x="0.0" y="36" width="364" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.33333333333333331" green="0.33333333333333331" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -77,16 +77,16 @@
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" directionalLockEnabled="YES" bounces="NO" showsHorizontalScrollIndicator="NO" bouncesZoom="NO" translatesAutoresizingMaskIntoConstraints="NO" id="reI-S5-zX0">
<rect key="frame" x="25" y="100" width="240" height="96"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" placeholderIntrinsicWidth="250" placeholderIntrinsicHeight="21" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e6G-Xz-30b">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" placeholderIntrinsicWidth="250" placeholderIntrinsicHeight="21" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e6G-Xz-30b">
<rect key="frame" x="0.0" y="5" width="240" height="21"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" header="YES"/>
<accessibilityTraits key="traits" staticText="YES" header="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" placeholderIntrinsicWidth="250" placeholderIntrinsicHeight="18" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6VM-43-DBI">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" placeholderIntrinsicWidth="250" placeholderIntrinsicHeight="18" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6VM-43-DBI">
<rect key="frame" x="0.0" y="36" width="240" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.33333333333333331" green="0.33333333333333331" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -33,7 +35,7 @@
<constraint firstAttribute="width" constant="50" id="cWT-9H-ccX"/>
</constraints>
</imageView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" placeholderIntrinsicWidth="215" placeholderIntrinsicHeight="50" text="Hello!" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ag0-Xc-EWA" userLabel="Label">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" placeholderIntrinsicWidth="215" placeholderIntrinsicHeight="50" text="Hello!" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ag0-Xc-EWA" userLabel="Label">
<rect key="frame" x="75" y="15" width="195" height="50"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" none="YES"/>
Expand Down Expand Up @@ -88,6 +90,6 @@
</view>
</objects>
<resources>
<image name="arrow.png" width="12" height="20"/>
<image name="arrow.png" width="18" height="30"/>
</resources>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigati
return;
}

// Handle Appboy specific actions
// Handle Braze specific actions
NSDictionary *queryParams = [self queryParameterDictionaryFromURL:url];
NSString *buttonId = [self parseButtonIdFromQueryParams:queryParams];
ABKInAppMessageWindowController *parentViewController =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#import "ABKInAppMessageUIButton.h"

// Customize this to set the font for the in-app message header.
#define HeaderLabelDefaultFont [UIFont boldSystemFontOfSize:20.0]
#define HeaderLabelDefaultFont [ABKUIUtils preferredFontForTextStyle:UIFontTextStyleTitle3 weight:UIFontWeightBold]

NS_ASSUME_NONNULL_BEGIN
@interface ABKInAppMessageImmersiveViewController : ABKInAppMessageViewController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (weak, nonatomic, nullable) IBOutlet UIImageView *arrowImage;

/*!
* The constraint which controls the slideup in-app message animate in and out of the screen.
* The offset which controls the slideup in-app message vertical position once visible.
*/
@property (weak, nonatomic, nullable) IBOutlet NSLayoutConstraint *slideConstraint;
@property (assign, nonatomic) CGFloat offset;

@end
NS_ASSUME_NONNULL_END
Loading

0 comments on commit 3d3b844

Please sign in to comment.