Skip to content

Commit

Permalink
Updating Braze SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
lowip committed Apr 5, 2021
1 parent aa3310e commit acfec24
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 17 deletions.
3 changes: 2 additions & 1 deletion AppboyKit/include/ABKContentCard.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ NS_ASSUME_NONNULL_BEGIN

/*!
* Manually dismiss a card.
* It can be done only if the card is dismissable.
* Sets the card's `dismissed` property to YES and logs the dismissal to Braze.
* Only has effect if the card is dismissible and if the `dismissed` property is currently set to NO.
*/
- (void)logContentCardDismissed;

Expand Down
2 changes: 1 addition & 1 deletion AppboyKit/include/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 @"4.0.1"
#define APPBOY_SDK_VERSION @"4.0.2"
#endif

#if !TARGET_OS_TV
Expand Down
Binary file modified AppboyPushStory/Resources/ABKPageView.nib
Binary file not shown.
11 changes: 6 additions & 5 deletions AppboyUI/ABKUIUtils/ABKUIUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
static NSUInteger const iPhone12Mini = 2340.0;

// Bundles
static NSString * const ABKUISPMBundleName = @"Appboy_iOS_SDK_AppboyUI.bundle";
static NSString * const ABKUIPodCCBundleName = @"AppboyUI.ContentCards.bundle";
static NSString * const ABKUIPodIAMBundleName = @"AppboyUI.InAppMessage.bundle";
static NSString * const ABKUIPodNFBundleName = @"AppboyUI.NewsFeed.bundle";
Expand All @@ -22,13 +21,15 @@ @implementation ABKUIUtils

+ (NSBundle *)bundle:(Class)bundleClass channel:(ABKChannel)channel {
NSBundle *bundle;

// SPM
bundle = [self bundleForName:ABKUISPMBundleName class:bundleClass];
#if SWIFT_PACKAGE
bundle = SWIFTPM_MODULE_BUNDLE;
if (bundle != nil) {
return bundle;
}

#endif

// Cocoapods
switch (channel) {
case ABKContentCardChannel:
Expand Down Expand Up @@ -61,7 +62,7 @@ + (nullable NSBundle *)bundleForName:(NSString *)name class:(Class)bundleClass {
if ([bundleURL checkResourceIsReachableAndReturnError:nil]) {
return [NSBundle bundleWithURL:bundleURL];
}

return nil;
}

Expand Down
24 changes: 18 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 4.0.2

##### Fixed
- Fixes a double redirection bug in Push Stories when the app is in a terminated state and `application:didReceiveRemoteNotification:fetchCompletionHandler:` is not implemented.

##### Changed
- Improves the Swift Package Manager bundle lookup to be more flexible.

##### Added
- Adds support to use a dictionary named `Braze` instead of `Appboy` when adding customization in the `Info.plist`. After adding the `Braze` dictionary, please remove the previous `Appboy` dictionary.

## 4.0.1

##### Fixed
Expand Down Expand Up @@ -50,12 +61,13 @@
- In your application target:
- Delete the `Copy File` build phase copying the `AppboyPushStory.framework` to the `Frameworks` destination.
- Delete the `Run Script` build phase that starts with:
```
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
find "$APP_PATH" -name 'AppboyPushStory.framework' -type d | while read -r FRAMEWORK
...
```
```
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
find "$APP_PATH" -name 'AppboyPushStory.framework' -type d | while read -r FRAMEWORK
...
```
- Removed `ABKSDWebImageProxy`'s `prefetchURLs:` method.
##### Fixed
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.0.1/AppboyKitLibrary.xcframework.zip",
checksum: "4d8dcb10bc76e9a36a54528a2a8be754f22542d130bc5505b1a42019f057e015"
url: "https://github.com/Appboy/appboy-ios-sdk/releases/download/4.0.2/AppboyKitLibrary.xcframework.zip",
checksum: "58a080e56eaeea125e2c363db5941025f9d5a31243862fc83943ec62e7e74025"
),
.target(
name: "AppboyKit",
Expand Down Expand Up @@ -55,8 +55,8 @@ let package = Package(
),
.binaryTarget(
name: "AppboyPushStoryFramework",
url: "https://github.com/Appboy/appboy-ios-sdk/releases/download/4.0.1/AppboyPushStoryFramework.xcframework.zip",
checksum: "969753b943cf1eede0f33bc262c587602b2fb80317f352a8d7f71398adc8768b"
url: "https://github.com/Appboy/appboy-ios-sdk/releases/download/4.0.2/AppboyPushStoryFramework.xcframework.zip",
checksum: "eb9f44c78590d4a1d2830162065977112c8021823b7ec448a32baa9b88f1c8d5"
),
.target(
name: "AppboyPushStory",
Expand Down

0 comments on commit acfec24

Please sign in to comment.