Skip to content

Commit

Permalink
Release version 1.27.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyorbin committed Mar 5, 2021
1 parent 2e143a4 commit 3d68180
Show file tree
Hide file tree
Showing 13 changed files with 68 additions and 34 deletions.
2 changes: 2 additions & 0 deletions AppboyProject/AppboyProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class AppboyProject extends Component {
Linking.getInitialURL().then((url) => {
if (url) {
console.log('Linking.getInitialURL is ' + url);
this._showToast('Linking.getInitialURL is ' + url);
this._handleOpenUrl({url});
}
}).catch(err => console.error('Error getting initial URL', err));
Expand All @@ -80,6 +81,7 @@ class AppboyProject extends Component {
ReactAppboy.getInitialURL(function(url) {
if (url) {
console.log('ReactAppboy.getInitialURL is ' + url);
that._showToast('ReactAppboy.getInitialURL is ' + url);
that._handleOpenUrl({url});
}
});
Expand Down
4 changes: 2 additions & 2 deletions AppboyProject/ios/AppboyProject.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = AppboyProject/AppboyProject.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer: Appboy Appboy (QWFN3H2ZPW)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Appboy Appboy (QWFN3H2ZPW)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
Expand All @@ -566,7 +566,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.appboy.helloreact;
PRODUCT_NAME = AppboyProject;
PROVISIONING_PROFILE = "45b1f7df-eef1-458b-8139-7ff580e8e80b";
PROVISIONING_PROFILE_SPECIFIER = "match AdHoc com.appboy.helloreact";
PROVISIONING_PROFILE_SPECIFIER = "match Development com.appboy.helloreact";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand Down
11 changes: 4 additions & 7 deletions AppboyProject/ios/AppboyProject/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#import <React/RCTBridge.h>
#import <React/RCTEventDispatcher.h>
#import "AppboyKit.h"
#import "ABKPushUtils.h"
#import "AppboyReactUtils.h"

@implementation AppDelegate
Expand Down Expand Up @@ -44,16 +45,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
NSLog(@"Permission granted.");
[[Appboy sharedInstance] pushAuthorizationFromUserNotificationCenter:granted];
}];
[center setNotificationCategories:[ABKPushUtils getAppboyUNNotificationCategorySet]];
[[UIApplication sharedApplication] registerForRemoteNotifications];
} else if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1) {
} else {
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeAlert | UIUserNotificationTypeSound) categories:nil];
[[UIApplication sharedApplication] registerForRemoteNotifications];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
} else {
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound)];
}

[[AppboyReactUtils sharedInstance] populateInitialUrlFromLaunchOptions:launchOptions];
Expand All @@ -69,6 +66,7 @@ - (void) application:(UIApplication *)application didReceiveRemoteNotification:(
}

- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
[[AppboyReactUtils sharedInstance] populateInitialUrlForCategories:response.notification.request.content.userInfo];
[[Appboy sharedInstance] userNotificationCenter:center didReceiveNotificationResponse:response withCompletionHandler:completionHandler];
}

Expand All @@ -80,7 +78,6 @@ - (void) application:(UIApplication *)application didRegisterForRemoteNotificati
[[Appboy sharedInstance] registerDeviceToken:deviceToken];
}


// Deep linking
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
Expand Down
4 changes: 4 additions & 0 deletions AppboyProject/ios/AppboyProject/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSApplicationCategoryType</key>
<string></string>
<key>CFBundleDisplayName</key>
<string></string>
<key>Appboy</key>
<dict>
<key>LogLevel</key>
Expand Down
2 changes: 1 addition & 1 deletion AppboyProject/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'AppboyProject' do
pod 'Appboy-iOS-SDK', '3.31.2'
pod 'Appboy-iOS-SDK', '3.33.1'

