Skip to content
Open
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 Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import "BNCSystemObserver.h"
#import "BNCConfig.h"
#import "BranchConstants.h"
#import "Branch.h"
@import BranchSDK;

@interface BNCAPIServerTest : XCTestCase

Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-SDK-Tests/BNCODMTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <XCTest/XCTest.h>
#import "Branch.h"
@import BranchSDK;
#import "BNCPreferenceHelper.h"
#import "BNCRequestFactory.h"
#import "BNCEncodingUtils.h"
Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-SDK-Tests/BNCPasteboardTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <XCTest/XCTest.h>
#import "BNCPasteboard.h"
#import "Branch.h"
@import BranchSDK;

@interface BNCPasteboardTests : XCTestCase

Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <XCTest/XCTest.h>
#import "BNCPreferenceHelper.h"
#import "BNCEncodingUtils.h"
#import "Branch.h"
@import BranchSDK;
#import "BNCConfig.h"

@interface BNCPreferenceHelper()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// Module headers for Branch SDK unit testing.
//

#import "Branch.h"
@import BranchSDK;
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-SDK-Tests/BranchActivityItemTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <XCTest/XCTest.h>
#import "Branch.h"
@import BranchSDK;

@interface BranchActivityItemTests: XCTestCase
@end
Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-SDK-Tests/BranchClassTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <XCTest/XCTest.h>
#import "Branch.h"
@import BranchSDK;
#import "BranchConstants.h"
#import "BNCPasteboard.h"
#import "BNCAppGroupsData.h"
Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-SDK-Tests/BranchLoggerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <XCTest/XCTest.h>
#import "BranchLogger.h"
#import "Branch.h"
@import BranchSDK;

@interface BranchLoggerTests : XCTestCase

Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-SDK-Tests/BranchQRCodeTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <XCTest/XCTest.h>
#import "Branch.h"
@import BranchSDK;
#import "BranchQRCode.h"
#import "BNCQRCodeCache.h"

Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-SDK-Tests/BranchShareLinkTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <XCTest/XCTest.h>
#import "BranchShareLink.h"
#import "BranchLinkProperties.h"
#import "Branch.h"
@import BranchSDK;

@interface BranchShareLinkTests : XCTestCase

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <XCTest/XCTest.h>
// #import "Branch.h"
// @import BranchSDK;

@interface DispatchToIsolationQueueTests : XCTestCase
// @property (nonatomic, strong, readwrite) Branch *branch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <XCTest/XCTest.h>
#import "Branch.h"
@import BranchSDK;
#import "NSError+Branch.h"

// expose private methods used by tests
Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-TestBed-UITests/UITestCaseMisc.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "UITestCaseTestBed.h"
#import "Branch.h"
@import BranchSDK;
#import "BranchEvent.h"

@interface UITestCaseMisc : UITestCaseTestBed
Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-TestBed-UITests/UITestCaseTracking.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "UITestCaseTestBed.h"
#import "Branch.h"
@import BranchSDK;
#import "BranchEvent.h"

@interface UITestCaseTracking : UITestCaseTestBed
Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-TestBed-UITests/UITestSendV2Event.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <XCTest/XCTest.h>
#import "Branch.h"
@import BranchSDK;
#import "BranchEvent.h"
#import "UITestCaseTestBed.h"

Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-TestBed-UITests/UITestSetIdentity.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


#import <XCTest/XCTest.h>
#import "Branch.h"
@import BranchSDK;
#import "BranchEvent.h"
#import "UITestCaseTestBed.h"

Expand Down
663 changes: 274 additions & 389 deletions Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1630"
version = "1.8">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -123,6 +123,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7E6B3B501AA42D0E005F45BF"
BuildableName = "Branch-SDK-Tests.xctest"
BlueprintName = "Branch-SDK-Tests"
ReferencedContainer = "container:Branch-TestBed.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1630"
version = "1.8">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1630"
version = "1.8">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
LastUpgradeVersion = "1630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "466B58371B17773000A69EDE"
BuildableName = "libBranch.a"
BuildableName = "Branch"
BlueprintName = "Branch"
ReferencedContainer = "container:Branch-TestBed.xcodeproj">
</BuildableReference>
Expand All @@ -34,7 +34,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "466B58371B17773000A69EDE"
BuildableName = "libBranch.a"
BuildableName = "Branch"
BlueprintName = "Branch"
ReferencedContainer = "container:Branch-TestBed.xcodeproj">
</BuildableReference>
Expand Down Expand Up @@ -83,7 +83,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "466B58371B17773000A69EDE"
BuildableName = "libBranch.a"
BuildableName = "Branch"
BlueprintName = "Branch"
ReferencedContainer = "container:Branch-TestBed.xcodeproj">
</BuildableReference>
Expand All @@ -99,7 +99,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "466B58371B17773000A69EDE"
BuildableName = "libBranch.a"
BuildableName = "Branch"
BlueprintName = "Branch"
ReferencedContainer = "container:Branch-TestBed.xcodeproj">
</BuildableReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1620"
LastUpgradeVersion = "1630"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
69 changes: 65 additions & 4 deletions Branch-TestBed/Branch-TestBed/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
#import "LogOutputViewController.h"
#import "NavigationController.h"
#import "ViewController.h"
#import "Branch.h"
#import "BNCEncodingUtils.h"
#import "BranchEvent.h"
@import BranchSDK;

