Skip to content

Commit

Permalink
Merge pull request #1389 from BranchMetrics/SDK-2387
Browse files Browse the repository at this point in the history
Fix issue with handlePushNotification
  • Loading branch information
echo-branch committed Apr 23, 2024
2 parents 02c0bbd + 603eb52 commit 773ab3c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion BranchSDK.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "BranchSDK"
s.version = "3.4.2"
s.version = "3.4.3"
s.summary = "Create an HTTP URL for any piece of content in your app"
s.description = <<-DESC
- Want the highest possible conversions on your sharing feature?
Expand Down
12 changes: 6 additions & 6 deletions BranchSDK.xcodeproj/project.pbxproj
Expand Up @@ -1974,7 +1974,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
OTHER_LDFLAGS = (
"-weak_framework",
LinkPresentation,
Expand Down Expand Up @@ -2009,7 +2009,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
OTHER_LDFLAGS = (
"-weak_framework",
LinkPresentation,
Expand Down Expand Up @@ -2215,7 +2215,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
OTHER_LDFLAGS = (
"-weak_framework",
LinkPresentation,
Expand Down Expand Up @@ -2254,7 +2254,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
OTHER_LDFLAGS = (
"-weak_framework",
LinkPresentation,
Expand Down Expand Up @@ -2291,7 +2291,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
OTHER_LDFLAGS = (
"-weak_framework",
LinkPresentation,
Expand Down Expand Up @@ -2326,7 +2326,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
OTHER_LDFLAGS = (
"-weak_framework",
LinkPresentation,
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog.md
@@ -1,5 +1,8 @@
Branch iOS SDK Change Log

v.3.4.3
- Fix push notifications when app is backgrounded and the app uses `handlePushNotification` instead of `handleDeeplink`

v.3.4.2
- Fix tvOS when using SPM

Expand Down
2 changes: 1 addition & 1 deletion Sources/BranchSDK/BNCConfig.m
Expand Up @@ -8,7 +8,7 @@

#include "BNCConfig.h"

NSString * const BNC_SDK_VERSION = @"3.4.2";
NSString * const BNC_SDK_VERSION = @"3.4.3";
NSString * const BNC_LINK_URL = @"https://bnc.lt";
NSString * const BNC_CDN_URL = @"https://cdn.branch.io";

Expand Down
7 changes: 2 additions & 5 deletions Sources/BranchSDK/Branch.m
Expand Up @@ -839,11 +839,8 @@ + (BOOL)isBranchLink:(NSString *)urlString {

- (void)handlePushNotification:(NSDictionary *)userInfo {
NSString *urlStr = [userInfo objectForKey:BRANCH_PUSH_NOTIFICATION_PAYLOAD_KEY];

// If app is active, then close out the session and start a new one.
// Else the URL will be handled by `applicationDidBecomeActive`.
Class UIApplicationClass = NSClassFromString(@"UIApplication");
if (urlStr && [[UIApplicationClass sharedApplication] applicationState] == UIApplicationStateActive) {

if (urlStr.length) {
NSURL *url = [NSURL URLWithString:urlStr];
if (url) {
[self handleDeepLink:url sceneIdentifier:nil];
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.sh
Expand Up @@ -30,7 +30,7 @@ Options:
USAGE
}

version=3.4.2
version=3.4.3
prev_version="$version"

if (( $# == 0 )); then
Expand Down

0 comments on commit 773ab3c

Please sign in to comment.