# If you want to integrate through Cocoapods instead of manual linking use this:
# It already comes with a dependency on `Appboy-iOS-SDK` so you're all set. Remember to
Expand Down
39 changes: 19 additions & 20 deletions AppboyProject/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
PODS:
- Appboy-iOS-SDK (3.31.2):
- Appboy-iOS-SDK/UI (= 3.31.2)
- Appboy-iOS-SDK/ContentCards (3.31.2):
- Appboy-iOS-SDK (3.33.1):
- Appboy-iOS-SDK/UI (= 3.33.1)
- Appboy-iOS-SDK/ContentCards (3.33.1):
- Appboy-iOS-SDK/Core
- SDWebImage (< 6, >= 5.8.2)
- Appboy-iOS-SDK/Core (3.31.2)
- Appboy-iOS-SDK/InAppMessage (3.31.2):
- Appboy-iOS-SDK/Core (3.33.1)
- Appboy-iOS-SDK/InAppMessage (3.33.1):
- Appboy-iOS-SDK/Core
- SDWebImage (< 6, >= 5.8.2)
- Appboy-iOS-SDK/NewsFeed (3.31.2):
- Appboy-iOS-SDK/NewsFeed (3.33.1):
- Appboy-iOS-SDK/Core
- SDWebImage (< 6, >= 5.8.2)
- Appboy-iOS-SDK/UI (3.31.2):
- Appboy-iOS-SDK/UI (3.33.1):
- Appboy-iOS-SDK/ContentCards
- Appboy-iOS-SDK/Core
- Appboy-iOS-SDK/InAppMessage
Expand Down Expand Up @@ -199,8 +199,8 @@ PODS:
- React-cxxreact (= 0.61.5)
- React-jsi (= 0.61.5)
- React-jsinspector (0.61.5)
- react-native-appboy-sdk (1.26.0):
- Appboy-iOS-SDK (~> 3.31.2)
- react-native-appboy-sdk (1.27.0):
- Appboy-iOS-SDK (~> 3.33.1)
- React
- React-RCTActionSheet (0.61.5):
- React-Core/RCTActionSheetHeaders (= 0.61.5)
Expand Down Expand Up @@ -237,13 +237,13 @@ PODS:
- React-cxxreact (= 0.61.5)
- React-jsi (= 0.61.5)
- ReactCommon/jscallinvoker (= 0.61.5)
- SDWebImage (5.10.2):
- SDWebImage/Core (= 5.10.2)
- SDWebImage/Core (5.10.2)
- SDWebImage (5.10.4):
- SDWebImage/Core (= 5.10.4)
- SDWebImage/Core (5.10.4)
- Yoga (1.14.0)

DEPENDENCIES:
- Appboy-iOS-SDK (= 3.31.2)
- Appboy-iOS-SDK (= 3.33.1)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
Expand Down Expand Up @@ -275,10 +275,9 @@ DEPENDENCIES:
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- boost-for-react-native
trunk:
- Appboy-iOS-SDK
- boost-for-react-native
- SDWebImage

EXTERNAL SOURCES:
Expand Down Expand Up @@ -336,7 +335,7 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
Appboy-iOS-SDK: a3d61b2dc0a56100f1c10064c1832dfa6c0798fd
Appboy-iOS-SDK: 60abd3c23bcd5c24a624ddaf3adaf166b835a0e0
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
FBLazyVector: aaeaf388755e4f29cd74acbc9e3b8da6d807c37f
Expand All @@ -352,7 +351,7 @@ SPEC CHECKSUMS:
React-jsi: cb2cd74d7ccf4cffb071a46833613edc79cdf8f7
React-jsiexecutor: d5525f9ed5f782fdbacb64b9b01a43a9323d2386
React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
react-native-appboy-sdk: d4bc0faed0c9b25b1cd1a57a4e8974758d5ded4f
react-native-appboy-sdk: db622f8a6e05758c84c0e213852c3c28ab7a8803
React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
React-RCTBlob: d89293cc0236d9cb0933d85e430b0bbe81ad1d72
Expand All @@ -363,9 +362,9 @@ SPEC CHECKSUMS:
React-RCTText: 9ccc88273e9a3aacff5094d2175a605efa854dbe
React-RCTVibration: a49a1f42bf8f5acf1c3e297097517c6b3af377ad
ReactCommon: 198c7c8d3591f975e5431bec1b0b3b581aa1c5dd
SDWebImage: b969dcfc02c40a5da71eac0b03b8f1a0c794a86f
SDWebImage: c666b97e1fa9c64b4909816a903322018f0a9c84
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b