AppDelegate* appDelegate = nil;
void APPLogHookFunction(NSDate*_Nonnull timestamp, BranchLogLevel level, NSString*_Nullable message);
Expand Down Expand Up @@ -71,7 +69,70 @@ - (BOOL)application:(UIApplication *)application
//[branch addFacebookPartnerParameterWithName:@"em" value:@"11234e56af071e9c79927651156bd7a10bca8ac34672aba121056e2698ee7088"];

[branch checkPasteboardOnInstall];


// ========================================
// 🔍 VERIFICATION: Swift Concurrency Active?
// ========================================
// Try SPM module name first (BranchSwiftSDK), then fallback to BranchSDK
Class swiftOperationClass = NSClassFromString(@"BranchSwiftSDK.BranchRequestOperation");
Class swiftQueueClass = NSClassFromString(@"BranchSwiftSDK.BranchRequestQueue");

// Fallback to BranchSDK namespace (for non-SPM builds)
if (!swiftOperationClass) {
swiftOperationClass = NSClassFromString(@"BranchSDK.BranchRequestOperation");
}
if (!swiftQueueClass) {
swiftQueueClass = NSClassFromString(@"BranchSDK.BranchRequestQueue");
}

if (swiftOperationClass && swiftQueueClass) {
NSLog(@"");
NSLog(@"🎉 ================================================");
NSLog(@" ✅ SWIFT CONCURRENCY IS ACTIVE!");
NSLog(@"================================================");
NSLog(@"✅ BranchRequestOperation (Swift): FOUND");
NSLog(@"✅ BranchRequestQueue (Swift): FOUND");
NSLog(@"🚀 Using modern async/await patterns");
NSLog(@"🧵 Thread safety via Swift Actor");
NSLog(@"📊 Architecture mirroring Android Kotlin Coroutines");
NSLog(@"================================================");
NSLog(@"");
} else {
NSLog(@"");
NSLog(@"⚠️ ================================================");
NSLog(@" ❌ SWIFT CONCURRENCY NOT ACTIVE");
NSLog(@"================================================");
if (!swiftOperationClass) {
NSLog(@"❌ BranchRequestOperation (Swift): NOT FOUND");
NSLog(@" Tried: BranchSwiftSDK.BranchRequestOperation");
NSLog(@" Tried: BranchSDK.BranchRequestOperation");
}
if (!swiftQueueClass) {
NSLog(@"❌ BranchRequestQueue (Swift): NOT FOUND");
NSLog(@" Tried: BranchSwiftSDK.BranchRequestQueue");
NSLog(@" Tried: BranchSDK.BranchRequestQueue");
}
NSLog(@"⚠️ Using legacy Objective-C implementation");
NSLog(@"💡 Make sure BranchSDK package is properly linked");
NSLog(@"================================================");
NSLog(@"");
}

// Additional verification: Try to get shared instance
if (swiftQueueClass) {
SEL sharedSelector = NSSelectorFromString(@"shared");
if ([swiftQueueClass respondsToSelector:sharedSelector]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
id sharedQueue = [swiftQueueClass performSelector:sharedSelector];
if (sharedQueue) {
NSLog(@"✅ BranchRequestQueue.shared: Accessible via runtime");
}
#pragma clang diagnostic pop
}
}


/*
* Required: Initialize Branch, passing a deep link handler block:
*/
Expand Down
2 changes: 1 addition & 1 deletion Branch-TestBed/Branch-TestBed/NavigationController.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Branch Metrics. All rights reserved.
//

#import "Branch.h"
@import BranchSDK;

@interface NavigationController : UINavigationController <BranchDeepLinkingController>
@end
4 changes: 1 addition & 3 deletions Branch-TestBed/Branch-TestBed/PasteControlViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
//

#import "PasteControlViewController.h"
#import "Branch.h"
#import "BranchOpenRequest.h"
#import "BranchPasteControl.h"
@import BranchSDK;
#import "LogOutputViewController.h"
#import "AppDelegate.h"

Expand Down
9 changes: 2 additions & 7 deletions Branch-TestBed/Branch-TestBed/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@
// Copyright (c) 2014 Branch Metrics. All rights reserved.
//

#import "Branch.h"
#import "BranchEvent.h"
#import "BranchQRCode.h"
#import "BranchConstants.h"
#import "BNCConfig.h"
@import BranchSDK;
#import "BNCConfig.h" // For BNC_SDK_VERSION
#import "ViewController.h"
#import "LogOutputViewController.h"
#import "ArrayPickerView.h"
#import "BranchUniversalObject.h"
#import "BranchLinkProperties.h"
#import "LogOutputViewController.h"
#import "AppDelegate.h"
#import <LinkPresentation/LinkPresentation.h>
Expand Down
Loading
Loading