Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with handlePushNotification #1389

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BranchSDK.podspec
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Options:
USAGE
}

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

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