PODFILE CHECKSUM: 2ea1c608094ca868863fd7ce9d8f081e07e4fedc
PODFILE CHECKSUM: cb3887f416b92558735fefae86948126a5af2d3e

COCOAPODS: 1.9.3
COCOAPODS: 1.10.1
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 1.27.0

##### ⚠ Breaking
- Updated the native iOS bridge to [Braze iOS SDK 3.33.1](https://github.com/Appboy/appboy-ios-sdk/blob/master/CHANGELOG.md#3331).
- Updated the native Android bridge to [Braze Android SDK 13.0.0](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#1300).

##### Added
- Added support for receiving iOS push action button deep links in `ReactAppboy.getInitialURL()`. If you are using `ReactAppboy.getInitialURL()` and implement iOS push action button categories, add the following code to the beginning of your `userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:`:
```
[[AppboyReactUtils sharedInstance] populateInitialUrlForCategories:response.notification.request.content.userInfo];
```

## 1.26.0

##### ⚠ Breaking
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ android {
}

dependencies {
api 'com.appboy:android-sdk-ui:12.0.0'
api 'com.appboy:android-sdk-ui:13.0.0'
api 'com.facebook.react:react-native:+'
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (void)reportResultWithCallback:(RCTResponseSenderBlock)callback andError:(NSSt
[Appboy sharedInstance].sdkFlavor = REACT;
}

// Returns the deep link from the push dictionary in application:didFinishLaunchingWithOptions: launchOptions, if one exists
// Returns push deep links from cold app starts.
// For more context see getInitialURL() in index.js
RCT_EXPORT_METHOD(getInitialUrl:(RCTResponseSenderBlock)callback) {
if ([AppboyReactUtils sharedInstance].initialUrlString != nil) {
Expand Down
1 change: 1 addition & 0 deletions iOS/AppboyReactBridge/AppboyReactBridge/AppboyReactUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

+ (AppboyReactUtils *)sharedInstance;
- (BOOL)populateInitialUrlFromLaunchOptions:(NSDictionary *)launchOptions;
- (BOOL)populateInitialUrlForCategories:(NSDictionary *)userInfo;

@property NSString *initialUrlString;

Expand Down
19 changes: 19 additions & 0 deletions iOS/AppboyReactBridge/AppboyReactBridge/AppboyReactUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,23 @@ - (BOOL)populateInitialUrlFromLaunchOptions:(NSDictionary *)launchOptions {
return false;
}

- (BOOL)populateInitialUrlForCategories:(NSDictionary *)userInfo {
// When action buttons are opened, didFinishLaunchingWithOptions's launchOptions are always nil.
if (sharedInstance.initialUrlString) {
NSLog(@"initialUrlString already populated in didFinishLaunchingWithOptions. Doing nothing.");
return false;
}
NSDictionary *categories = [userInfo valueForKeyPath:@"ab.ab_cat"];
if (categories && [categories count] > 0) {
NSDictionary *category = [[categories allValues] objectAtIndex:0];
if (category[@"a_uri"]) {
sharedInstance.initialUrlString = category[@"a_uri"];
RCTLogInfo(@"[AppboyReactUtils sharedInstance].initialUrlString set to %@.", sharedInstance.initialUrlString);
return true;
}
}
sharedInstance.initialUrlString = nil;
return false;
}

@end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-appboy-sdk",
"version": "1.26.0",
"version": "1.27.0",
"description": "Braze SDK for React Native.",
"main": "index.js",
"types": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion react-native-appboy-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Pod::Spec.new do |s|
s.preserve_paths = 'LICENSE.md', 'README.md', 'package.json', 'index.js'
s.source_files = 'iOS/**/*.{h,m}'

s.dependency 'Appboy-iOS-SDK', '~> 3.31.2'
s.dependency 'Appboy-iOS-SDK', '~> 3.33.1'
s.dependency 'React'
end

0 comments on commit 3d68180

Please sign in to comment.