diff --git a/.github/workflows/automation-trigger-test.yml b/.github/workflows/automation-trigger-test.yml index 43eb7e22b..4ffaa4ed0 100644 --- a/.github/workflows/automation-trigger-test.yml +++ b/.github/workflows/automation-trigger-test.yml @@ -77,7 +77,7 @@ jobs: distribution: 'temurin' cache: maven - name: Setup Node.js environment - uses: actions/setup-node@v4.0.3 + uses: actions/setup-node@v4.2.0 - name: Build with Maven id: build_maven run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ccdd0ebe..ba664551d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,6 +100,27 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 + - name: Install the Apple certificate + env: + BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: | + # create variables + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 + KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + + # import certificate + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH + + # create temporary keychain + security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + + # import certificate to keychain + security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH - name: Build xcframework run: | ./scripts/prep_xcframework_noidfa.sh @@ -110,7 +131,7 @@ jobs: path: | ./Branch_noidfa.zip ./checksum_noidfa.txt - ./Branch_noidfa_signed_xcframework + ./Branch_noidfa_signed_xcframework.zip ./checksum_noidfa_signed_xcframework.txt build-static-framework: @@ -177,7 +198,7 @@ jobs: bundle config set --local path vendor bundle check || bundle install - name: Download build artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 - name: Publish to CocoaPods run: | # TODO: Authenticate using repo secret diff --git a/.gitignore b/.gitignore index 041577f4e..ead61c614 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,8 @@ # Mac + +.build +.vscode + .DS_Store .LSOverride diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m b/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m index 28bb3b3b3..728d41d36 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m @@ -11,7 +11,7 @@ #import "BNCSystemObserver.h" #import "BNCConfig.h" #import "BranchConstants.h" -#import "Branch.h" +@import BranchSDK; @interface BNCAPIServerTest : XCTestCase @@ -450,7 +450,7 @@ - (void)testSetSafeTrackServiceURLWithUserTrackingDomain { XCTAssertEqualObjects(storedUrl, expectedUrl); storedUrl = [[BNCServerAPI sharedInstance] validationServiceURL]; - expectedUrl = @"https://links.toTestDomain.com/v1/app-link-settings"; + expectedUrl = @"https://api3.branch.io/v1/app-link-settings"; XCTAssertEqualObjects(storedUrl, expectedUrl); [BNCServerAPI sharedInstance].useTrackingDomain = NO; @@ -501,7 +501,7 @@ - (void)testSetSafeTrackServiceURLWithOutUserTrackingDomain { XCTAssertEqualObjects(storedUrl, expectedUrl); storedUrl = [[BNCServerAPI sharedInstance] validationServiceURL]; - expectedUrl = @"https://links.toTestDomain.com/v1/app-link-settings"; + expectedUrl = @"https://api3.branch.io/v1/app-link-settings"; XCTAssertEqualObjects(storedUrl, expectedUrl); [BNCServerAPI sharedInstance].useTrackingDomain = NO; diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m deleted file mode 100644 index faff0ef96..000000000 --- a/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// BNCAppleReceiptTests.m -// Branch-SDK-Tests -// -// Created by Ernest Cho on 7/15/19. -// Copyright © 2019 Branch, Inc. All rights reserved. -// - -#import -#import "BNCAppleReceipt.h" - -@interface BNCAppleReceiptTests : XCTestCase - -@end - -@implementation BNCAppleReceiptTests - -- (void)setUp { - -} - -- (void)tearDown { - -} - -- (void)testReceiptOnSimulator { - BNCAppleReceipt *receipt = [[BNCAppleReceipt alloc] init]; - // Appears the simulator can have a receipt - //XCTAssertNil([receipt installReceipt]); - XCTAssertFalse([receipt isTestFlight]); -} - -@end diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCODMTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCODMTests.m index 38d1b0cc2..15d4cabbb 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCODMTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCODMTests.m @@ -7,7 +7,7 @@ // #import -#import "Branch.h" +@import BranchSDK; #import "BNCPreferenceHelper.h" #import "BNCRequestFactory.h" #import "BNCEncodingUtils.h" @@ -65,7 +65,7 @@ - (void)testSetODMandSDKRequests { } - (void)testODMTimeOut { - + NSString* requestUUID = [[NSUUID UUID ] UUIDString]; NSNumber* requestCreationTimeStamp = BNCWireFormatFromDate([NSDate date]); NSString *odm = @"testODMString"; @@ -80,21 +80,23 @@ - (void)testODMTimeOut { sleep(10); - NSDictionary *jsonOpen = [factory dataForOpenWithURLString:@"https://branch.io"]; + BNCRequestFactory *factory2 = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd" UUID:requestUUID TimeStamp:requestCreationTimeStamp]; + NSDictionary *jsonOpen = [factory2 dataForOpenWithURLString:@"https://branch.io"]; XCTAssertTrue(![odm isEqualToString:[jsonOpen objectForKey:@"odm_info"]]); self.prefHelper.odmInfo = nil; self.prefHelper.odmInfoInitDate = nil; - + } - (void) testODMAPIsNotLoaded { + XCTestExpectation *expectation = [self expectationWithDescription:@"Check if ODCManager class is loaded."]; - [[BNCODMInfoCollector instance ] loadODMInfoWithTimeOut:DISPATCH_TIME_FOREVER andCompletionHandler:^(NSString * _Nullable odmInfo, NSError * _Nullable error) { - if (error.code == BNCClassNotFoundError){ - [expectation fulfill]; - } + [[BNCODMInfoCollector instance ] loadODMInfoWithCompletionHandler:^(NSString * _Nullable odmInfo, NSError * _Nullable error) { + if (error.code == BNCClassNotFoundError){ + [expectation fulfill]; + } }]; [self waitForExpectationsWithTimeout:15 handler:nil]; } diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCPasteboardTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCPasteboardTests.m index b850ef0cd..0e2cd06bf 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCPasteboardTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCPasteboardTests.m @@ -8,7 +8,7 @@ #import #import "BNCPasteboard.h" -#import "Branch.h" +@import BranchSDK; @interface BNCPasteboardTests : XCTestCase diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m index 5269501b3..c3779cf6e 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m @@ -9,7 +9,7 @@ #import #import "BNCPreferenceHelper.h" #import "BNCEncodingUtils.h" -#import "Branch.h" +@import BranchSDK; #import "BNCConfig.h" @interface BNCPreferenceHelper() @@ -414,4 +414,27 @@ - (void)testSaveContentAnalyticsManifest { XCTAssertEqualObjects(retrievedManifest, dummyManifest); } +- (void)testThirdPartyAPIsTimeoutDefaultValue { + XCTAssertEqual(self.prefHelper.thirdPartyAPIsWaitTime, 0.5, + @"Default third party APIs timeout should be 0.5 seconds"); +} + +- (void)testThirdPartyAPIsTimeoutSetterGetter { + NSTimeInterval testTimeout1 = 1.0; + self.prefHelper.thirdPartyAPIsWaitTime = testTimeout1; + XCTAssertEqual(self.prefHelper.thirdPartyAPIsWaitTime, testTimeout1, + @"Third party APIs timeout should be settable and retrievable"); + + NSTimeInterval testTimeout2 = 2.5; + self.prefHelper.thirdPartyAPIsWaitTime = testTimeout2; + XCTAssertEqual(self.prefHelper.thirdPartyAPIsWaitTime, testTimeout2, + @"Third party APIs timeout should be updatable"); + + NSTimeInterval testTimeout3 = 0.1; + self.prefHelper.thirdPartyAPIsWaitTime = testTimeout3; + XCTAssertEqual(self.prefHelper.thirdPartyAPIsWaitTime, testTimeout3, + @"Third party APIs timeout should support small values"); +} + + @end diff --git a/Branch-TestBed/Branch-SDK-Tests/Branch-SDK-Tests-Bridging-Header.h b/Branch-TestBed/Branch-SDK-Tests/Branch-SDK-Tests-Bridging-Header.h index 169bd50f3..e1b9477b6 100644 --- a/Branch-TestBed/Branch-SDK-Tests/Branch-SDK-Tests-Bridging-Header.h +++ b/Branch-TestBed/Branch-SDK-Tests/Branch-SDK-Tests-Bridging-Header.h @@ -2,4 +2,4 @@ // Module headers for Branch SDK unit testing. // -#import "Branch.h" +@import BranchSDK; diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchActivityItemTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchActivityItemTests.m index f117859f7..0dbd515f6 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchActivityItemTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchActivityItemTests.m @@ -7,7 +7,7 @@ // #import -#import "Branch.h" +@import BranchSDK; @interface BranchActivityItemTests: XCTestCase @end diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchClassTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchClassTests.m index d1e7713f1..7be097c3d 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchClassTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchClassTests.m @@ -7,7 +7,7 @@ // #import -#import "Branch.h" +@import BranchSDK; #import "BranchConstants.h" #import "BNCPasteboard.h" #import "BNCAppGroupsData.h" @@ -20,6 +20,7 @@ - (void)writeObjectToDefaults:(NSString *)key value:(NSObject *)value; @interface BranchClassTests : XCTestCase @property (nonatomic, strong) Branch *branch; +@property (nonatomic, strong, readwrite) BNCPreferenceHelper *prefHelper; @end @implementation BranchClassTests @@ -27,6 +28,7 @@ @implementation BranchClassTests - (void)setUp { [super setUp]; self.branch = [Branch getInstance]; + self.prefHelper = [BNCPreferenceHelper sharedInstance]; } - (void)tearDown { @@ -261,5 +263,197 @@ - (void)testSetConsumerProtectionAttributionLevel { } +- (void)testBranchSetSDKWaitTimeForThirdPartyAPIs { + // Test Branch instance method for setting timeout + NSTimeInterval testTimeout = 2.0; + [Branch setSDKWaitTimeForThirdPartyAPIs:testTimeout]; + + // Verify it was set in the preference helper + XCTAssertEqual(self.prefHelper.thirdPartyAPIsWaitTime, testTimeout, + @"Branch setSDKWaitTimeForThirdPartyAPIs should update preference helper"); +} + +- (void)testBranchSetSDKWaitTimeForThirdPartyAPIsMultipleValues { + // Test setting multiple different values + NSArray *testValues = @[@0.5, @1.0, @1.5, @3.0, @5.0]; + + for (NSNumber *timeoutValue in testValues) { + NSTimeInterval timeout = [timeoutValue doubleValue]; + [Branch setSDKWaitTimeForThirdPartyAPIs:timeout]; + + XCTAssertEqual(self.prefHelper.thirdPartyAPIsWaitTime, timeout, + @"Branch setSDKWaitTimeForThirdPartyAPIs should handle value %.1f", timeout); + } +} + +- (void)testTimeoutIntegrationWithPreferenceHelper { + // Test that Branch and PreferenceHelper work together correctly + NSTimeInterval branchTimeout = 1.8; + NSTimeInterval directTimeout = 2.3; + + // Set via Branch + [Branch setSDKWaitTimeForThirdPartyAPIs:branchTimeout]; + XCTAssertEqual(self.prefHelper.thirdPartyAPIsWaitTime, branchTimeout, + @"Wait Time set via Branch should be readable from PreferenceHelper"); + + // Set directly on PreferenceHelper + self.prefHelper.thirdPartyAPIsWaitTime = directTimeout; + XCTAssertEqual(self.prefHelper.thirdPartyAPIsWaitTime, directTimeout, + @"Wait time set directly should be readable via Branch"); +} + +- (void)testTimeoutValueConsistency { + // Test that the same instance maintains consistent values + NSTimeInterval testTimeout = 1.25; + + [Branch setSDKWaitTimeForThirdPartyAPIs:testTimeout]; + + // Read multiple times to ensure consistency + for (int i = 0; i < 5; i++) { + XCTAssertEqual(self.prefHelper.thirdPartyAPIsWaitTime, testTimeout, + @"Timeout value should remain consistent across multiple reads"); + } +} + +- (void)testBranchSetSDKWaitTimeForThirdPartyAPIsInvalidLowValues { + + NSArray *invalidLowValues = @[@0.0, @-1.0, @-0.5]; + NSTimeInterval originalTimeout = [BNCPreferenceHelper sharedInstance].thirdPartyAPIsWaitTime; + + for (NSNumber *timeoutValue in invalidLowValues) { + NSTimeInterval timeout = [timeoutValue doubleValue]; + [Branch setSDKWaitTimeForThirdPartyAPIs:timeout]; + XCTAssertEqual([BNCPreferenceHelper sharedInstance].thirdPartyAPIsWaitTime, originalTimeout, + @"Branch setSDKWaitTimeForThirdPartyAPIs should reject invalid low value %.3f", timeout); + } +} + +- (void)testBranchsetSDKWaitTimeForThirdPartyAPIsInvalidHighValues { + + NSArray *invalidHighValues = @[@10.1, @15.0, @30.0, @60.0]; + NSTimeInterval originalTimeout = [BNCPreferenceHelper sharedInstance].thirdPartyAPIsWaitTime; + + for (NSNumber *timeoutValue in invalidHighValues) { + NSTimeInterval timeout = [timeoutValue doubleValue]; + [Branch setSDKWaitTimeForThirdPartyAPIs:timeout]; + XCTAssertEqual([BNCPreferenceHelper sharedInstance].thirdPartyAPIsWaitTime, originalTimeout, + @"Branch setSDKWaitTimeForThirdPartyAPIs should reject invalid high value %.3f", timeout); + } +} + +- (void)testBranchSetSDKWaitTimeForThirdPartyAPIsBoundaryValues { + + // Test exactly 10.0 (should be valid) + [Branch setSDKWaitTimeForThirdPartyAPIs:10.0]; + XCTAssertEqual([BNCPreferenceHelper sharedInstance].thirdPartyAPIsWaitTime, 10.0, + @"Timeout of exactly 10.0 seconds should be valid"); + + // Test just over 10.0 (should be invalid) + [Branch setSDKWaitTimeForThirdPartyAPIs:10.0001]; + XCTAssertEqual([BNCPreferenceHelper sharedInstance].thirdPartyAPIsWaitTime, 10.0, + @"Timeout of 10.0001 seconds should be rejected"); + + // Test very small positive value (should be valid) + [Branch setSDKWaitTimeForThirdPartyAPIs:0.0001]; + XCTAssertEqual([BNCPreferenceHelper sharedInstance].thirdPartyAPIsWaitTime, 0.0001, + @"Very small positive timeout should be valid"); +} + +- (void)testSetAnonID { + NSString *expectedAnonID = @"static-test-anon-id-12345"; + + [Branch setAnonID:expectedAnonID]; + + NSString *actualAnonID = [BNCPreferenceHelper sharedInstance].anonID; + XCTAssertEqualObjects(actualAnonID, expectedAnonID, @"setAnonID should set valid string"); +} + +- (void)testSetAnonID_UpdateExistingValue { + NSString *initialAnonID = @"initial-anon-id"; + NSString *updatedAnonID = @"updated-anon-id"; + + [Branch setAnonID:initialAnonID]; + XCTAssertEqualObjects([BNCPreferenceHelper sharedInstance].anonID, initialAnonID); + + [Branch setAnonID:updatedAnonID]; + XCTAssertEqualObjects([BNCPreferenceHelper sharedInstance].anonID, updatedAnonID); +} + +- (void)testSetAnonID_NilValue { + NSString *initialAnonID = @"initial-anon-id"; + + [Branch setAnonID:initialAnonID]; + XCTAssertEqualObjects([BNCPreferenceHelper sharedInstance].anonID, initialAnonID); + + [Branch setAnonID:nil]; + XCTAssertEqualObjects([BNCPreferenceHelper sharedInstance].anonID, initialAnonID); +} + +- (void)testSetAnonID_EmptyString { + NSString *emptyAnonID = @""; + + [Branch setAnonID:emptyAnonID]; + + NSString *actualAnonID = [BNCPreferenceHelper sharedInstance].anonID; + XCTAssertEqualObjects(actualAnonID, emptyAnonID, @"Static setAnonID should accept empty string"); +} + +- (void)testSetAnonID_NonStringObject { + NSString *initialAnonID = @"initial-anon-id"; + + [Branch setAnonID:initialAnonID]; + XCTAssertEqualObjects([BNCPreferenceHelper sharedInstance].anonID, initialAnonID); + + // Try to set with a non-string object (NSNumber) + NSNumber *nonStringValue = @123; + [Branch setAnonID:(NSString *)nonStringValue]; + + XCTAssertEqualObjects([BNCPreferenceHelper sharedInstance].anonID, initialAnonID); +} + +- (void)testSetAnonID_LongString { + NSString *longAnonID = @"very-long-anon-id-with-many-characters-to-test-string-handling-1234567890-abcdefghijklmnopqrstuvwxyz"; + + [Branch setAnonID:longAnonID]; + + NSString *actualAnonID = [BNCPreferenceHelper sharedInstance].anonID; + XCTAssertEqualObjects(actualAnonID, longAnonID, @"setAnonID should handle long strings"); +} + +- (void)testSetAnonID_SpecialCharacters { + NSString *specialCharAnonID = @"static-anon-id-with-special-chars-!@#$%^&*()_+-=[]{}|;:,.<>?"; + + [Branch setAnonID:specialCharAnonID]; + + NSString *actualAnonID = [BNCPreferenceHelper sharedInstance].anonID; + XCTAssertEqualObjects(actualAnonID, specialCharAnonID, @"setAnonID should handle special characters"); +} + +- (void)testSetAnonID_ThreadSafety { + NSString *anonID1 = @"thread-test-anon-id-1"; + NSString *anonID2 = @"thread-test-anon-id-2"; + + // Test that the method is thread-safe by calling it from different queues + dispatch_group_t group = dispatch_group_create(); + + dispatch_group_enter(group); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [Branch setAnonID:anonID1]; + dispatch_group_leave(group); + }); + + dispatch_group_enter(group); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [Branch setAnonID:anonID2]; + dispatch_group_leave(group); + }); + + dispatch_group_wait(group, DISPATCH_TIME_FOREVER); + + // Verify that one of the values was set (we can't predict which due to concurrency) + NSString *finalAnonID = [BNCPreferenceHelper sharedInstance].anonID; + XCTAssertTrue([finalAnonID isEqualToString:anonID1] || [finalAnonID isEqualToString:anonID2], + @"One of the anonID values should be set"); +} @end diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchLoggerTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchLoggerTests.m index 1a4be3490..a28b775d9 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchLoggerTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchLoggerTests.m @@ -8,7 +8,7 @@ #import #import "BranchLogger.h" -#import "Branch.h" +@import BranchSDK; @interface BranchLoggerTests : XCTestCase diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchQRCodeTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchQRCodeTests.m index 3d1e1ffc6..9208b9052 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchQRCodeTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchQRCodeTests.m @@ -7,7 +7,7 @@ // #import -#import "Branch.h" +@import BranchSDK; #import "BranchQRCode.h" #import "BNCQRCodeCache.h" diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchShareLinkTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchShareLinkTests.m index c41fdb618..6306a2792 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchShareLinkTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchShareLinkTests.m @@ -9,7 +9,7 @@ #import #import "BranchShareLink.h" #import "BranchLinkProperties.h" -#import "Branch.h" +@import BranchSDK; @interface BranchShareLinkTests : XCTestCase diff --git a/Branch-TestBed/Branch-SDK-Tests/DispatchToIsolationQueueTests.m b/Branch-TestBed/Branch-SDK-Tests/DispatchToIsolationQueueTests.m index 89043aa94..e51f4c7ef 100644 --- a/Branch-TestBed/Branch-SDK-Tests/DispatchToIsolationQueueTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/DispatchToIsolationQueueTests.m @@ -7,7 +7,7 @@ // #import -// #import "Branch.h" +// @import BranchSDK; @interface DispatchToIsolationQueueTests : XCTestCase // @property (nonatomic, strong, readwrite) Branch *branch; diff --git a/Branch-TestBed/Branch-SDK-Unhosted-Tests/Branch_setBranchKeyTests.m b/Branch-TestBed/Branch-SDK-Unhosted-Tests/Branch_setBranchKeyTests.m index 3792b3933..6e92febdc 100644 --- a/Branch-TestBed/Branch-SDK-Unhosted-Tests/Branch_setBranchKeyTests.m +++ b/Branch-TestBed/Branch-SDK-Unhosted-Tests/Branch_setBranchKeyTests.m @@ -7,7 +7,7 @@ // #import -#import "Branch.h" +@import BranchSDK; #import "NSError+Branch.h" // expose private methods used by tests diff --git a/Branch-TestBed/Branch-TestBed-CI.xctestplan b/Branch-TestBed/Branch-TestBed-CI.xctestplan index 260e13c5a..5db9a583a 100644 --- a/Branch-TestBed/Branch-TestBed-CI.xctestplan +++ b/Branch-TestBed/Branch-TestBed-CI.xctestplan @@ -13,6 +13,7 @@ }, "testTargets" : [ { + "enabled" : false, "target" : { "containerPath" : "container:Branch-TestBed.xcodeproj", "identifier" : "E7AC745F2DB064BC002D8C40", diff --git a/Branch-TestBed/Branch-TestBed-UITests/UITestCaseMisc.m b/Branch-TestBed/Branch-TestBed-UITests/UITestCaseMisc.m index 3c992a5b6..aaf34d73e 100644 --- a/Branch-TestBed/Branch-TestBed-UITests/UITestCaseMisc.m +++ b/Branch-TestBed/Branch-TestBed-UITests/UITestCaseMisc.m @@ -7,7 +7,7 @@ // #import "UITestCaseTestBed.h" -#import "Branch.h" +@import BranchSDK; #import "BranchEvent.h" @interface UITestCaseMisc : UITestCaseTestBed diff --git a/Branch-TestBed/Branch-TestBed-UITests/UITestCaseTracking.m b/Branch-TestBed/Branch-TestBed-UITests/UITestCaseTracking.m index 95eb6f594..89e8ebbb6 100644 --- a/Branch-TestBed/Branch-TestBed-UITests/UITestCaseTracking.m +++ b/Branch-TestBed/Branch-TestBed-UITests/UITestCaseTracking.m @@ -7,7 +7,7 @@ // #import "UITestCaseTestBed.h" -#import "Branch.h" +@import BranchSDK; #import "BranchEvent.h" @interface UITestCaseTracking : UITestCaseTestBed diff --git a/Branch-TestBed/Branch-TestBed-UITests/UITestSendV2Event.m b/Branch-TestBed/Branch-TestBed-UITests/UITestSendV2Event.m index e919669e4..41491c7ae 100644 --- a/Branch-TestBed/Branch-TestBed-UITests/UITestSendV2Event.m +++ b/Branch-TestBed/Branch-TestBed-UITests/UITestSendV2Event.m @@ -7,7 +7,7 @@ // #import -#import "Branch.h" +@import BranchSDK; #import "BranchEvent.h" #import "UITestCaseTestBed.h" diff --git a/Branch-TestBed/Branch-TestBed-UITests/UITestSetIdentity.m b/Branch-TestBed/Branch-TestBed-UITests/UITestSetIdentity.m index 60e1b6f66..9e2982319 100644 --- a/Branch-TestBed/Branch-TestBed-UITests/UITestSetIdentity.m +++ b/Branch-TestBed/Branch-TestBed-UITests/UITestSetIdentity.m @@ -8,7 +8,7 @@ #import -#import "Branch.h" +@import BranchSDK; #import "BranchEvent.h" #import "UITestCaseTestBed.h" diff --git a/Branch-TestBed/Branch-TestBed.xcodeproj/Branch-TestBed.xctestplan b/Branch-TestBed/Branch-TestBed.xcodeproj/Branch-TestBed.xctestplan index f4b6ec1ea..cb6dc38fe 100644 --- a/Branch-TestBed/Branch-TestBed.xcodeproj/Branch-TestBed.xctestplan +++ b/Branch-TestBed/Branch-TestBed.xcodeproj/Branch-TestBed.xctestplan @@ -37,6 +37,11 @@ } }, { + "skippedTests" : [ + "Reflection_ODM_Tests", + "Reflection_ODM_Tests\/testODMAPICall", + "Reflection_ODM_Tests\/testODMAPIsLoaded" + ], "target" : { "containerPath" : "container:Branch-TestBed.xcodeproj", "identifier" : "E7AC745F2DB064BC002D8C40", diff --git a/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj b/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj index dd3e784eb..802a31f30 100644 --- a/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj +++ b/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj @@ -11,14 +11,13 @@ 032DAF232607B59300891641 /* UITestCaseTracking.m in Sources */ = {isa = PBXBuildFile; fileRef = 032DAF222607B59300891641 /* UITestCaseTracking.m */; }; 033E096325F459C300F39CB3 /* UITestSetIdentity.m in Sources */ = {isa = PBXBuildFile; fileRef = 033E096225F459C200F39CB3 /* UITestSetIdentity.m */; }; 033E097225F541D400F39CB3 /* UITestCaseTestBed.m in Sources */ = {isa = PBXBuildFile; fileRef = 033E097125F541D400F39CB3 /* UITestCaseTestBed.m */; }; - 0372076425E8418F00F29C30 /* libBranch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 466B58381B17773000A69EDE /* libBranch.a */; }; 0372078825E9F81100F29C30 /* UITestCaseMisc.m in Sources */ = {isa = PBXBuildFile; fileRef = 0372078725E9F81000F29C30 /* UITestCaseMisc.m */; }; 0399DD122599BF8A00CDB36E /* UITestSendV2Event.m in Sources */ = {isa = PBXBuildFile; fileRef = 0399DD112599BF8A00CDB36E /* UITestSendV2Event.m */; }; 03B49EEB25F9F315000BF105 /* UITestCase0OpenNInstall.m in Sources */ = {isa = PBXBuildFile; fileRef = 03B49EEA25F9F315000BF105 /* UITestCase0OpenNInstall.m */; }; + 40EA3FC7C54A6B3CCEBDB9F8 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; 466B584F1B17775900A69EDE /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67BBCF271A69E49A009C7DAE /* AdSupport.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 466B58521B17776500A69EDE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 670016631940F51400A9E103 /* Foundation.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 466B58531B17776A00A69EDE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 670016671940F51400A9E103 /* UIKit.framework */; }; - 466B58811B1778DB00A69EDE /* libBranch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 466B58381B17773000A69EDE /* libBranch.a */; }; 4683F0761B20A73F00A432E7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 670016731940F51400A9E103 /* AppDelegate.m */; }; 46DC406E1B2A328900D2D203 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67BBCF271A69E49A009C7DAE /* AdSupport.framework */; }; 4AB16368239E3A2700D42931 /* DispatchToIsolationQueueTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AB16367239E3A2700D42931 /* DispatchToIsolationQueueTests.m */; }; @@ -36,6 +35,7 @@ 4D93D8622098D43C00CFABA6 /* UITestSafari.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D93D8602098D43C00CFABA6 /* UITestSafari.m */; }; 4DBEFFF61FB114F900F7C41B /* ArrayPickerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DBEFFF51FB114F900F7C41B /* ArrayPickerView.m */; }; 4DE235641FB12C2700D4E5A9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4DBEFFFB1FB12A1000F7C41B /* Main.storyboard */; }; + 5AFDEF31D95DB3252A8F146D /* (null) in Frameworks */ = {isa = PBXBuildFile; }; 5F205D05231864E800C776D1 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F205D04231864E800C776D1 /* WebKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 5F205D062318659500C776D1 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F205D04231864E800C776D1 /* WebKit.framework */; }; 5F205D0823186AF700C776D1 /* BNCUserAgentCollectorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F205D022318641700C776D1 /* BNCUserAgentCollectorTests.m */; }; @@ -43,51 +43,8 @@ 5F3D671C233062FD00454FF1 /* BNCJsonLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3D671A233062FD00454FF1 /* BNCJsonLoader.m */; }; 5F42763325DB3694005B9BBC /* AdServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F42763225DB3694005B9BBC /* AdServices.framework */; }; 5F437E40237E1A560052064B /* BNCDeviceSystemTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F437E3F237E1A560052064B /* BNCDeviceSystemTests.m */; }; - 5F5FDA102B7DE20800F14A43 /* BranchLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5FDA0F2B7DE20800F14A43 /* BranchLogger.m */; }; 5F5FDA122B7DE22A00F14A43 /* BranchLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F5FDA112B7DE22A00F14A43 /* BranchLogger.h */; }; 5F5FDA142B7DE27D00F14A43 /* BranchLoggerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5FDA132B7DE27D00F14A43 /* BranchLoggerTests.m */; }; - 5F644BB92B7AA811000DCD78 /* NSError+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B262B7AA810000DCD78 /* NSError+Branch.m */; }; - 5F644BBA2B7AA811000DCD78 /* BNCUserAgentCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B272B7AA810000DCD78 /* BNCUserAgentCollector.m */; }; - 5F644BBB2B7AA811000DCD78 /* BNCEncodingUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B282B7AA810000DCD78 /* BNCEncodingUtils.m */; }; - 5F644BBC2B7AA811000DCD78 /* BranchUniversalObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B292B7AA810000DCD78 /* BranchUniversalObject.m */; }; - 5F644BBD2B7AA811000DCD78 /* BranchPasteControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B2A2B7AA810000DCD78 /* BranchPasteControl.m */; }; - 5F644BBE2B7AA811000DCD78 /* BNCApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B2B2B7AA810000DCD78 /* BNCApplication.m */; }; - 5F644BBF2B7AA811000DCD78 /* BNCDeviceSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B2C2B7AA810000DCD78 /* BNCDeviceSystem.m */; }; - 5F644BC02B7AA811000DCD78 /* NSMutableDictionary+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B2D2B7AA810000DCD78 /* NSMutableDictionary+Branch.m */; }; - 5F644BC12B7AA811000DCD78 /* BNCServerRequestQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B2E2B7AA810000DCD78 /* BNCServerRequestQueue.m */; }; - 5F644BC22B7AA811000DCD78 /* BNCUrlQueryParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B2F2B7AA810000DCD78 /* BNCUrlQueryParameter.m */; }; - 5F644BC32B7AA811000DCD78 /* BNCDeepLinkViewControllerInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B302B7AA810000DCD78 /* BNCDeepLinkViewControllerInstance.m */; }; - 5F644BC42B7AA811000DCD78 /* BranchScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B312B7AA810000DCD78 /* BranchScene.m */; }; - 5F644BC52B7AA811000DCD78 /* BNCContentDiscoveryManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B322B7AA810000DCD78 /* BNCContentDiscoveryManager.m */; }; - 5F644BC62B7AA811000DCD78 /* Branch+Validator.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B332B7AA810000DCD78 /* Branch+Validator.m */; }; - 5F644BC72B7AA811000DCD78 /* BranchInstallRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B342B7AA810000DCD78 /* BranchInstallRequest.m */; }; - 5F644BC82B7AA811000DCD78 /* BranchPluginSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B352B7AA810000DCD78 /* BranchPluginSupport.m */; }; - 5F644BC92B7AA811000DCD78 /* NSString+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B362B7AA810000DCD78 /* NSString+Branch.m */; }; - 5F644BCA2B7AA811000DCD78 /* BNCSystemObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B372B7AA810000DCD78 /* BNCSystemObserver.m */; }; - 5F644BCC2B7AA811000DCD78 /* BNCURLFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B392B7AA810000DCD78 /* BNCURLFilter.m */; }; - 5F644BCD2B7AA811000DCD78 /* BNCServerRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B3A2B7AA810000DCD78 /* BNCServerRequest.m */; }; - 5F644BCE2B7AA811000DCD78 /* BNCNetworkInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B3B2B7AA810000DCD78 /* BNCNetworkInterface.m */; }; - 5F644BCF2B7AA811000DCD78 /* BNCPreferenceHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B3C2B7AA810000DCD78 /* BNCPreferenceHelper.m */; }; - 5F644BD02B7AA811000DCD78 /* BNCConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B3D2B7AA810000DCD78 /* BNCConfig.m */; }; - 5F644BD12B7AA811000DCD78 /* BranchConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B3E2B7AA810000DCD78 /* BranchConstants.m */; }; - 5F644BD22B7AA811000DCD78 /* BranchContentDiscoveryManifest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B3F2B7AA810000DCD78 /* BranchContentDiscoveryManifest.m */; }; - 5F644BD32B7AA811000DCD78 /* BranchSpotlightUrlRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B402B7AA810000DCD78 /* BranchSpotlightUrlRequest.m */; }; - 5F644BD52B7AA811000DCD78 /* BranchContentDiscoverer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B422B7AA810000DCD78 /* BranchContentDiscoverer.m */; }; - 5F644BD62B7AA811000DCD78 /* BNCDeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B432B7AA810000DCD78 /* BNCDeviceInfo.m */; }; - 5F644BD72B7AA811000DCD78 /* BNCNetworkService.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B442B7AA810000DCD78 /* BNCNetworkService.m */; }; - 5F644BD82B7AA811000DCD78 /* BNCReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B452B7AA810000DCD78 /* BNCReachability.m */; }; - 5F644BD92B7AA811000DCD78 /* BNCRequestFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B462B7AA810000DCD78 /* BNCRequestFactory.m */; }; - 5F644BDA2B7AA811000DCD78 /* BNCReferringURLUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B472B7AA810000DCD78 /* BNCReferringURLUtility.m */; }; - 5F644BDB2B7AA811000DCD78 /* BNCProductCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B482B7AA810000DCD78 /* BNCProductCategory.m */; }; - 5F644BDC2B7AA811000DCD78 /* BNCCrashlyticsWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B492B7AA810000DCD78 /* BNCCrashlyticsWrapper.m */; }; - 5F644BDD2B7AA811000DCD78 /* BNCServerInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B4A2B7AA810000DCD78 /* BNCServerInterface.m */; }; - 5F644BDE2B7AA811000DCD78 /* BranchJsonConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B4B2B7AA810000DCD78 /* BranchJsonConfig.m */; }; - 5F644BDF2B7AA811000DCD78 /* BranchLATDRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B4C2B7AA810000DCD78 /* BranchLATDRequest.m */; }; - 5F644BE02B7AA811000DCD78 /* BNCPartnerParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B4D2B7AA810000DCD78 /* BNCPartnerParameters.m */; }; - 5F644BE12B7AA811000DCD78 /* BranchCSSearchableItemAttributeSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B4E2B7AA810000DCD78 /* BranchCSSearchableItemAttributeSet.m */; }; - 5F644BE22B7AA811000DCD78 /* BranchActivityItemProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B4F2B7AA810000DCD78 /* BranchActivityItemProvider.m */; }; - 5F644BE32B7AA811000DCD78 /* BranchQRCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B502B7AA810000DCD78 /* BranchQRCode.m */; }; - 5F644BE42B7AA811000DCD78 /* BNCKeyChain.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B512B7AA810000DCD78 /* BNCKeyChain.m */; }; 5F644BE52B7AA811000DCD78 /* BNCLinkData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F644B532B7AA810000DCD78 /* BNCLinkData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F644BE62B7AA811000DCD78 /* BranchDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F644B542B7AA810000DCD78 /* BranchDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F644BE72B7AA811000DCD78 /* BranchQRCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F644B552B7AA810000DCD78 /* BranchQRCode.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -159,37 +116,10 @@ 5F644C2D2B7AA811000DCD78 /* BNCReferringURLUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F644B9C2B7AA811000DCD78 /* BNCReferringURLUtility.h */; }; 5F644C2E2B7AA811000DCD78 /* BNCNetworkService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F644B9D2B7AA811000DCD78 /* BNCNetworkService.h */; }; 5F644C2F2B7AA811000DCD78 /* BNCReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F644B9E2B7AA811000DCD78 /* BNCReachability.h */; }; - 5F644C302B7AA811000DCD78 /* BranchDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644B9F2B7AA811000DCD78 /* BranchDelegate.m */; }; - 5F644C312B7AA811000DCD78 /* BNCLinkData.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA02B7AA811000DCD78 /* BNCLinkData.m */; }; - 5F644C322B7AA811000DCD78 /* Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA12B7AA811000DCD78 /* Branch.m */; }; - 5F644C332B7AA811000DCD78 /* BNCJSONUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA22B7AA811000DCD78 /* BNCJSONUtility.m */; }; - 5F644C342B7AA811000DCD78 /* BNCCurrency.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA32B7AA811000DCD78 /* BNCCurrency.m */; }; - 5F644C352B7AA811000DCD78 /* BranchLastAttributedTouchData.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA42B7AA811000DCD78 /* BranchLastAttributedTouchData.m */; }; - 5F644C362B7AA811000DCD78 /* BNCSKAdNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA52B7AA811000DCD78 /* BNCSKAdNetwork.m */; }; - 5F644C372B7AA811000DCD78 /* BranchContentPathProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA62B7AA811000DCD78 /* BranchContentPathProperties.m */; }; - 5F644C382B7AA811000DCD78 /* BNCPasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA72B7AA811000DCD78 /* BNCPasteboard.m */; }; - 5F644C392B7AA811000DCD78 /* BNCAppleReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA82B7AA811000DCD78 /* BNCAppleReceipt.m */; }; - 5F644C3A2B7AA811000DCD78 /* BranchLinkProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BA92B7AA811000DCD78 /* BranchLinkProperties.m */; }; - 5F644C3B2B7AA811000DCD78 /* BNCInitSessionResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BAA2B7AA811000DCD78 /* BNCInitSessionResponse.m */; }; - 5F644C3C2B7AA811000DCD78 /* BNCLinkCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BAB2B7AA811000DCD78 /* BNCLinkCache.m */; }; - 5F644C3D2B7AA811000DCD78 /* BNCSpotlightService.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BAC2B7AA811000DCD78 /* BNCSpotlightService.m */; }; - 5F644C3E2B7AA811000DCD78 /* BNCServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BAD2B7AA811000DCD78 /* BNCServerAPI.m */; }; - 5F644C3F2B7AA811000DCD78 /* BranchShareLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BAE2B7AA811000DCD78 /* BranchShareLink.m */; }; - 5F644C402B7AA811000DCD78 /* UIViewController+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BAF2B7AA811000DCD78 /* UIViewController+Branch.m */; }; - 5F644C412B7AA811000DCD78 /* BNCAppGroupsData.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BB02B7AA811000DCD78 /* BNCAppGroupsData.m */; }; - 5F644C422B7AA811000DCD78 /* BNCServerResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BB12B7AA811000DCD78 /* BNCServerResponse.m */; }; - 5F644C432B7AA811000DCD78 /* BranchEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BB22B7AA811000DCD78 /* BranchEvent.m */; }; - 5F644C442B7AA811000DCD78 /* BranchShortUrlRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BB32B7AA811000DCD78 /* BranchShortUrlRequest.m */; }; - 5F644C452B7AA811000DCD78 /* BranchOpenRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BB42B7AA811000DCD78 /* BranchOpenRequest.m */; }; - 5F644C462B7AA811000DCD78 /* BNCQRCodeCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BB52B7AA811000DCD78 /* BNCQRCodeCache.m */; }; - 5F644C472B7AA811000DCD78 /* BranchShortUrlSyncRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BB62B7AA811000DCD78 /* BranchShortUrlSyncRequest.m */; }; - 5F644C482B7AA811000DCD78 /* BNCCallbackMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BB72B7AA811000DCD78 /* BNCCallbackMap.m */; }; - 5F644C492B7AA811000DCD78 /* BNCEventUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F644BB82B7AA811000DCD78 /* BNCEventUtils.m */; }; 5F67F48E228F535500067429 /* BNCEncodingUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F67F48D228F535500067429 /* BNCEncodingUtilsTests.m */; }; 5F6D86D92BB5E9650068B536 /* BNCClassSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F6D86D82BB5E9650068B536 /* BNCClassSerializationTests.m */; }; 5F86501A2B76DA3200364BDE /* NSMutableDictionaryBranchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F8650192B76DA3200364BDE /* NSMutableDictionaryBranchTests.m */; }; 5F892EC5236116CD0023AEC1 /* NSErrorBranchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F892EC4236116CC0023AEC1 /* NSErrorBranchTests.m */; }; - 5F8B7B4021B5F5CD009CE0A6 /* libBranch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 466B58381B17773000A69EDE /* libBranch.a */; }; 5F8B7B4721B5F5F0009CE0A6 /* Branch_setBranchKeyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F8B7B4621B5F5F0009CE0A6 /* Branch_setBranchKeyTests.m */; }; 5F8BB66E278771890055D2DC /* BNCKeyChainTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F8BB66D278771890055D2DC /* BNCKeyChainTests.m */; }; 5F909B5E23314CE900A774D2 /* BNCJSONUtilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F73FC8023314697000EBD32 /* BNCJSONUtilityTests.m */; }; @@ -224,6 +154,7 @@ 670016701940F51400A9E103 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6700166F1940F51400A9E103 /* main.m */; }; 6700167A1940F51400A9E103 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 670016791940F51400A9E103 /* ViewController.m */; }; 67F270891BA9FCFF002546A7 /* CoreSpotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67F270881BA9FCFF002546A7 /* CoreSpotlight.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + B77CB6C72E8EE36300FDF144 /* BranchSDK in Frameworks */ = {isa = PBXBuildFile; productRef = B77CB6C62E8EE36300FDF144 /* BranchSDK */; }; C10A6DE629A995590061A851 /* StoreKitTestCertificate.cer in Resources */ = {isa = PBXBuildFile; fileRef = C10A6DE529A995590061A851 /* StoreKitTestCertificate.cer */; }; C10C61AA282481FB00761D7E /* BranchShareLinkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C10C61A9282481FB00761D7E /* BranchShareLinkTests.m */; }; C12320B52808DB90007771C0 /* BranchQRCodeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C12320B42808DB90007771C0 /* BranchQRCodeTests.m */; }; @@ -233,70 +164,17 @@ C17DAF7B2AC20C2000B16B1A /* BranchClassTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C17DAF7A2AC20C2000B16B1A /* BranchClassTests.m */; }; C1CC888229BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CC888129BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m */; }; E51F642A2CF46899000858D2 /* BranchFileLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = E51F64292CF46899000858D2 /* BranchFileLogger.h */; }; - E56394312CC7AC9F00E18E65 /* BranchFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = E563942F2CC7AC9500E18E65 /* BranchFileLogger.m */; }; E71E397B2DD3C14800110F59 /* BNCInAppBrowser.h in Headers */ = {isa = PBXBuildFile; fileRef = E71E397A2DD3C14800110F59 /* BNCInAppBrowser.h */; }; E72489D228E40D0200DCD8FD /* PasteControlViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E72489D128E40D0200DCD8FD /* PasteControlViewController.m */; }; E7A728BD2AA9A112009343B7 /* BNCAPIServerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E7A728BC2AA9A112009343B7 /* BNCAPIServerTest.m */; }; E7AC74572DB0639E002D8C40 /* BNCODMInfoCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = E7AC74562DB0639E002D8C40 /* BNCODMInfoCollector.h */; }; - E7AC74592DB063C6002D8C40 /* BNCODMInfoCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = E7AC74582DB063C6002D8C40 /* BNCODMInfoCollector.m */; }; E7AC745B2DB06407002D8C40 /* BNCODMTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7AC745A2DB06407002D8C40 /* BNCODMTests.m */; }; - E7AC74702DB06992002D8C40 /* GULLogger in Frameworks */ = {isa = PBXBuildFile; productRef = E7AC746F2DB06992002D8C40 /* GULLogger */; }; - E7AC74722DB06992002D8C40 /* GULNetwork in Frameworks */ = {isa = PBXBuildFile; productRef = E7AC74712DB06992002D8C40 /* GULNetwork */; }; - E7AC74752DB069B2002D8C40 /* nanopb in Frameworks */ = {isa = PBXBuildFile; productRef = E7AC74742DB069B2002D8C40 /* nanopb */; }; - E7AC747B2DB0700D002D8C40 /* BranchSDK in Frameworks */ = {isa = PBXBuildFile; productRef = E7AC747A2DB0700D002D8C40 /* BranchSDK */; }; E7AC747E2DB0714B002D8C40 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = E7AC747D2DB07145002D8C40 /* libc++.tbd */; }; E7AE4A092DFB2C4400696805 /* BranchConfigurationControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7AE4A082DFB2C4400696805 /* BranchConfigurationControllerTests.m */; }; E7CA74B22E1B4890002EFB40 /* BranchConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = E7CA74B12E1B4890002EFB40 /* BranchConstants.h */; }; - E7CA74B42E1B4944002EFB40 /* ConfigurationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7CA74B32E1B4944002EFB40 /* ConfigurationController.swift */; }; - E7E28ECA2DD2424C00F75D0D /* BNCInAppBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = E7E28EC82DD2424C00F75D0D /* BNCInAppBrowser.m */; }; F1CF14111F4CC79F00BB2694 /* CoreSpotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67F270881BA9FCFF002546A7 /* CoreSpotlight.framework */; settings = {ATTRIBUTES = (Required, ); }; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 466B586F1B1777DE00A69EDE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 670016581940F51400A9E103 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 466B58371B17773000A69EDE; - remoteInfo = Branch; - }; - 4683F07B1B20AC6300A432E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 670016581940F51400A9E103 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 466B58371B17773000A69EDE; - remoteInfo = Branch; - }; - 4D337DDC201019B8009A5774 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 670016581940F51400A9E103 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6700165F1940F51400A9E103; - remoteInfo = "Branch-TestBed"; - }; - 5F8B7B4121B5F5CD009CE0A6 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 670016581940F51400A9E103 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 466B58371B17773000A69EDE; - remoteInfo = Branch; - }; - E7AC74652DB064BC002D8C40 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 670016581940F51400A9E103 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 466B58371B17773000A69EDE; - remoteInfo = Branch; - }; - F1D4F9B11F323F01002D13FF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 670016581940F51400A9E103 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6700165F1940F51400A9E103; - remoteInfo = "Branch-TestBed"; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXCopyFilesBuildPhase section */ 4DF79403209B90B6003597E8 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; @@ -319,7 +197,6 @@ 0372078725E9F81000F29C30 /* UITestCaseMisc.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UITestCaseMisc.m; sourceTree = ""; }; 0399DD112599BF8A00CDB36E /* UITestSendV2Event.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UITestSendV2Event.m; sourceTree = ""; }; 03B49EEA25F9F315000BF105 /* UITestCase0OpenNInstall.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UITestCase0OpenNInstall.m; sourceTree = ""; }; - 466B58381B17773000A69EDE /* libBranch.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBranch.a; sourceTree = BUILT_PRODUCTS_DIR; }; 4AB16367239E3A2700D42931 /* DispatchToIsolationQueueTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DispatchToIsolationQueueTests.m; sourceTree = ""; }; 4D1683812098C901008819E3 /* Branch-SDK-Tests-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Branch-SDK-Tests-Bridging-Header.h"; sourceTree = ""; }; 4D1683842098C901008819E3 /* BNCLinkDataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCLinkDataTests.m; sourceTree = ""; }; @@ -546,6 +423,161 @@ 67BBCF271A69E49A009C7DAE /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; 67F270881BA9FCFF002546A7 /* CoreSpotlight.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreSpotlight.framework; path = System/Library/Frameworks/CoreSpotlight.framework; sourceTree = SDKROOT; }; 7E6B3B511AA42D0E005F45BF /* Branch-SDK-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Branch-SDK-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8CED1FA4F572F144DA1055F3 /* BranchRequestOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BranchRequestOperation.swift; path = ../Sources/BranchSwiftSDK/BranchRequestOperation.swift; sourceTree = SOURCE_ROOT; }; + B7A21E2B2E8EDD5F00BB1E14 /* BNCAppGroupsData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCAppGroupsData.h; sourceTree = ""; }; + B7A21E2C2E8EDD5F00BB1E14 /* BNCAppleReceipt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCAppleReceipt.h; sourceTree = ""; }; + B7A21E2D2E8EDD5F00BB1E14 /* BNCApplication.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCApplication.h; sourceTree = ""; }; + B7A21E2E2E8EDD5F00BB1E14 /* BNCCallbackMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCCallbackMap.h; sourceTree = ""; }; + B7A21E2F2E8EDD5F00BB1E14 /* BNCConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCConfig.h; sourceTree = ""; }; + B7A21E302E8EDD5F00BB1E14 /* BNCContentDiscoveryManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCContentDiscoveryManager.h; sourceTree = ""; }; + B7A21E312E8EDD5F00BB1E14 /* BNCCrashlyticsWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCCrashlyticsWrapper.h; sourceTree = ""; }; + B7A21E322E8EDD5F00BB1E14 /* BNCDeepLinkViewControllerInstance.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCDeepLinkViewControllerInstance.h; sourceTree = ""; }; + B7A21E332E8EDD5F00BB1E14 /* BNCDeviceInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCDeviceInfo.h; sourceTree = ""; }; + B7A21E342E8EDD5F00BB1E14 /* BNCDeviceSystem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCDeviceSystem.h; sourceTree = ""; }; + B7A21E352E8EDD5F00BB1E14 /* BNCEncodingUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCEncodingUtils.h; sourceTree = ""; }; + B7A21E362E8EDD5F00BB1E14 /* BNCEventUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCEventUtils.h; sourceTree = ""; }; + B7A21E372E8EDD5F00BB1E14 /* BNCInAppBrowser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCInAppBrowser.h; sourceTree = ""; }; + B7A21E382E8EDD5F00BB1E14 /* BNCJSONUtility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCJSONUtility.h; sourceTree = ""; }; + B7A21E392E8EDD5F00BB1E14 /* BNCKeyChain.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCKeyChain.h; sourceTree = ""; }; + B7A21E3A2E8EDD5F00BB1E14 /* BNCNetworkInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCNetworkInterface.h; sourceTree = ""; }; + B7A21E3B2E8EDD5F00BB1E14 /* BNCNetworkService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCNetworkService.h; sourceTree = ""; }; + B7A21E3C2E8EDD5F00BB1E14 /* BNCODMInfoCollector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCODMInfoCollector.h; sourceTree = ""; }; + B7A21E3D2E8EDD5F00BB1E14 /* BNCPartnerParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCPartnerParameters.h; sourceTree = ""; }; + B7A21E3E2E8EDD5F00BB1E14 /* BNCPasteboard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCPasteboard.h; sourceTree = ""; }; + B7A21E3F2E8EDD5F00BB1E14 /* BNCQRCodeCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCQRCodeCache.h; sourceTree = ""; }; + B7A21E402E8EDD5F00BB1E14 /* BNCReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCReachability.h; sourceTree = ""; }; + B7A21E412E8EDD5F00BB1E14 /* BNCReferringURLUtility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCReferringURLUtility.h; sourceTree = ""; }; + B7A21E422E8EDD5F00BB1E14 /* BNCRequestFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCRequestFactory.h; sourceTree = ""; }; + B7A21E432E8EDD5F00BB1E14 /* BNCServerAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCServerAPI.h; sourceTree = ""; }; + B7A21E442E8EDD5F00BB1E14 /* BNCServerRequestOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCServerRequestOperation.h; sourceTree = ""; }; + B7A21E452E8EDD5F00BB1E14 /* BNCSKAdNetwork.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCSKAdNetwork.h; sourceTree = ""; }; + B7A21E462E8EDD5F00BB1E14 /* BNCSpotlightService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCSpotlightService.h; sourceTree = ""; }; + B7A21E472E8EDD5F00BB1E14 /* BNCSystemObserver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCSystemObserver.h; sourceTree = ""; }; + B7A21E482E8EDD5F00BB1E14 /* BNCURLFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCURLFilter.h; sourceTree = ""; }; + B7A21E492E8EDD5F00BB1E14 /* BNCUrlQueryParameter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCUrlQueryParameter.h; sourceTree = ""; }; + B7A21E4A2E8EDD5F00BB1E14 /* BNCUserAgentCollector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCUserAgentCollector.h; sourceTree = ""; }; + B7A21E4B2E8EDD5F00BB1E14 /* Branch+Validator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Branch+Validator.h"; sourceTree = ""; }; + B7A21E4C2E8EDD5F00BB1E14 /* BranchConfigurationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchConfigurationController.h; sourceTree = ""; }; + B7A21E4D2E8EDD5F00BB1E14 /* BranchContentDiscoverer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchContentDiscoverer.h; sourceTree = ""; }; + B7A21E4E2E8EDD5F00BB1E14 /* BranchContentDiscoveryManifest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchContentDiscoveryManifest.h; sourceTree = ""; }; + B7A21E4F2E8EDD5F00BB1E14 /* BranchContentPathProperties.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchContentPathProperties.h; sourceTree = ""; }; + B7A21E502E8EDD5F00BB1E14 /* BranchFileLogger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchFileLogger.h; sourceTree = ""; }; + B7A21E512E8EDD5F00BB1E14 /* BranchInstallRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchInstallRequest.h; sourceTree = ""; }; + B7A21E522E8EDD5F00BB1E14 /* BranchJsonConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchJsonConfig.h; sourceTree = ""; }; + B7A21E532E8EDD5F00BB1E14 /* BranchLATDRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchLATDRequest.h; sourceTree = ""; }; + B7A21E542E8EDD5F00BB1E14 /* BranchOpenRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchOpenRequest.h; sourceTree = ""; }; + B7A21E552E8EDD5F00BB1E14 /* BranchShortUrlRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchShortUrlRequest.h; sourceTree = ""; }; + B7A21E562E8EDD5F00BB1E14 /* BranchShortUrlSyncRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchShortUrlSyncRequest.h; sourceTree = ""; }; + B7A21E572E8EDD5F00BB1E14 /* BranchSpotlightUrlRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchSpotlightUrlRequest.h; sourceTree = ""; }; + B7A21E582E8EDD5F00BB1E14 /* NSError+Branch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSError+Branch.h"; sourceTree = ""; }; + B7A21E592E8EDD5F00BB1E14 /* NSMutableDictionary+Branch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSMutableDictionary+Branch.h"; sourceTree = ""; }; + B7A21E5A2E8EDD5F00BB1E14 /* NSString+Branch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+Branch.h"; sourceTree = ""; }; + B7A21E5B2E8EDD5F00BB1E14 /* UIViewController+Branch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Branch.h"; sourceTree = ""; }; + B7A21E5D2E8EDD5F00BB1E14 /* BNCCallbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCCallbacks.h; sourceTree = ""; }; + B7A21E5E2E8EDD5F00BB1E14 /* BNCCurrency.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCCurrency.h; sourceTree = ""; }; + B7A21E5F2E8EDD5F00BB1E14 /* BNCInitSessionResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCInitSessionResponse.h; sourceTree = ""; }; + B7A21E602E8EDD5F00BB1E14 /* BNCLinkCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCLinkCache.h; sourceTree = ""; }; + B7A21E612E8EDD5F00BB1E14 /* BNCLinkData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCLinkData.h; sourceTree = ""; }; + B7A21E622E8EDD5F00BB1E14 /* BNCNetworkServiceProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCNetworkServiceProtocol.h; sourceTree = ""; }; + B7A21E632E8EDD5F00BB1E14 /* BNCPreferenceHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCPreferenceHelper.h; sourceTree = ""; }; + B7A21E642E8EDD5F00BB1E14 /* BNCProductCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCProductCategory.h; sourceTree = ""; }; + B7A21E652E8EDD5F00BB1E14 /* BNCServerInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCServerInterface.h; sourceTree = ""; }; + B7A21E662E8EDD5F00BB1E14 /* BNCServerRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCServerRequest.h; sourceTree = ""; }; + B7A21E672E8EDD5F00BB1E14 /* BNCServerRequestQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCServerRequestQueue.h; sourceTree = ""; }; + B7A21E682E8EDD5F00BB1E14 /* BNCServerResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCServerResponse.h; sourceTree = ""; }; + B7A21E692E8EDD5F00BB1E14 /* Branch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Branch.h; sourceTree = ""; }; + B7A21E6A2E8EDD5F00BB1E14 /* BranchActivityItemProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchActivityItemProvider.h; sourceTree = ""; }; + B7A21E6B2E8EDD5F00BB1E14 /* BranchConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchConstants.h; sourceTree = ""; }; + B7A21E6C2E8EDD5F00BB1E14 /* BranchCSSearchableItemAttributeSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchCSSearchableItemAttributeSet.h; sourceTree = ""; }; + B7A21E6D2E8EDD5F00BB1E14 /* BranchDeepLinkingController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchDeepLinkingController.h; sourceTree = ""; }; + B7A21E6E2E8EDD5F00BB1E14 /* BranchDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchDelegate.h; sourceTree = ""; }; + B7A21E6F2E8EDD5F00BB1E14 /* BranchEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchEvent.h; sourceTree = ""; }; + B7A21E702E8EDD5F00BB1E14 /* BranchLastAttributedTouchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchLastAttributedTouchData.h; sourceTree = ""; }; + B7A21E712E8EDD5F00BB1E14 /* BranchLinkProperties.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchLinkProperties.h; sourceTree = ""; }; + B7A21E722E8EDD5F00BB1E14 /* BranchLogger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchLogger.h; sourceTree = ""; }; + B7A21E732E8EDD5F00BB1E14 /* BranchPasteControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchPasteControl.h; sourceTree = ""; }; + B7A21E742E8EDD5F00BB1E14 /* BranchPluginSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchPluginSupport.h; sourceTree = ""; }; + B7A21E752E8EDD5F00BB1E14 /* BranchQRCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchQRCode.h; sourceTree = ""; }; + B7A21E762E8EDD5F00BB1E14 /* BranchScene.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchScene.h; sourceTree = ""; }; + B7A21E772E8EDD5F00BB1E14 /* BranchSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchSDK.h; sourceTree = ""; }; + B7A21E782E8EDD5F00BB1E14 /* BranchShareLink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchShareLink.h; sourceTree = ""; }; + B7A21E792E8EDD5F00BB1E14 /* BranchUniversalObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchUniversalObject.h; sourceTree = ""; }; + B7A21E7B2E8EDD5F00BB1E14 /* BNCAppGroupsData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCAppGroupsData.m; sourceTree = ""; }; + B7A21E7C2E8EDD5F00BB1E14 /* BNCAppleReceipt.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCAppleReceipt.m; sourceTree = ""; }; + B7A21E7D2E8EDD5F00BB1E14 /* BNCApplication.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCApplication.m; sourceTree = ""; }; + B7A21E7E2E8EDD5F00BB1E14 /* BNCCallbackMap.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCCallbackMap.m; sourceTree = ""; }; + B7A21E7F2E8EDD5F00BB1E14 /* BNCConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCConfig.m; sourceTree = ""; }; + B7A21E802E8EDD5F00BB1E14 /* BNCContentDiscoveryManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCContentDiscoveryManager.m; sourceTree = ""; }; + B7A21E812E8EDD5F00BB1E14 /* BNCCrashlyticsWrapper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCCrashlyticsWrapper.m; sourceTree = ""; }; + B7A21E822E8EDD5F00BB1E14 /* BNCCurrency.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCCurrency.m; sourceTree = ""; }; + B7A21E832E8EDD5F00BB1E14 /* BNCDeepLinkViewControllerInstance.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCDeepLinkViewControllerInstance.m; sourceTree = ""; }; + B7A21E842E8EDD5F00BB1E14 /* BNCDeviceInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCDeviceInfo.m; sourceTree = ""; }; + B7A21E852E8EDD5F00BB1E14 /* BNCDeviceSystem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCDeviceSystem.m; sourceTree = ""; }; + B7A21E862E8EDD5F00BB1E14 /* BNCEncodingUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCEncodingUtils.m; sourceTree = ""; }; + B7A21E872E8EDD5F00BB1E14 /* BNCEventUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCEventUtils.m; sourceTree = ""; }; + B7A21E882E8EDD5F00BB1E14 /* BNCInAppBrowser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCInAppBrowser.m; sourceTree = ""; }; + B7A21E892E8EDD5F00BB1E14 /* BNCInitSessionResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCInitSessionResponse.m; sourceTree = ""; }; + B7A21E8A2E8EDD5F00BB1E14 /* BNCJSONUtility.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCJSONUtility.m; sourceTree = ""; }; + B7A21E8B2E8EDD5F00BB1E14 /* BNCKeyChain.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCKeyChain.m; sourceTree = ""; }; + B7A21E8C2E8EDD5F00BB1E14 /* BNCLinkCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCLinkCache.m; sourceTree = ""; }; + B7A21E8D2E8EDD5F00BB1E14 /* BNCLinkData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCLinkData.m; sourceTree = ""; }; + B7A21E8E2E8EDD5F00BB1E14 /* BNCNetworkInterface.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCNetworkInterface.m; sourceTree = ""; }; + B7A21E8F2E8EDD5F00BB1E14 /* BNCNetworkService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCNetworkService.m; sourceTree = ""; }; + B7A21E902E8EDD5F00BB1E14 /* BNCODMInfoCollector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCODMInfoCollector.m; sourceTree = ""; }; + B7A21E912E8EDD5F00BB1E14 /* BNCPartnerParameters.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCPartnerParameters.m; sourceTree = ""; }; + B7A21E922E8EDD5F00BB1E14 /* BNCPasteboard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCPasteboard.m; sourceTree = ""; }; + B7A21E932E8EDD5F00BB1E14 /* BNCPreferenceHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCPreferenceHelper.m; sourceTree = ""; }; + B7A21E942E8EDD5F00BB1E14 /* BNCProductCategory.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCProductCategory.m; sourceTree = ""; }; + B7A21E952E8EDD5F00BB1E14 /* BNCQRCodeCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCQRCodeCache.m; sourceTree = ""; }; + B7A21E962E8EDD5F00BB1E14 /* BNCReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCReachability.m; sourceTree = ""; }; + B7A21E972E8EDD5F00BB1E14 /* BNCReferringURLUtility.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCReferringURLUtility.m; sourceTree = ""; }; + B7A21E982E8EDD5F00BB1E14 /* BNCRequestFactory.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCRequestFactory.m; sourceTree = ""; }; + B7A21E992E8EDD5F00BB1E14 /* BNCServerAPI.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCServerAPI.m; sourceTree = ""; }; + B7A21E9A2E8EDD5F00BB1E14 /* BNCServerInterface.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCServerInterface.m; sourceTree = ""; }; + B7A21E9B2E8EDD5F00BB1E14 /* BNCServerRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCServerRequest.m; sourceTree = ""; }; + B7A21E9C2E8EDD5F00BB1E14 /* BNCServerRequestOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCServerRequestOperation.m; sourceTree = ""; }; + B7A21E9D2E8EDD5F00BB1E14 /* BNCServerRequestQueue.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCServerRequestQueue.m; sourceTree = ""; }; + B7A21E9E2E8EDD5F00BB1E14 /* BNCServerResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCServerResponse.m; sourceTree = ""; }; + B7A21E9F2E8EDD5F00BB1E14 /* BNCSKAdNetwork.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCSKAdNetwork.m; sourceTree = ""; }; + B7A21EA02E8EDD5F00BB1E14 /* BNCSpotlightService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCSpotlightService.m; sourceTree = ""; }; + B7A21EA12E8EDD5F00BB1E14 /* BNCSystemObserver.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCSystemObserver.m; sourceTree = ""; }; + B7A21EA22E8EDD5F00BB1E14 /* BNCURLFilter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCURLFilter.m; sourceTree = ""; }; + B7A21EA32E8EDD5F00BB1E14 /* BNCUrlQueryParameter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCUrlQueryParameter.m; sourceTree = ""; }; + B7A21EA42E8EDD5F00BB1E14 /* BNCUserAgentCollector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCUserAgentCollector.m; sourceTree = ""; }; + B7A21EA52E8EDD5F00BB1E14 /* Branch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Branch.m; sourceTree = ""; }; + B7A21EA62E8EDD5F00BB1E14 /* Branch-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Branch-Bridging-Header.h"; sourceTree = ""; }; + B7A21EA72E8EDD5F00BB1E14 /* Branch+Validator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Branch+Validator.m"; sourceTree = ""; }; + B7A21EA82E8EDD5F00BB1E14 /* BranchActivityItemProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchActivityItemProvider.m; sourceTree = ""; }; + B7A21EA92E8EDD5F00BB1E14 /* BranchConfigurationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchConfigurationController.m; sourceTree = ""; }; + B7A21EAA2E8EDD5F00BB1E14 /* BranchConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchConstants.m; sourceTree = ""; }; + B7A21EAB2E8EDD5F00BB1E14 /* BranchContentDiscoverer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchContentDiscoverer.m; sourceTree = ""; }; + B7A21EAC2E8EDD5F00BB1E14 /* BranchContentDiscoveryManifest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchContentDiscoveryManifest.m; sourceTree = ""; }; + B7A21EAD2E8EDD5F00BB1E14 /* BranchContentPathProperties.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchContentPathProperties.m; sourceTree = ""; }; + B7A21EAE2E8EDD5F00BB1E14 /* BranchCSSearchableItemAttributeSet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchCSSearchableItemAttributeSet.m; sourceTree = ""; }; + B7A21EAF2E8EDD5F00BB1E14 /* BranchDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchDelegate.m; sourceTree = ""; }; + B7A21EB02E8EDD5F00BB1E14 /* BranchEvent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchEvent.m; sourceTree = ""; }; + B7A21EB12E8EDD5F00BB1E14 /* BranchFileLogger.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchFileLogger.m; sourceTree = ""; }; + B7A21EB22E8EDD5F00BB1E14 /* BranchInstallRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchInstallRequest.m; sourceTree = ""; }; + B7A21EB32E8EDD5F00BB1E14 /* BranchJsonConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchJsonConfig.m; sourceTree = ""; }; + B7A21EB42E8EDD5F00BB1E14 /* BranchLastAttributedTouchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchLastAttributedTouchData.m; sourceTree = ""; }; + B7A21EB52E8EDD5F00BB1E14 /* BranchLATDRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchLATDRequest.m; sourceTree = ""; }; + B7A21EB62E8EDD5F00BB1E14 /* BranchLinkProperties.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchLinkProperties.m; sourceTree = ""; }; + B7A21EB72E8EDD5F00BB1E14 /* BranchLogger.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchLogger.m; sourceTree = ""; }; + B7A21EB82E8EDD5F00BB1E14 /* BranchOpenRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchOpenRequest.m; sourceTree = ""; }; + B7A21EB92E8EDD5F00BB1E14 /* BranchPasteControl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchPasteControl.m; sourceTree = ""; }; + B7A21EBA2E8EDD5F00BB1E14 /* BranchPluginSupport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchPluginSupport.m; sourceTree = ""; }; + B7A21EBB2E8EDD5F00BB1E14 /* BranchQRCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchQRCode.m; sourceTree = ""; }; + B7A21EBC2E8EDD5F00BB1E14 /* BranchScene.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchScene.m; sourceTree = ""; }; + B7A21EBD2E8EDD5F00BB1E14 /* BranchShareLink.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchShareLink.m; sourceTree = ""; }; + B7A21EBE2E8EDD5F00BB1E14 /* BranchShortUrlRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchShortUrlRequest.m; sourceTree = ""; }; + B7A21EBF2E8EDD5F00BB1E14 /* BranchShortUrlSyncRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchShortUrlSyncRequest.m; sourceTree = ""; }; + B7A21EC02E8EDD5F00BB1E14 /* BranchSpotlightUrlRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchSpotlightUrlRequest.m; sourceTree = ""; }; + B7A21EC12E8EDD5F00BB1E14 /* BranchUniversalObject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchUniversalObject.m; sourceTree = ""; }; + B7A21EC22E8EDD5F00BB1E14 /* NSError+Branch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSError+Branch.m"; sourceTree = ""; }; + B7A21EC32E8EDD5F00BB1E14 /* NSMutableDictionary+Branch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSMutableDictionary+Branch.m"; sourceTree = ""; }; + B7A21EC42E8EDD5F00BB1E14 /* NSString+Branch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+Branch.m"; sourceTree = ""; }; + B7A21EC52E8EDD5F00BB1E14 /* UIViewController+Branch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Branch.m"; sourceTree = ""; }; + B9BB25109C12DC8BD2D2F665 /* BranchRequestQueue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BranchRequestQueue.swift; path = ../Sources/BranchSwiftSDK/BranchRequestQueue.swift; sourceTree = SOURCE_ROOT; }; C10A6DE029A97E440061A851 /* TestStoreKitConfig.storekit */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestStoreKitConfig.storekit; sourceTree = ""; }; C10A6DE529A995590061A851 /* StoreKitTestCertificate.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = StoreKitTestCertificate.cer; sourceTree = ""; }; C10C61A9282481FB00761D7E /* BranchShareLinkTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchShareLinkTests.m; sourceTree = ""; }; @@ -556,6 +588,7 @@ C1614D55285BC8A00098946B /* LinkPresentation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LinkPresentation.framework; path = System/Library/Frameworks/LinkPresentation.framework; sourceTree = SDKROOT; }; C17DAF7A2AC20C2000B16B1A /* BranchClassTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchClassTests.m; sourceTree = ""; }; C1CC888129BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCReferringURLUtilityTests.m; sourceTree = ""; }; + D8B1EA48C972289E75C4943A /* ConfigurationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ConfigurationController.swift; path = ../Sources/BranchSwiftSDK/ConfigurationController.swift; sourceTree = SOURCE_ROOT; }; E51F64292CF46899000858D2 /* BranchFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchFileLogger.h; sourceTree = ""; }; E563942F2CC7AC9500E18E65 /* BranchFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchFileLogger.m; sourceTree = ""; }; E71E397A2DD3C14800110F59 /* BNCInAppBrowser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCInAppBrowser.h; sourceTree = ""; }; @@ -571,8 +604,6 @@ E7AC74782DB06D47002D8C40 /* NSError+Branch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSError+Branch.h"; sourceTree = ""; }; E7AC747D2DB07145002D8C40 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/lib/libc++.tbd"; sourceTree = DEVELOPER_DIR; }; E7AE4A082DFB2C4400696805 /* BranchConfigurationControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchConfigurationControllerTests.m; sourceTree = ""; }; - E7CA74B12E1B4890002EFB40 /* BranchConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BranchConstants.h; path = ../Sources/BranchSDK_ObjC/Public/BranchConstants.h; sourceTree = SOURCE_ROOT; }; - E7CA74B32E1B4944002EFB40 /* ConfigurationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ConfigurationController.swift; path = ../Sources/BranchSDK_Swift/ConfigurationController.swift; sourceTree = SOURCE_ROOT; }; E7E28EC82DD2424C00F75D0D /* BNCInAppBrowser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCInAppBrowser.m; sourceTree = ""; }; F1D4F9AC1F323F01002D13FF /* Branch-TestBed-UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Branch-TestBed-UITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -586,6 +617,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 40EA3FC7C54A6B3CCEBDB9F8 /* (null) in Frameworks */, + 5AFDEF31D95DB3252A8F146D /* (null) in Frameworks */, 5F92B2362383644C00CA909B /* SystemConfiguration.framework in Frameworks */, 5F205D05231864E800C776D1 /* WebKit.framework in Frameworks */, 5FF7D2862A9549B40049158D /* AdServices.framework in Frameworks */, @@ -602,7 +635,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5F8B7B4021B5F5CD009CE0A6 /* libBranch.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -616,7 +648,6 @@ 670016661940F51400A9E103 /* CoreGraphics.framework in Frameworks */, 67F270891BA9FCFF002546A7 /* CoreSpotlight.framework in Frameworks */, 670016641940F51400A9E103 /* Foundation.framework in Frameworks */, - 466B58811B1778DB00A69EDE /* libBranch.a in Frameworks */, 670016681940F51400A9E103 /* UIKit.framework in Frameworks */, 5F42763325DB3694005B9BBC /* AdServices.framework in Frameworks */, ); @@ -634,10 +665,6 @@ buildActionMask = 2147483647; files = ( E7AC747E2DB0714B002D8C40 /* libc++.tbd in Frameworks */, - E7AC747B2DB0700D002D8C40 /* BranchSDK in Frameworks */, - E7AC74752DB069B2002D8C40 /* nanopb in Frameworks */, - E7AC74722DB06992002D8C40 /* GULNetwork in Frameworks */, - E7AC74702DB06992002D8C40 /* GULLogger in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -645,7 +672,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0372076425E8418F00F29C30 /* libBranch.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -722,90 +748,6 @@ path = "Branch-TestBed-UITests"; sourceTree = ""; }; - 5F644B252B7AA810000DCD78 /* BranchSDK */ = { - isa = PBXGroup; - children = ( - E7CA74B32E1B4944002EFB40 /* ConfigurationController.swift */, - E563942F2CC7AC9500E18E65 /* BranchFileLogger.m */, - 5F644BB02B7AA811000DCD78 /* BNCAppGroupsData.m */, - 5F644BA82B7AA811000DCD78 /* BNCAppleReceipt.m */, - 5F644B2B2B7AA810000DCD78 /* BNCApplication.m */, - 5F644BB72B7AA811000DCD78 /* BNCCallbackMap.m */, - 5F644B3D2B7AA810000DCD78 /* BNCConfig.m */, - 5F644B322B7AA810000DCD78 /* BNCContentDiscoveryManager.m */, - 5F644B492B7AA810000DCD78 /* BNCCrashlyticsWrapper.m */, - 5F644BA32B7AA811000DCD78 /* BNCCurrency.m */, - 5F644B302B7AA810000DCD78 /* BNCDeepLinkViewControllerInstance.m */, - 5F644B432B7AA810000DCD78 /* BNCDeviceInfo.m */, - 5F644B2C2B7AA810000DCD78 /* BNCDeviceSystem.m */, - 5F644B282B7AA810000DCD78 /* BNCEncodingUtils.m */, - 5F644BB82B7AA811000DCD78 /* BNCEventUtils.m */, - 5F644BAA2B7AA811000DCD78 /* BNCInitSessionResponse.m */, - E7E28EC82DD2424C00F75D0D /* BNCInAppBrowser.m */, - 5F644BA22B7AA811000DCD78 /* BNCJSONUtility.m */, - 5F644B512B7AA810000DCD78 /* BNCKeyChain.m */, - 5F644BAB2B7AA811000DCD78 /* BNCLinkCache.m */, - E7AC74772DB06D05002D8C40 /* NSError+Branch.m */, - 5F644BA02B7AA811000DCD78 /* BNCLinkData.m */, - 5F644B3B2B7AA810000DCD78 /* BNCNetworkInterface.m */, - 5F644B442B7AA810000DCD78 /* BNCNetworkService.m */, - 5F644B4D2B7AA810000DCD78 /* BNCPartnerParameters.m */, - 5F644BA72B7AA811000DCD78 /* BNCPasteboard.m */, - 5F644B3C2B7AA810000DCD78 /* BNCPreferenceHelper.m */, - 5F644B482B7AA810000DCD78 /* BNCProductCategory.m */, - 5F644BB52B7AA811000DCD78 /* BNCQRCodeCache.m */, - 5F644B452B7AA810000DCD78 /* BNCReachability.m */, - 5F644B472B7AA810000DCD78 /* BNCReferringURLUtility.m */, - 5F644B462B7AA810000DCD78 /* BNCRequestFactory.m */, - 5F644BAD2B7AA811000DCD78 /* BNCServerAPI.m */, - 5F644B4A2B7AA810000DCD78 /* BNCServerInterface.m */, - 5F644B3A2B7AA810000DCD78 /* BNCServerRequest.m */, - 5F644B2E2B7AA810000DCD78 /* BNCServerRequestQueue.m */, - 5F644BB12B7AA811000DCD78 /* BNCServerResponse.m */, - 5F644BA52B7AA811000DCD78 /* BNCSKAdNetwork.m */, - 5F644BAC2B7AA811000DCD78 /* BNCSpotlightService.m */, - 5F644B372B7AA810000DCD78 /* BNCSystemObserver.m */, - 5F644B392B7AA810000DCD78 /* BNCURLFilter.m */, - 5F644B2F2B7AA810000DCD78 /* BNCUrlQueryParameter.m */, - 5F644B272B7AA810000DCD78 /* BNCUserAgentCollector.m */, - E7AC74582DB063C6002D8C40 /* BNCODMInfoCollector.m */, - 5F644BA12B7AA811000DCD78 /* Branch.m */, - 5F644B332B7AA810000DCD78 /* Branch+Validator.m */, - 5F644B4F2B7AA810000DCD78 /* BranchActivityItemProvider.m */, - 5F644B3E2B7AA810000DCD78 /* BranchConstants.m */, - 5F644B422B7AA810000DCD78 /* BranchContentDiscoverer.m */, - 5F644B3F2B7AA810000DCD78 /* BranchContentDiscoveryManifest.m */, - 5F644BA62B7AA811000DCD78 /* BranchContentPathProperties.m */, - 5F644B4E2B7AA810000DCD78 /* BranchCSSearchableItemAttributeSet.m */, - 5F644B9F2B7AA811000DCD78 /* BranchDelegate.m */, - 5F644BB22B7AA811000DCD78 /* BranchEvent.m */, - 5F644B342B7AA810000DCD78 /* BranchInstallRequest.m */, - 5F644B4B2B7AA810000DCD78 /* BranchJsonConfig.m */, - 5F644BA42B7AA811000DCD78 /* BranchLastAttributedTouchData.m */, - 5F644B4C2B7AA810000DCD78 /* BranchLATDRequest.m */, - 5F644BA92B7AA811000DCD78 /* BranchLinkProperties.m */, - 5F5FDA0F2B7DE20800F14A43 /* BranchLogger.m */, - 5F644BB42B7AA811000DCD78 /* BranchOpenRequest.m */, - 5F644B2A2B7AA810000DCD78 /* BranchPasteControl.m */, - 5F644B352B7AA810000DCD78 /* BranchPluginSupport.m */, - 5F644B502B7AA810000DCD78 /* BranchQRCode.m */, - 5F644B312B7AA810000DCD78 /* BranchScene.m */, - 5F644BAE2B7AA811000DCD78 /* BranchShareLink.m */, - 5F644BB32B7AA811000DCD78 /* BranchShortUrlRequest.m */, - 5F644BB62B7AA811000DCD78 /* BranchShortUrlSyncRequest.m */, - 5F644B402B7AA810000DCD78 /* BranchSpotlightUrlRequest.m */, - 5F644B292B7AA810000DCD78 /* BranchUniversalObject.m */, - 5F644B262B7AA810000DCD78 /* NSError+Branch.m */, - 5F644B2D2B7AA810000DCD78 /* NSMutableDictionary+Branch.m */, - 5F644B362B7AA810000DCD78 /* NSString+Branch.m */, - 5F644BAF2B7AA811000DCD78 /* UIViewController+Branch.m */, - 5F644B6E2B7AA810000DCD78 /* Private */, - 5F644B522B7AA810000DCD78 /* Public */, - ); - name = BranchSDK; - path = ../Sources/BranchSDK; - sourceTree = ""; - }; 5F644B522B7AA810000DCD78 /* Public */ = { isa = PBXGroup; children = ( @@ -835,7 +777,6 @@ 5F644B692B7AA810000DCD78 /* BranchPluginSupport.h */, 5F644B552B7AA810000DCD78 /* BranchQRCode.h */, 5F644B6A2B7AA810000DCD78 /* BranchScene.h */, - 5F644B592B7AA810000DCD78 /* BranchSDK.h */, 5F644B5F2B7AA810000DCD78 /* BranchShareLink.h */, 5F644B662B7AA810000DCD78 /* BranchUniversalObject.h */, ); @@ -926,7 +867,6 @@ 6589EBA52674270100F2E28B /* Branch-TestBed-CI.xctestplan */, 033FC71025AC1E5800D8319E /* Branch-TestBed.xctestplan */, 4D93D8592098CC4400CFABA6 /* README.md */, - 5F644B252B7AA810000DCD78 /* BranchSDK */, 4D16837A2098C901008819E3 /* Branch-SDK-Tests */, 5F8B7B3C21B5F5CD009CE0A6 /* Branch-SDK-Unhosted-Tests */, 670016691940F51400A9E103 /* Branch-TestBed */, @@ -943,7 +883,6 @@ children = ( 670016601940F51400A9E103 /* Branch-TestBed.app */, 7E6B3B511AA42D0E005F45BF /* Branch-SDK-Tests.xctest */, - 466B58381B17773000A69EDE /* libBranch.a */, F1D4F9AC1F323F01002D13FF /* Branch-TestBed-UITests.xctest */, 5F8B7B3B21B5F5CD009CE0A6 /* Branch-SDK-Unhosted-Tests.xctest */, E7AC74602DB064BC002D8C40 /* Reflection_ODM_Tests.xctest */, @@ -1013,6 +952,97 @@ name = "Supporting Files"; sourceTree = ""; }; + B7A21E5C2E8EDD5F00BB1E14 /* Private */ = { + isa = PBXGroup; + children = ( + B7A21E2B2E8EDD5F00BB1E14 /* BNCAppGroupsData.h */, + B7A21E2C2E8EDD5F00BB1E14 /* BNCAppleReceipt.h */, + B7A21E2D2E8EDD5F00BB1E14 /* BNCApplication.h */, + B7A21E2E2E8EDD5F00BB1E14 /* BNCCallbackMap.h */, + B7A21E2F2E8EDD5F00BB1E14 /* BNCConfig.h */, + B7A21E302E8EDD5F00BB1E14 /* BNCContentDiscoveryManager.h */, + B7A21E312E8EDD5F00BB1E14 /* BNCCrashlyticsWrapper.h */, + B7A21E322E8EDD5F00BB1E14 /* BNCDeepLinkViewControllerInstance.h */, + B7A21E332E8EDD5F00BB1E14 /* BNCDeviceInfo.h */, + B7A21E342E8EDD5F00BB1E14 /* BNCDeviceSystem.h */, + B7A21E352E8EDD5F00BB1E14 /* BNCEncodingUtils.h */, + B7A21E362E8EDD5F00BB1E14 /* BNCEventUtils.h */, + B7A21E372E8EDD5F00BB1E14 /* BNCInAppBrowser.h */, + B7A21E382E8EDD5F00BB1E14 /* BNCJSONUtility.h */, + B7A21E392E8EDD5F00BB1E14 /* BNCKeyChain.h */, + B7A21E3A2E8EDD5F00BB1E14 /* BNCNetworkInterface.h */, + B7A21E3B2E8EDD5F00BB1E14 /* BNCNetworkService.h */, + B7A21E3C2E8EDD5F00BB1E14 /* BNCODMInfoCollector.h */, + B7A21E3D2E8EDD5F00BB1E14 /* BNCPartnerParameters.h */, + B7A21E3E2E8EDD5F00BB1E14 /* BNCPasteboard.h */, + B7A21E3F2E8EDD5F00BB1E14 /* BNCQRCodeCache.h */, + B7A21E402E8EDD5F00BB1E14 /* BNCReachability.h */, + B7A21E412E8EDD5F00BB1E14 /* BNCReferringURLUtility.h */, + B7A21E422E8EDD5F00BB1E14 /* BNCRequestFactory.h */, + B7A21E432E8EDD5F00BB1E14 /* BNCServerAPI.h */, + B7A21E442E8EDD5F00BB1E14 /* BNCServerRequestOperation.h */, + B7A21E452E8EDD5F00BB1E14 /* BNCSKAdNetwork.h */, + B7A21E462E8EDD5F00BB1E14 /* BNCSpotlightService.h */, + B7A21E472E8EDD5F00BB1E14 /* BNCSystemObserver.h */, + B7A21E482E8EDD5F00BB1E14 /* BNCURLFilter.h */, + B7A21E492E8EDD5F00BB1E14 /* BNCUrlQueryParameter.h */, + B7A21E4A2E8EDD5F00BB1E14 /* BNCUserAgentCollector.h */, + B7A21E4B2E8EDD5F00BB1E14 /* Branch+Validator.h */, + B7A21E4C2E8EDD5F00BB1E14 /* BranchConfigurationController.h */, + B7A21E4D2E8EDD5F00BB1E14 /* BranchContentDiscoverer.h */, + B7A21E4E2E8EDD5F00BB1E14 /* BranchContentDiscoveryManifest.h */, + B7A21E4F2E8EDD5F00BB1E14 /* BranchContentPathProperties.h */, + B7A21E502E8EDD5F00BB1E14 /* BranchFileLogger.h */, + B7A21E512E8EDD5F00BB1E14 /* BranchInstallRequest.h */, + B7A21E522E8EDD5F00BB1E14 /* BranchJsonConfig.h */, + B7A21E532E8EDD5F00BB1E14 /* BranchLATDRequest.h */, + B7A21E542E8EDD5F00BB1E14 /* BranchOpenRequest.h */, + B7A21E552E8EDD5F00BB1E14 /* BranchShortUrlRequest.h */, + B7A21E562E8EDD5F00BB1E14 /* BranchShortUrlSyncRequest.h */, + B7A21E572E8EDD5F00BB1E14 /* BranchSpotlightUrlRequest.h */, + B7A21E582E8EDD5F00BB1E14 /* NSError+Branch.h */, + B7A21E592E8EDD5F00BB1E14 /* NSMutableDictionary+Branch.h */, + B7A21E5A2E8EDD5F00BB1E14 /* NSString+Branch.h */, + B7A21E5B2E8EDD5F00BB1E14 /* UIViewController+Branch.h */, + ); + path = Private; + sourceTree = ""; + }; + B7A21E7A2E8EDD5F00BB1E14 /* Public */ = { + isa = PBXGroup; + children = ( + B7A21E5D2E8EDD5F00BB1E14 /* BNCCallbacks.h */, + B7A21E5E2E8EDD5F00BB1E14 /* BNCCurrency.h */, + B7A21E5F2E8EDD5F00BB1E14 /* BNCInitSessionResponse.h */, + B7A21E602E8EDD5F00BB1E14 /* BNCLinkCache.h */, + B7A21E612E8EDD5F00BB1E14 /* BNCLinkData.h */, + B7A21E622E8EDD5F00BB1E14 /* BNCNetworkServiceProtocol.h */, + B7A21E632E8EDD5F00BB1E14 /* BNCPreferenceHelper.h */, + B7A21E642E8EDD5F00BB1E14 /* BNCProductCategory.h */, + B7A21E652E8EDD5F00BB1E14 /* BNCServerInterface.h */, + B7A21E662E8EDD5F00BB1E14 /* BNCServerRequest.h */, + B7A21E672E8EDD5F00BB1E14 /* BNCServerRequestQueue.h */, + B7A21E682E8EDD5F00BB1E14 /* BNCServerResponse.h */, + B7A21E692E8EDD5F00BB1E14 /* Branch.h */, + B7A21E6A2E8EDD5F00BB1E14 /* BranchActivityItemProvider.h */, + B7A21E6B2E8EDD5F00BB1E14 /* BranchConstants.h */, + B7A21E6C2E8EDD5F00BB1E14 /* BranchCSSearchableItemAttributeSet.h */, + B7A21E6D2E8EDD5F00BB1E14 /* BranchDeepLinkingController.h */, + B7A21E6E2E8EDD5F00BB1E14 /* BranchDelegate.h */, + B7A21E6F2E8EDD5F00BB1E14 /* BranchEvent.h */, + B7A21E702E8EDD5F00BB1E14 /* BranchLastAttributedTouchData.h */, + B7A21E712E8EDD5F00BB1E14 /* BranchLinkProperties.h */, + B7A21E722E8EDD5F00BB1E14 /* BranchLogger.h */, + B7A21E732E8EDD5F00BB1E14 /* BranchPasteControl.h */, + B7A21E742E8EDD5F00BB1E14 /* BranchPluginSupport.h */, + B7A21E752E8EDD5F00BB1E14 /* BranchQRCode.h */, + B7A21E762E8EDD5F00BB1E14 /* BranchScene.h */, + B7A21E782E8EDD5F00BB1E14 /* BranchShareLink.h */, + B7A21E792E8EDD5F00BB1E14 /* BranchUniversalObject.h */, + ); + path = Public; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -1027,7 +1057,6 @@ 5F644BE82B7AA811000DCD78 /* BranchActivityItemProvider.h in Headers */, 5F644BE92B7AA811000DCD78 /* BranchCSSearchableItemAttributeSet.h in Headers */, 5F644BEA2B7AA811000DCD78 /* BranchLinkProperties.h in Headers */, - 5F644BEB2B7AA811000DCD78 /* BranchSDK.h in Headers */, 5F644BEC2B7AA811000DCD78 /* BNCCurrency.h in Headers */, 5F644BED2B7AA811000DCD78 /* BranchLastAttributedTouchData.h in Headers */, 5F644BEE2B7AA811000DCD78 /* Branch.h in Headers */, @@ -1115,8 +1144,9 @@ dependencies = ( ); name = Branch; + packageProductDependencies = ( + ); productName = Branch; - productReference = 466B58381B17773000A69EDE /* libBranch.a */; productType = "com.apple.product-type.library.static"; }; 5F8B7B3A21B5F5CD009CE0A6 /* Branch-SDK-Unhosted-Tests */ = { @@ -1130,7 +1160,6 @@ buildRules = ( ); dependencies = ( - 5F8B7B4221B5F5CD009CE0A6 /* PBXTargetDependency */, ); name = "Branch-SDK-Unhosted-Tests"; productName = "Branch-SDK-Unhosted-Tests"; @@ -1149,9 +1178,11 @@ buildRules = ( ); dependencies = ( - 466B58701B1777DE00A69EDE /* PBXTargetDependency */, ); name = "Branch-TestBed"; + packageProductDependencies = ( + B77CB6C62E8EE36300FDF144 /* BranchSDK */, + ); productName = "Branch-TestBed"; productReference = 670016601940F51400A9E103 /* Branch-TestBed.app */; productType = "com.apple.product-type.application"; @@ -1168,8 +1199,6 @@ buildRules = ( ); dependencies = ( - 4683F07C1B20AC6300A432E7 /* PBXTargetDependency */, - 4D337DDD201019B8009A5774 /* PBXTargetDependency */, ); name = "Branch-SDK-Tests"; productName = "Branch-SDK Functionality Tests"; @@ -1187,18 +1216,11 @@ buildRules = ( ); dependencies = ( - E7AC74662DB064BC002D8C40 /* PBXTargetDependency */, ); fileSystemSynchronizedGroups = ( E7AC74612DB064BC002D8C40 /* Reflection_ODM_Tests */, ); name = Reflection_ODM_Tests; - packageProductDependencies = ( - E7AC746F2DB06992002D8C40 /* GULLogger */, - E7AC74712DB06992002D8C40 /* GULNetwork */, - E7AC74742DB069B2002D8C40 /* nanopb */, - E7AC747A2DB0700D002D8C40 /* BranchSDK */, - ); productName = Reflection_ODM_Tests; productReference = E7AC74602DB064BC002D8C40 /* Reflection_ODM_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -1214,7 +1236,6 @@ buildRules = ( ); dependencies = ( - F1D4F9B21F323F01002D13FF /* PBXTargetDependency */, ); name = "Branch-TestBed-UITests"; productName = "Branch-TestBedUITests"; @@ -1280,9 +1301,7 @@ ); mainGroup = 670016571940F51400A9E103; packageReferences = ( - E7AC746E2DB06992002D8C40 /* XCRemoteSwiftPackageReference "GoogleUtilities" */, - E7AC74732DB069B2002D8C40 /* XCRemoteSwiftPackageReference "nanopb" */, - E7AC74792DB0700D002D8C40 /* XCLocalSwiftPackageReference "../../ios-branch-deep-linking-attribution" */, + B77CB6C52E8EE36300FDF144 /* XCLocalSwiftPackageReference "../../ios-branch-deep-linking-attribution" */, ); productRefGroup = 670016611940F51400A9E103 /* Products */; projectDirPath = ""; @@ -1371,79 +1390,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E7CA74B42E1B4944002EFB40 /* ConfigurationController.swift in Sources */, - 5F644BB92B7AA811000DCD78 /* NSError+Branch.m in Sources */, - 5F644C482B7AA811000DCD78 /* BNCCallbackMap.m in Sources */, - 5F644BBE2B7AA811000DCD78 /* BNCApplication.m in Sources */, - 5F644C302B7AA811000DCD78 /* BranchDelegate.m in Sources */, - 5F5FDA102B7DE20800F14A43 /* BranchLogger.m in Sources */, - 5F644C3D2B7AA811000DCD78 /* BNCSpotlightService.m in Sources */, - 5F644BC02B7AA811000DCD78 /* NSMutableDictionary+Branch.m in Sources */, - 5F644BBC2B7AA811000DCD78 /* BranchUniversalObject.m in Sources */, - 5F644BE42B7AA811000DCD78 /* BNCKeyChain.m in Sources */, - 5F644BDE2B7AA811000DCD78 /* BranchJsonConfig.m in Sources */, - 5F644BE02B7AA811000DCD78 /* BNCPartnerParameters.m in Sources */, - 5F644BDF2B7AA811000DCD78 /* BranchLATDRequest.m in Sources */, - 5F644C382B7AA811000DCD78 /* BNCPasteboard.m in Sources */, - 5F644BE22B7AA811000DCD78 /* BranchActivityItemProvider.m in Sources */, - E7AC74592DB063C6002D8C40 /* BNCODMInfoCollector.m in Sources */, - 5F644BE12B7AA811000DCD78 /* BranchCSSearchableItemAttributeSet.m in Sources */, - 5F644BD92B7AA811000DCD78 /* BNCRequestFactory.m in Sources */, - 5F644BC32B7AA811000DCD78 /* BNCDeepLinkViewControllerInstance.m in Sources */, - 5F644C3C2B7AA811000DCD78 /* BNCLinkCache.m in Sources */, - 5F644C332B7AA811000DCD78 /* BNCJSONUtility.m in Sources */, - 5F644BDB2B7AA811000DCD78 /* BNCProductCategory.m in Sources */, - 5F644C322B7AA811000DCD78 /* Branch.m in Sources */, - 5F644BC72B7AA811000DCD78 /* BranchInstallRequest.m in Sources */, - 5F644BC62B7AA811000DCD78 /* Branch+Validator.m in Sources */, - 5F644BBA2B7AA811000DCD78 /* BNCUserAgentCollector.m in Sources */, - 5F644C362B7AA811000DCD78 /* BNCSKAdNetwork.m in Sources */, - 5F644BD02B7AA811000DCD78 /* BNCConfig.m in Sources */, - 5F644BD52B7AA811000DCD78 /* BranchContentDiscoverer.m in Sources */, - 5F644BBF2B7AA811000DCD78 /* BNCDeviceSystem.m in Sources */, - 5F644C412B7AA811000DCD78 /* BNCAppGroupsData.m in Sources */, - 5F644BBD2B7AA811000DCD78 /* BranchPasteControl.m in Sources */, - 5F644C492B7AA811000DCD78 /* BNCEventUtils.m in Sources */, - 5F644BD32B7AA811000DCD78 /* BranchSpotlightUrlRequest.m in Sources */, - 5F644BE32B7AA811000DCD78 /* BranchQRCode.m in Sources */, - 5F644BCA2B7AA811000DCD78 /* BNCSystemObserver.m in Sources */, - 5F644BC82B7AA811000DCD78 /* BranchPluginSupport.m in Sources */, - 5F644C462B7AA811000DCD78 /* BNCQRCodeCache.m in Sources */, - 5F644BD82B7AA811000DCD78 /* BNCReachability.m in Sources */, - 5F644BC92B7AA811000DCD78 /* NSString+Branch.m in Sources */, - 5F644C442B7AA811000DCD78 /* BranchShortUrlRequest.m in Sources */, - 5F644BDD2B7AA811000DCD78 /* BNCServerInterface.m in Sources */, - 5F644BC42B7AA811000DCD78 /* BranchScene.m in Sources */, - 5F644BBB2B7AA811000DCD78 /* BNCEncodingUtils.m in Sources */, - 5F644BD62B7AA811000DCD78 /* BNCDeviceInfo.m in Sources */, - 5F644BC22B7AA811000DCD78 /* BNCUrlQueryParameter.m in Sources */, - 5F644C3E2B7AA811000DCD78 /* BNCServerAPI.m in Sources */, - 5F644BD12B7AA811000DCD78 /* BranchConstants.m in Sources */, - 5F644C342B7AA811000DCD78 /* BNCCurrency.m in Sources */, - 5F644C472B7AA811000DCD78 /* BranchShortUrlSyncRequest.m in Sources */, - 5F644BC52B7AA811000DCD78 /* BNCContentDiscoveryManager.m in Sources */, - 5F644BCC2B7AA811000DCD78 /* BNCURLFilter.m in Sources */, - 5F644C352B7AA811000DCD78 /* BranchLastAttributedTouchData.m in Sources */, - 5F644BCE2B7AA811000DCD78 /* BNCNetworkInterface.m in Sources */, - 5F644BD72B7AA811000DCD78 /* BNCNetworkService.m in Sources */, - 5F644C402B7AA811000DCD78 /* UIViewController+Branch.m in Sources */, - 5F644BC12B7AA811000DCD78 /* BNCServerRequestQueue.m in Sources */, - E56394312CC7AC9F00E18E65 /* BranchFileLogger.m in Sources */, - 5F644C452B7AA811000DCD78 /* BranchOpenRequest.m in Sources */, - 5F644C312B7AA811000DCD78 /* BNCLinkData.m in Sources */, - E7E28ECA2DD2424C00F75D0D /* BNCInAppBrowser.m in Sources */, - 5F644BD22B7AA811000DCD78 /* BranchContentDiscoveryManifest.m in Sources */, - 5F644BDC2B7AA811000DCD78 /* BNCCrashlyticsWrapper.m in Sources */, - 5F644C3F2B7AA811000DCD78 /* BranchShareLink.m in Sources */, - 5F644BCD2B7AA811000DCD78 /* BNCServerRequest.m in Sources */, - 5F644C3A2B7AA811000DCD78 /* BranchLinkProperties.m in Sources */, - 5F644C432B7AA811000DCD78 /* BranchEvent.m in Sources */, - 5F644C392B7AA811000DCD78 /* BNCAppleReceipt.m in Sources */, - 5F644BDA2B7AA811000DCD78 /* BNCReferringURLUtility.m in Sources */, - 5F644C422B7AA811000DCD78 /* BNCServerResponse.m in Sources */, - 5F644C3B2B7AA811000DCD78 /* BNCInitSessionResponse.m in Sources */, - 5F644BCF2B7AA811000DCD78 /* BNCPreferenceHelper.m in Sources */, - 5F644C372B7AA811000DCD78 /* BranchContentPathProperties.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1543,39 +1489,6 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 466B58701B1777DE00A69EDE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 466B58371B17773000A69EDE /* Branch */; - targetProxy = 466B586F1B1777DE00A69EDE /* PBXContainerItemProxy */; - }; - 4683F07C1B20AC6300A432E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 466B58371B17773000A69EDE /* Branch */; - targetProxy = 4683F07B1B20AC6300A432E7 /* PBXContainerItemProxy */; - }; - 4D337DDD201019B8009A5774 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 6700165F1940F51400A9E103 /* Branch-TestBed */; - targetProxy = 4D337DDC201019B8009A5774 /* PBXContainerItemProxy */; - }; - 5F8B7B4221B5F5CD009CE0A6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 466B58371B17773000A69EDE /* Branch */; - targetProxy = 5F8B7B4121B5F5CD009CE0A6 /* PBXContainerItemProxy */; - }; - E7AC74662DB064BC002D8C40 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 466B58371B17773000A69EDE /* Branch */; - targetProxy = E7AC74652DB064BC002D8C40 /* PBXContainerItemProxy */; - }; - F1D4F9B21F323F01002D13FF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 6700165F1940F51400A9E103 /* Branch-TestBed */; - targetProxy = F1D4F9B11F323F01002D13FF /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin PBXVariantGroup section */ 6700166C1940F51400A9E103 /* InfoPlist.strings */ = { isa = PBXVariantGroup; @@ -1600,6 +1513,9 @@ "DEBUG=1", "$(inherited)", ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + ); IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = "-ObjC"; @@ -1607,6 +1523,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = /headers; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1619,6 +1536,9 @@ DEFINES_MODULE = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + ); IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = "-ObjC"; @@ -1626,6 +1546,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = /headers; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -2069,49 +1990,16 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - E7AC74792DB0700D002D8C40 /* XCLocalSwiftPackageReference "../../ios-branch-deep-linking-attribution" */ = { + B77CB6C52E8EE36300FDF144 /* XCLocalSwiftPackageReference "../../ios-branch-deep-linking-attribution" */ = { isa = XCLocalSwiftPackageReference; relativePath = "../../ios-branch-deep-linking-attribution"; }; /* End XCLocalSwiftPackageReference section */ -/* Begin XCRemoteSwiftPackageReference section */ - E7AC746E2DB06992002D8C40 /* XCRemoteSwiftPackageReference "GoogleUtilities" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/google/GoogleUtilities"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 8.0.2; - }; - }; - E7AC74732DB069B2002D8C40 /* XCRemoteSwiftPackageReference "nanopb" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/nanopb/nanopb"; - requirement = { - kind = revision; - revision = b7e1104502eca3a213b46303391ca4d3bc8ddec1; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - /* Begin XCSwiftPackageProductDependency section */ - E7AC746F2DB06992002D8C40 /* GULLogger */ = { - isa = XCSwiftPackageProductDependency; - package = E7AC746E2DB06992002D8C40 /* XCRemoteSwiftPackageReference "GoogleUtilities" */; - productName = GULLogger; - }; - E7AC74712DB06992002D8C40 /* GULNetwork */ = { - isa = XCSwiftPackageProductDependency; - package = E7AC746E2DB06992002D8C40 /* XCRemoteSwiftPackageReference "GoogleUtilities" */; - productName = GULNetwork; - }; - E7AC74742DB069B2002D8C40 /* nanopb */ = { - isa = XCSwiftPackageProductDependency; - package = E7AC74732DB069B2002D8C40 /* XCRemoteSwiftPackageReference "nanopb" */; - productName = nanopb; - }; - E7AC747A2DB0700D002D8C40 /* BranchSDK */ = { + B77CB6C62E8EE36300FDF144 /* BranchSDK */ = { isa = XCSwiftPackageProductDependency; + package = B77CB6C52E8EE36300FDF144 /* XCLocalSwiftPackageReference "../" */; productName = BranchSDK; }; /* End XCSwiftPackageProductDependency section */ diff --git a/Branch-TestBed/Branch-TestBed.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Branch-TestBed/Branch-TestBed.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index cd1bf1554..000000000 --- a/Branch-TestBed/Branch-TestBed.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,23 +0,0 @@ -{ - "originHash" : "d56bc7728e41c97a44136d6183fac55f67109eb4ddd481e77850df5331f07c38", - "pins" : [ - { - "identity" : "googleutilities", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleUtilities", - "state" : { - "revision" : "53156c7ec267db846e6b64c9f4c4e31ba4cf75eb", - "version" : "8.0.2" - } - }, - { - "identity" : "nanopb", - "kind" : "remoteSourceControl", - "location" : "https://github.com/nanopb/nanopb", - "state" : { - "revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1" - } - } - ], - "version" : 3 -} diff --git a/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Branch-SDK-Tests.xcscheme b/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Branch-SDK-Tests.xcscheme index 1f130cd47..461595a04 100644 --- a/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Branch-SDK-Tests.xcscheme +++ b/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Branch-SDK-Tests.xcscheme @@ -1,6 +1,6 @@ + + + + diff --git a/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Branch-SDK-Unhosted-Tests.xcscheme b/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Branch-SDK-Unhosted-Tests.xcscheme index 40a19b5ba..8cd35e0b8 100644 --- a/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Branch-SDK-Unhosted-Tests.xcscheme +++ b/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Branch-SDK-Unhosted-Tests.xcscheme @@ -1,6 +1,6 @@ @@ -34,7 +34,7 @@ @@ -83,7 +83,7 @@ @@ -99,7 +99,7 @@ diff --git a/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Reflection_ODM_Tests.xcscheme b/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Reflection_ODM_Tests.xcscheme index 84c83c2f5..ea6854043 100644 --- a/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Reflection_ODM_Tests.xcscheme +++ b/Branch-TestBed/Branch-TestBed.xcodeproj/xcshareddata/xcschemes/Reflection_ODM_Tests.xcscheme @@ -1,6 +1,6 @@ @end diff --git a/Branch-TestBed/Branch-TestBed/PasteControlViewController.m b/Branch-TestBed/Branch-TestBed/PasteControlViewController.m index aa702c70b..4349ac9e1 100644 --- a/Branch-TestBed/Branch-TestBed/PasteControlViewController.m +++ b/Branch-TestBed/Branch-TestBed/PasteControlViewController.m @@ -7,9 +7,7 @@ // #import "PasteControlViewController.h" -#import "Branch.h" -#import "BranchOpenRequest.h" -#import "BranchPasteControl.h" +@import BranchSDK; #import "LogOutputViewController.h" #import "AppDelegate.h" diff --git a/Branch-TestBed/Branch-TestBed/ViewController.m b/Branch-TestBed/Branch-TestBed/ViewController.m index 994b689d4..b094206df 100644 --- a/Branch-TestBed/Branch-TestBed/ViewController.m +++ b/Branch-TestBed/Branch-TestBed/ViewController.m @@ -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 diff --git a/Branch-TestBed/Reflection_ODM_Tests.xctestplan b/Branch-TestBed/Reflection_ODM_Tests.xctestplan index 2130d2322..dd8cbb34e 100644 --- a/Branch-TestBed/Reflection_ODM_Tests.xctestplan +++ b/Branch-TestBed/Reflection_ODM_Tests.xctestplan @@ -14,6 +14,11 @@ "testTargets" : [ { "parallelizable" : true, + "skippedTests" : [ + "Reflection_ODM_Tests", + "Reflection_ODM_Tests\/testODMAPICall", + "Reflection_ODM_Tests\/testODMAPIsLoaded" + ], "target" : { "containerPath" : "container:Branch-TestBed.xcodeproj", "identifier" : "E7AC745F2DB064BC002D8C40", diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/Info.plist b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/Info.plist deleted file mode 100755 index 93a878439..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - AvailableLibraries - - - LibraryIdentifier - ios-arm64 - LibraryPath - AppAdsOnDeviceConversion.framework - SupportedArchitectures - - arm64 - - SupportedPlatform - ios - - - LibraryIdentifier - ios-arm64_x86_64-simulator - LibraryPath - AppAdsOnDeviceConversion.framework - SupportedArchitectures - - arm64 - x86_64 - - SupportedPlatform - ios - SupportedPlatformVariant - simulator - - - CFBundlePackageType - XFWK - XCFrameworkFormatVersion - 1.0 - - diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/AppAdsOnDeviceConversion b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/AppAdsOnDeviceConversion deleted file mode 100755 index fa2869aa1..000000000 Binary files a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/AppAdsOnDeviceConversion and /dev/null differ diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Headers/AppAdsOnDeviceConversion.h b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Headers/AppAdsOnDeviceConversion.h deleted file mode 100755 index a66e1722c..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Headers/AppAdsOnDeviceConversion.h +++ /dev/null @@ -1,2 +0,0 @@ -#import -#import diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Headers/ODCConversionManager.h b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Headers/ODCConversionManager.h deleted file mode 100755 index 3319bb50e..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Headers/ODCConversionManager.h +++ /dev/null @@ -1,44 +0,0 @@ -#import - -#import "ODCConversionTypes.h" - -NS_ASSUME_NONNULL_BEGIN - -/// The top level on-device conversion manager singleton that provides methods for fetching the -/// aggregate conversion info for conversion reports. -NS_SWIFT_NAME(ConversionManager) -@interface ODCConversionManager : NSObject - -/// Returns the shared ConversionManager instance. -@property(class, nonatomic, readonly) ODCConversionManager *sharedInstance; - -/// The SDK version in the format of three period-separated integers, such as "10.14.1". -@property(nonatomic, readonly) NSString *versionString; - -/// Sets the timestamp when the application was first launched. -/// @param firstLaunchTime The timestamp when the application was first launched. -- (void)setFirstLaunchTime:(NSDate *)firstLaunchTime; - -/// Asynchronously fetches the aggregate conversion info of the current app instance for conversion -/// reports. -/// -/// The aggregate conversion info fetch could fail due to network failures etc. -/// -/// @param interaction The type of interaction to fetch. -/// @param completion The completion handler to call when the fetch is complete. This handler is -/// executed on a system-defined global concurrent queue. -/// This completion handler takes the following parameters: -/// aggregateConversionInfo The aggregate conversion info of the current app instance, or -/// `nil` if it's not available. -/// error An error object that indicates why the request failed, or `nil` if the request -/// was successful. -/// When the aggregate conversion info is expired, both parameters are nil, i.e. the aggregate -/// conversion info is not available and there is no error. -- (void)fetchAggregateConversionInfoForInteraction:(ODCInteractionType)interaction - completion: - (void (^)(NSString *_Nullable aggregateConversionInfo, - NSError *_Nullable error))completion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Headers/ODCConversionTypes.h b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Headers/ODCConversionTypes.h deleted file mode 100755 index 9e1bb03d6..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Headers/ODCConversionTypes.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -/// The type of interaction for fetching conversion info. -typedef NS_ENUM(NSInteger, ODCInteractionType) { - ODCInteractionTypeInstallation, -} NS_SWIFT_NAME(InteractionType); diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Info.plist b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Info.plist deleted file mode 100755 index c1282dfff..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleExecutable - AppAdsOnDeviceConversion - CFBundleIdentifier - com.google.ads.AppAdsOnDeviceConversion - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - AppAdsOnDeviceConversion - CFBundlePackageType - FMWK - CFBundleVersion - 0.8.21 - CFBundleShortVersionString - 0.8.21 - DTSDKName - iphonesimulator11.2 - MinimumOSVersion - 100.0 - - diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Modules/module.modulemap b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Modules/module.modulemap deleted file mode 100755 index 17233f6b8..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64/AppAdsOnDeviceConversion.framework/Modules/module.modulemap +++ /dev/null @@ -1,7 +0,0 @@ -framework module AppAdsOnDeviceConversion { - umbrella header "AppAdsOnDeviceConversion.h" - export * - module * { export * } - link framework "Foundation" - link "c++" -} diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/AppAdsOnDeviceConversion b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/AppAdsOnDeviceConversion deleted file mode 100755 index 873b8adba..000000000 Binary files a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/AppAdsOnDeviceConversion and /dev/null differ diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Headers/AppAdsOnDeviceConversion.h b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Headers/AppAdsOnDeviceConversion.h deleted file mode 100755 index a66e1722c..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Headers/AppAdsOnDeviceConversion.h +++ /dev/null @@ -1,2 +0,0 @@ -#import -#import diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Headers/ODCConversionManager.h b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Headers/ODCConversionManager.h deleted file mode 100755 index 3319bb50e..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Headers/ODCConversionManager.h +++ /dev/null @@ -1,44 +0,0 @@ -#import - -#import "ODCConversionTypes.h" - -NS_ASSUME_NONNULL_BEGIN - -/// The top level on-device conversion manager singleton that provides methods for fetching the -/// aggregate conversion info for conversion reports. -NS_SWIFT_NAME(ConversionManager) -@interface ODCConversionManager : NSObject - -/// Returns the shared ConversionManager instance. -@property(class, nonatomic, readonly) ODCConversionManager *sharedInstance; - -/// The SDK version in the format of three period-separated integers, such as "10.14.1". -@property(nonatomic, readonly) NSString *versionString; - -/// Sets the timestamp when the application was first launched. -/// @param firstLaunchTime The timestamp when the application was first launched. -- (void)setFirstLaunchTime:(NSDate *)firstLaunchTime; - -/// Asynchronously fetches the aggregate conversion info of the current app instance for conversion -/// reports. -/// -/// The aggregate conversion info fetch could fail due to network failures etc. -/// -/// @param interaction The type of interaction to fetch. -/// @param completion The completion handler to call when the fetch is complete. This handler is -/// executed on a system-defined global concurrent queue. -/// This completion handler takes the following parameters: -/// aggregateConversionInfo The aggregate conversion info of the current app instance, or -/// `nil` if it's not available. -/// error An error object that indicates why the request failed, or `nil` if the request -/// was successful. -/// When the aggregate conversion info is expired, both parameters are nil, i.e. the aggregate -/// conversion info is not available and there is no error. -- (void)fetchAggregateConversionInfoForInteraction:(ODCInteractionType)interaction - completion: - (void (^)(NSString *_Nullable aggregateConversionInfo, - NSError *_Nullable error))completion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Headers/ODCConversionTypes.h b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Headers/ODCConversionTypes.h deleted file mode 100755 index 9e1bb03d6..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Headers/ODCConversionTypes.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -/// The type of interaction for fetching conversion info. -typedef NS_ENUM(NSInteger, ODCInteractionType) { - ODCInteractionTypeInstallation, -} NS_SWIFT_NAME(InteractionType); diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Info.plist b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Info.plist deleted file mode 100755 index c1282dfff..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleExecutable - AppAdsOnDeviceConversion - CFBundleIdentifier - com.google.ads.AppAdsOnDeviceConversion - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - AppAdsOnDeviceConversion - CFBundlePackageType - FMWK - CFBundleVersion - 0.8.21 - CFBundleShortVersionString - 0.8.21 - DTSDKName - iphonesimulator11.2 - MinimumOSVersion - 100.0 - - diff --git a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Modules/module.modulemap b/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Modules/module.modulemap deleted file mode 100755 index 17233f6b8..000000000 --- a/Branch-TestBed/Reflection_ODM_Tests/Framework/AppAdsOnDeviceConversion.xcframework/ios-arm64_x86_64-simulator/AppAdsOnDeviceConversion.framework/Modules/module.modulemap +++ /dev/null @@ -1,7 +0,0 @@ -framework module AppAdsOnDeviceConversion { - umbrella header "AppAdsOnDeviceConversion.h" - export * - module * { export * } - link framework "Foundation" - link "c++" -} diff --git a/Branch-TestBed/Reflection_ODM_Tests/Reflection_ODM_Tests.m b/Branch-TestBed/Reflection_ODM_Tests/Reflection_ODM_Tests.m index 1b8b73232..d65973e0f 100644 --- a/Branch-TestBed/Reflection_ODM_Tests/Reflection_ODM_Tests.m +++ b/Branch-TestBed/Reflection_ODM_Tests/Reflection_ODM_Tests.m @@ -22,9 +22,16 @@ - (void) testODMAPIsLoaded { XCTestExpectation *expectation = [self expectationWithDescription:@"Network call"]; - [[BNCODMInfoCollector instance] fetchODMInfoFromDeviceWithInitDate:[NSDate date] andCompletion:^(NSString * _Nonnull odmInfo, NSError * _Nonnull error) { - if ((error.code != BNCClassNotFoundError) && (error.code != BNCMethodNotFoundError)){ + [[BNCODMInfoCollector instance] fetchODMInfoFromDeviceWithInitDate:[NSDate date] andCompletion:^(NSString * _Nullable odmInfo, NSError * _Nullable error) { + if ( !error) { [expectation fulfill]; + } else { + if ((error.code != BNCClassNotFoundError) && (error.code != BNCMethodNotFoundError)) { + [expectation fulfill]; + } else { + XCTFail(@"Unexpected ODM error: %@", error.localizedDescription); + [expectation fulfill]; + } } }]; @@ -32,21 +39,25 @@ - (void) testODMAPIsLoaded { } + - (void) testODMAPICall { - + XCTestExpectation *expectation = [self expectationWithDescription:@"Network call"]; [BNCPreferenceHelper sharedInstance].odmInfo = nil; - [[BNCODMInfoCollector instance ] loadODMInfoWithTimeOut:15 andCompletionHandler:^(NSString * _Nullable odmInfo, NSError * _Nullable error) { - if ((error.code != BNCClassNotFoundError) && (error.code != BNCMethodNotFoundError)){ + [[BNCODMInfoCollector instance ] loadODMInfoWithCompletionHandler:^(NSString * _Nullable odmInfo, NSError * _Nullable error) { + if (!error){ if (odmInfo) { XCTAssertTrue([odmInfo isEqualToString:[BNCPreferenceHelper sharedInstance].odmInfo]); XCTAssertTrue([BNCPreferenceHelper sharedInstance].odmInfoInitDate != nil); } XCTAssertTrue((error == nil), "%s", [[error description] UTF8String]); [expectation fulfill]; + } else { + XCTFail(@"Unexpected ODM error: %@", error.localizedDescription); + [expectation fulfill]; } }]; - [self waitForExpectationsWithTimeout:30 handler:nil]; + [self waitForExpectationsWithTimeout:15 handler:nil]; } @end diff --git a/BranchSDK.xcodeproj/project.pbxproj b/BranchSDK.xcodeproj/project.pbxproj index b1a16d9c1..3b2ea9168 100644 --- a/BranchSDK.xcodeproj/project.pbxproj +++ b/BranchSDK.xcodeproj/project.pbxproj @@ -265,9 +265,6 @@ 5FCDD4D42B7AC6A200EAF29F /* BNCKeyChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FCDD3B52B7AC6A100EAF29F /* BNCKeyChain.h */; }; 5FCDD4D52B7AC6A200EAF29F /* BNCKeyChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FCDD3B52B7AC6A100EAF29F /* BNCKeyChain.h */; }; 5FCDD4D62B7AC6A200EAF29F /* BNCKeyChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FCDD3B52B7AC6A100EAF29F /* BNCKeyChain.h */; }; - 5FCDD4D72B7AC6A200EAF29F /* BNCAppleReceipt.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FCDD3B62B7AC6A100EAF29F /* BNCAppleReceipt.h */; }; - 5FCDD4D82B7AC6A200EAF29F /* BNCAppleReceipt.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FCDD3B62B7AC6A100EAF29F /* BNCAppleReceipt.h */; }; - 5FCDD4D92B7AC6A200EAF29F /* BNCAppleReceipt.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FCDD3B62B7AC6A100EAF29F /* BNCAppleReceipt.h */; }; 5FCDD4DA2B7AC6A200EAF29F /* BNCPasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FCDD3B72B7AC6A100EAF29F /* BNCPasteboard.h */; }; 5FCDD4DB2B7AC6A200EAF29F /* BNCPasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FCDD3B72B7AC6A100EAF29F /* BNCPasteboard.h */; }; 5FCDD4DC2B7AC6A200EAF29F /* BNCPasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FCDD3B72B7AC6A100EAF29F /* BNCPasteboard.h */; }; @@ -421,9 +418,6 @@ 5FCDD57C2B7AC6A400EAF29F /* BNCPasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCDD3ED2B7AC6A100EAF29F /* BNCPasteboard.m */; }; 5FCDD57D2B7AC6A400EAF29F /* BNCPasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCDD3ED2B7AC6A100EAF29F /* BNCPasteboard.m */; }; 5FCDD57E2B7AC6A400EAF29F /* BNCPasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCDD3ED2B7AC6A100EAF29F /* BNCPasteboard.m */; }; - 5FCDD57F2B7AC6A400EAF29F /* BNCAppleReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCDD3EE2B7AC6A100EAF29F /* BNCAppleReceipt.m */; }; - 5FCDD5802B7AC6A400EAF29F /* BNCAppleReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCDD3EE2B7AC6A100EAF29F /* BNCAppleReceipt.m */; }; - 5FCDD5812B7AC6A400EAF29F /* BNCAppleReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCDD3EE2B7AC6A100EAF29F /* BNCAppleReceipt.m */; }; 5FCDD5822B7AC6A400EAF29F /* BranchLinkProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCDD3EF2B7AC6A100EAF29F /* BranchLinkProperties.m */; }; 5FCDD5832B7AC6A400EAF29F /* BranchLinkProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCDD3EF2B7AC6A100EAF29F /* BranchLinkProperties.m */; }; 5FCDD5842B7AC6A400EAF29F /* BranchLinkProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCDD3EF2B7AC6A100EAF29F /* BranchLinkProperties.m */; }; @@ -473,6 +467,14 @@ 5FCDD5B22B7AC89100EAF29F /* BranchSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FF2AFDF28E7C22100393216 /* BranchSDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FCDD5B32B7AC89200EAF29F /* BranchSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FF2AFDF28E7C22100393216 /* BranchSDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FCDD5B42B7AC89200EAF29F /* BranchSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FF2AFDF28E7C22100393216 /* BranchSDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B70D0E162E8DB20C002BD4FE /* jira_task.xml in Sources */ = {isa = PBXBuildFile; fileRef = B70D0E152E8DB20A002BD4FE /* jira_task.xml */; }; + B70D0E252E8DC1F8002BD4FE /* BranchConfigurationController.m in Sources */ = {isa = PBXBuildFile; fileRef = B70D0E242E8DC1F8002BD4FE /* BranchConfigurationController.m */; }; + B70D0E262E8DC1F8002BD4FE /* BranchConfigurationController.m in Sources */ = {isa = PBXBuildFile; fileRef = B70D0E242E8DC1F8002BD4FE /* BranchConfigurationController.m */; }; + B70D0E272E8DC1F8002BD4FE /* BranchConfigurationController.m in Sources */ = {isa = PBXBuildFile; fileRef = B70D0E242E8DC1F8002BD4FE /* BranchConfigurationController.m */; }; + B70D0E2C2E8DCEC6002BD4FE /* BNCServerRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = E74E438D2E2F56AC000DC427 /* BNCServerRequestOperation.m */; }; + B70D0E2D2E8DCEC6002BD4FE /* BNCServerRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = E74E438D2E2F56AC000DC427 /* BNCServerRequestOperation.m */; }; + B70D0E2E2E8DCEC6002BD4FE /* BNCServerRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = E74E438D2E2F56AC000DC427 /* BNCServerRequestOperation.m */; }; + B70D0E2F2E8DCEC6002BD4FE /* BNCServerRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = E74E438D2E2F56AC000DC427 /* BNCServerRequestOperation.m */; }; E52E5B062CC79E4E00F553EE /* BranchFileLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = E52E5B052CC79E4E00F553EE /* BranchFileLogger.h */; settings = {ATTRIBUTES = (Public, ); }; }; E52E5B072CC79E4E00F553EE /* BranchFileLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = E52E5B052CC79E4E00F553EE /* BranchFileLogger.h */; }; E52E5B0A2CC79E5C00F553EE /* BranchFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = E52E5B092CC79E5C00F553EE /* BranchFileLogger.m */; }; @@ -483,9 +485,12 @@ E71E39722DD3A92900110F59 /* BNCInAppBrowser.h in Headers */ = {isa = PBXBuildFile; fileRef = E71E396D2DD3A92900110F59 /* BNCInAppBrowser.h */; }; E71E39732DD3A92900110F59 /* BNCInAppBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = E71E396E2DD3A92900110F59 /* BNCInAppBrowser.m */; }; E71E39742DD3A92900110F59 /* BNCInAppBrowser.h in Headers */ = {isa = PBXBuildFile; fileRef = E71E396D2DD3A92900110F59 /* BNCInAppBrowser.h */; }; - E7931D842E01C8AE0007A374 /* ConfigurationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7931D832E01C8AE0007A374 /* ConfigurationController.swift */; }; - E7931D852E01C8AE0007A374 /* ConfigurationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7931D832E01C8AE0007A374 /* ConfigurationController.swift */; }; - E7931D862E01C8AE0007A374 /* ConfigurationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7931D832E01C8AE0007A374 /* ConfigurationController.swift */; }; + E74E43862E2F55E5000DC427 /* BNCServerRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = E74E43852E2F55E5000DC427 /* BNCServerRequestOperation.h */; }; + E74E43872E2F55E5000DC427 /* BNCServerRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = E74E43852E2F55E5000DC427 /* BNCServerRequestOperation.h */; }; + E74E43882E2F55E5000DC427 /* BNCServerRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = E74E43852E2F55E5000DC427 /* BNCServerRequestOperation.h */; }; + E74E438E2E2F56AC000DC427 /* BNCServerRequestOperation.m in Headers */ = {isa = PBXBuildFile; fileRef = E74E438D2E2F56AC000DC427 /* BNCServerRequestOperation.m */; }; + E74E438F2E2F56AC000DC427 /* BNCServerRequestOperation.m in Headers */ = {isa = PBXBuildFile; fileRef = E74E438D2E2F56AC000DC427 /* BNCServerRequestOperation.m */; }; + E74E43902E2F56AC000DC427 /* BNCServerRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = E74E438D2E2F56AC000DC427 /* BNCServerRequestOperation.m */; }; E7CA74EF2E1B4F75002EFB40 /* BranchSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F22101D2894A0DB00C5B190 /* BranchSDK.framework */; settings = {ATTRIBUTES = (Required, ); }; }; E7CA75B92E1B994B002EFB40 /* AdServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7CA75B82E1B994B002EFB40 /* AdServices.framework */; }; E7CA75BB2E1B9951002EFB40 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7CA75BA2E1B9951002EFB40 /* AdSupport.framework */; }; @@ -572,7 +577,7 @@ 5FCDD3812B7AC6A100EAF29F /* BNCNetworkInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCNetworkInterface.m; sourceTree = ""; }; 5FCDD3822B7AC6A100EAF29F /* BNCPreferenceHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCPreferenceHelper.m; sourceTree = ""; }; 5FCDD3832B7AC6A100EAF29F /* BNCConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCConfig.m; sourceTree = ""; }; - 5FCDD3842B7AC6A100EAF29F /* BranchConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BranchConstants.m; path = ../BranchSDK_ObjC/BranchConstants.m; sourceTree = ""; }; + 5FCDD3842B7AC6A100EAF29F /* BranchConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchConstants.m; sourceTree = ""; }; 5FCDD3852B7AC6A100EAF29F /* BranchContentDiscoveryManifest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchContentDiscoveryManifest.m; sourceTree = ""; }; 5FCDD3862B7AC6A100EAF29F /* BranchSpotlightUrlRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchSpotlightUrlRequest.m; sourceTree = ""; }; 5FCDD3882B7AC6A100EAF29F /* BranchContentDiscoverer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchContentDiscoverer.m; sourceTree = ""; }; @@ -619,7 +624,6 @@ 5FCDD3B22B7AC6A100EAF29F /* BNCServerInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCServerInterface.h; sourceTree = ""; }; 5FCDD3B32B7AC6A100EAF29F /* BNCProductCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCProductCategory.h; sourceTree = ""; }; 5FCDD3B52B7AC6A100EAF29F /* BNCKeyChain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCKeyChain.h; sourceTree = ""; }; - 5FCDD3B62B7AC6A100EAF29F /* BNCAppleReceipt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCAppleReceipt.h; sourceTree = ""; }; 5FCDD3B72B7AC6A100EAF29F /* BNCPasteboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCPasteboard.h; sourceTree = ""; }; 5FCDD3B82B7AC6A100EAF29F /* BranchContentPathProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchContentPathProperties.h; sourceTree = ""; }; 5FCDD3B92B7AC6A100EAF29F /* BNCSKAdNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCSKAdNetwork.h; sourceTree = ""; }; @@ -671,7 +675,6 @@ 5FCDD3EB2B7AC6A100EAF29F /* BNCSKAdNetwork.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCSKAdNetwork.m; sourceTree = ""; }; 5FCDD3EC2B7AC6A100EAF29F /* BranchContentPathProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchContentPathProperties.m; sourceTree = ""; }; 5FCDD3ED2B7AC6A100EAF29F /* BNCPasteboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCPasteboard.m; sourceTree = ""; }; - 5FCDD3EE2B7AC6A100EAF29F /* BNCAppleReceipt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCAppleReceipt.m; sourceTree = ""; }; 5FCDD3EF2B7AC6A100EAF29F /* BranchLinkProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchLinkProperties.m; sourceTree = ""; }; 5FCDD3F02B7AC6A100EAF29F /* BNCInitSessionResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCInitSessionResponse.m; sourceTree = ""; }; 5FCDD3F12B7AC6A100EAF29F /* BNCLinkCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCLinkCache.m; sourceTree = ""; }; @@ -691,18 +694,21 @@ 5FF2AFDC28E7BF8A00393216 /* build_xcframework.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_xcframework.sh; sourceTree = ""; }; 5FF2AFDE28E7C22100393216 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; 5FF2AFDF28E7C22100393216 /* BranchSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchSDK.h; sourceTree = ""; }; + B70D0E152E8DB20A002BD4FE /* jira_task.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = jira_task.xml; sourceTree = ""; }; + B70D0E242E8DC1F8002BD4FE /* BranchConfigurationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchConfigurationController.m; sourceTree = ""; }; E52E5B052CC79E4E00F553EE /* BranchFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchFileLogger.h; sourceTree = ""; }; E52E5B092CC79E5C00F553EE /* BranchFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchFileLogger.m; sourceTree = ""; }; E71E396D2DD3A92900110F59 /* BNCInAppBrowser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCInAppBrowser.h; sourceTree = ""; }; E71E396E2DD3A92900110F59 /* BNCInAppBrowser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCInAppBrowser.m; sourceTree = ""; }; - E7931D832E01C8AE0007A374 /* ConfigurationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ConfigurationController.swift; path = ../BranchSDK_Swift/ConfigurationController.swift; sourceTree = ""; }; + E74E43852E2F55E5000DC427 /* BNCServerRequestOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCServerRequestOperation.h; sourceTree = ""; }; + E74E438D2E2F56AC000DC427 /* BNCServerRequestOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCServerRequestOperation.m; sourceTree = ""; }; E7CA74EB2E1B4F75002EFB40 /* BranchSDKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BranchSDKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; E7CA755F2E1B59F5002EFB40 /* BranchSDKTestsHostApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BranchSDKTestsHostApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; E7CA75B82E1B994B002EFB40 /* AdServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdServices.framework; path = System/Library/Frameworks/AdServices.framework; sourceTree = SDKROOT; }; E7CA75BA2E1B9951002EFB40 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; E7F311AD2DACB4D400F824A7 /* BNCODMInfoCollector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCODMInfoCollector.m; sourceTree = ""; }; E7F311B02DACB54100F824A7 /* BNCODMInfoCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCODMInfoCollector.h; sourceTree = ""; }; - E7FAF69F2E26E497006C167F /* BranchConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BranchConstants.h; path = Sources/BranchSDK_ObjC/Public/BranchConstants.h; sourceTree = SOURCE_ROOT; }; + E7FAF69F2E26E497006C167F /* BranchConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BranchConstants.h; path = Sources/BranchSDK/Public/BranchConstants.h; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ @@ -809,6 +815,7 @@ E7CA75602E1B59F5002EFB40 /* BranchSDKTestsHostApp */, E7CA75B72E1B994B002EFB40 /* Frameworks */, 5F22101E2894A0DB00C5B190 /* Products */, + B70D0E152E8DB20A002BD4FE /* jira_task.xml */, ); sourceTree = ""; }; @@ -827,11 +834,11 @@ 5FCDD36B2B7AC6A100EAF29F /* BranchSDK */ = { isa = PBXGroup; children = ( - E7931D832E01C8AE0007A374 /* ConfigurationController.swift */, + B70D0E242E8DC1F8002BD4FE /* BranchConfigurationController.m */, + E74E438D2E2F56AC000DC427 /* BNCServerRequestOperation.m */, E71E396E2DD3A92900110F59 /* BNCInAppBrowser.m */, E52E5B092CC79E5C00F553EE /* BranchFileLogger.m */, 5FCDD3F62B7AC6A100EAF29F /* BNCAppGroupsData.m */, - 5FCDD3EE2B7AC6A100EAF29F /* BNCAppleReceipt.m */, 5FCDD3712B7AC6A100EAF29F /* BNCApplication.m */, 5FCDD3FD2B7AC6A100EAF29F /* BNCCallbackMap.m */, 5FCDD3832B7AC6A100EAF29F /* BNCConfig.m */, @@ -939,7 +946,7 @@ 5FCDD39F2B7AC6A100EAF29F /* BranchSDK.h */, 5FCDD3A52B7AC6A100EAF29F /* BranchShareLink.h */, 5FCDD3AC2B7AC6A100EAF29F /* BranchUniversalObject.h */, - E7FBA85E2E14492600E7AAD9 /* BranchConstants.h */, + 5FCDD3DB2B7AC6A100EAF29F /* BNCConfig.h */, ); path = Public; sourceTree = ""; @@ -947,11 +954,10 @@ 5FCDD3B42B7AC6A100EAF29F /* Private */ = { isa = PBXGroup; children = ( + E74E43852E2F55E5000DC427 /* BNCServerRequestOperation.h */, 5FCDD3BC2B7AC6A100EAF29F /* BNCAppGroupsData.h */, - 5FCDD3B62B7AC6A100EAF29F /* BNCAppleReceipt.h */, 5FCDD3C72B7AC6A100EAF29F /* BNCApplication.h */, 5FCDD3C12B7AC6A100EAF29F /* BNCCallbackMap.h */, - 5FCDD3DB2B7AC6A100EAF29F /* BNCConfig.h */, 5FCDD3D52B7AC6A100EAF29F /* BNCContentDiscoveryManager.h */, 5FCDD3E02B7AC6A100EAF29F /* BNCCrashlyticsWrapper.h */, 5FCDD3D42B7AC6A100EAF29F /* BNCDeepLinkViewControllerInstance.h */, @@ -1059,6 +1065,7 @@ 5FCDD48C2B7AC6A100EAF29F /* BranchActivityItemProvider.h in Headers */, 5FCDD4832B7AC6A100EAF29F /* BNCLinkData.h in Headers */, 5FCDD4B02B7AC6A200EAF29F /* BranchEvent.h in Headers */, + E74E43882E2F55E5000DC427 /* BNCServerRequestOperation.h in Headers */, 5FCDD4B32B7AC6A200EAF29F /* BNCNetworkServiceProtocol.h in Headers */, 5FCDD4A12B7AC6A200EAF29F /* BNCServerResponse.h in Headers */, 5FCDD4C22B7AC6A200EAF29F /* BranchDeepLinkingController.h in Headers */, @@ -1104,7 +1111,6 @@ 5FCDD4F52B7AC6A200EAF29F /* BNCEventUtils.h in Headers */, 5FCDD5612B7AC6A300EAF29F /* BNCReachability.h in Headers */, 5FCDD50D2B7AC6A300EAF29F /* NSMutableDictionary+Branch.h in Headers */, - 5FCDD4D72B7AC6A200EAF29F /* BNCAppleReceipt.h in Headers */, E71E39742DD3A92900110F59 /* BNCInAppBrowser.h in Headers */, 5FCDD54F2B7AC6A300EAF29F /* BranchJsonConfig.h in Headers */, 5FCDD4E02B7AC6A200EAF29F /* BNCSKAdNetwork.h in Headers */, @@ -1126,6 +1132,7 @@ 5FCDD4A82B7AC6A200EAF29F /* BranchShareLink.h in Headers */, 5FCDD4B72B7AC6A200EAF29F /* BNCServerRequestQueue.h in Headers */, 5FCDD4992B7AC6A100EAF29F /* BNCCurrency.h in Headers */, + E74E438E2E2F56AC000DC427 /* BNCServerRequestOperation.m in Headers */, 5FCDD4C62B7AC6A200EAF29F /* BranchPluginSupport.h in Headers */, 5FCDD4BD2B7AC6A200EAF29F /* BranchUniversalObject.h in Headers */, 5FCDD4D22B7AC6A200EAF29F /* BNCProductCategory.h in Headers */, @@ -1142,6 +1149,7 @@ 5FCDD48D2B7AC6A100EAF29F /* BranchActivityItemProvider.h in Headers */, 5FCDD4842B7AC6A100EAF29F /* BNCLinkData.h in Headers */, 5FCDD4B12B7AC6A200EAF29F /* BranchEvent.h in Headers */, + E74E43872E2F55E5000DC427 /* BNCServerRequestOperation.h in Headers */, 5FCDD4B42B7AC6A200EAF29F /* BNCNetworkServiceProtocol.h in Headers */, 5FCDD4A22B7AC6A200EAF29F /* BNCServerResponse.h in Headers */, 5FCDD4C32B7AC6A200EAF29F /* BranchDeepLinkingController.h in Headers */, @@ -1189,7 +1197,6 @@ 5FCDD5622B7AC6A300EAF29F /* BNCReachability.h in Headers */, 5FCDD50E2B7AC6A300EAF29F /* NSMutableDictionary+Branch.h in Headers */, E71E39722DD3A92900110F59 /* BNCInAppBrowser.h in Headers */, - 5FCDD4D82B7AC6A200EAF29F /* BNCAppleReceipt.h in Headers */, 5FCDD5502B7AC6A300EAF29F /* BranchJsonConfig.h in Headers */, 5FCDD4E12B7AC6A200EAF29F /* BNCSKAdNetwork.h in Headers */, 5FCDD5112B7AC6A300EAF29F /* BNCDeviceSystem.h in Headers */, @@ -1209,6 +1216,7 @@ 5FCDD4CA2B7AC6A200EAF29F /* BranchScene.h in Headers */, 5FCDD4A92B7AC6A200EAF29F /* BranchShareLink.h in Headers */, 5FCDD4B82B7AC6A200EAF29F /* BNCServerRequestQueue.h in Headers */, + E74E438F2E2F56AC000DC427 /* BNCServerRequestOperation.m in Headers */, 5FCDD49A2B7AC6A100EAF29F /* BNCCurrency.h in Headers */, 5FCDD4C72B7AC6A200EAF29F /* BranchPluginSupport.h in Headers */, 5FCDD4BE2B7AC6A200EAF29F /* BranchUniversalObject.h in Headers */, @@ -1225,6 +1233,7 @@ 5FCDD48E2B7AC6A100EAF29F /* BranchActivityItemProvider.h in Headers */, 5FCDD4852B7AC6A100EAF29F /* BNCLinkData.h in Headers */, 5FCDD4B22B7AC6A200EAF29F /* BranchEvent.h in Headers */, + E74E43862E2F55E5000DC427 /* BNCServerRequestOperation.h in Headers */, 5FCDD4B52B7AC6A200EAF29F /* BNCNetworkServiceProtocol.h in Headers */, 5FCDD4A32B7AC6A200EAF29F /* BNCServerResponse.h in Headers */, 5FCDD4C42B7AC6A200EAF29F /* BranchDeepLinkingController.h in Headers */, @@ -1272,7 +1281,6 @@ 5FCDD5632B7AC6A300EAF29F /* BNCReachability.h in Headers */, 5FCDD50F2B7AC6A300EAF29F /* NSMutableDictionary+Branch.h in Headers */, E71E396F2DD3A92900110F59 /* BNCInAppBrowser.h in Headers */, - 5FCDD4D92B7AC6A200EAF29F /* BNCAppleReceipt.h in Headers */, 5FCDD5512B7AC6A300EAF29F /* BranchJsonConfig.h in Headers */, 5FCDD4E22B7AC6A200EAF29F /* BNCSKAdNetwork.h in Headers */, 5FCDD5122B7AC6A300EAF29F /* BNCDeviceSystem.h in Headers */, @@ -1575,6 +1583,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E74E43902E2F56AC000DC427 /* BNCServerRequestOperation.m in Sources */, 5FCDD5AC2B7AC6A400EAF29F /* BNCCallbackMap.m in Sources */, 5FCDD40E2B7AC6A100EAF29F /* BNCApplication.m in Sources */, 5FCDD5642B7AC6A300EAF29F /* BranchDelegate.m in Sources */, @@ -1586,6 +1595,7 @@ 5FCDD46E2B7AC6A100EAF29F /* BranchJsonConfig.m in Sources */, 5FCDD4742B7AC6A100EAF29F /* BNCPartnerParameters.m in Sources */, 5FCDD4712B7AC6A100EAF29F /* BranchLATDRequest.m in Sources */, + B70D0E272E8DC1F8002BD4FE /* BranchConfigurationController.m in Sources */, 5FCDD57C2B7AC6A400EAF29F /* BNCPasteboard.m in Sources */, 5FCDD47A2B7AC6A100EAF29F /* BranchActivityItemProvider.m in Sources */, E7F311AE2DACB4D400F824A7 /* BNCODMInfoCollector.m in Sources */, @@ -1597,7 +1607,6 @@ 5FCDD4652B7AC6A100EAF29F /* BNCProductCategory.m in Sources */, 5FCDD56A2B7AC6A400EAF29F /* Branch.m in Sources */, 5FCDD4292B7AC6A100EAF29F /* BranchInstallRequest.m in Sources */, - E7931D862E01C8AE0007A374 /* ConfigurationController.swift in Sources */, 5FCDD4262B7AC6A100EAF29F /* Branch+Validator.m in Sources */, 5FCDD4022B7AC6A100EAF29F /* BNCUserAgentCollector.m in Sources */, 5FCDD5762B7AC6A400EAF29F /* BNCSKAdNetwork.m in Sources */, @@ -1642,7 +1651,6 @@ 5FCDD43B2B7AC6A100EAF29F /* BNCServerRequest.m in Sources */, 5FCDD5822B7AC6A400EAF29F /* BranchLinkProperties.m in Sources */, 5FCDD59D2B7AC6A400EAF29F /* BranchEvent.m in Sources */, - 5FCDD57F2B7AC6A400EAF29F /* BNCAppleReceipt.m in Sources */, 5FCDD4622B7AC6A100EAF29F /* BNCReferringURLUtility.m in Sources */, 5FCDD59A2B7AC6A400EAF29F /* BNCServerResponse.m in Sources */, 5FCDD5852B7AC6A400EAF29F /* BNCInitSessionResponse.m in Sources */, @@ -1655,6 +1663,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + B70D0E252E8DC1F8002BD4FE /* BranchConfigurationController.m in Sources */, + B70D0E2E2E8DCEC6002BD4FE /* BNCServerRequestOperation.m in Sources */, 5FCDD5AD2B7AC6A400EAF29F /* BNCCallbackMap.m in Sources */, 5FCDD40F2B7AC6A100EAF29F /* BNCApplication.m in Sources */, 5FCDD5652B7AC6A300EAF29F /* BranchDelegate.m in Sources */, @@ -1677,7 +1687,6 @@ 5FCDD4662B7AC6A100EAF29F /* BNCProductCategory.m in Sources */, 5FCDD56B2B7AC6A400EAF29F /* Branch.m in Sources */, 5FCDD42A2B7AC6A100EAF29F /* BranchInstallRequest.m in Sources */, - E7931D852E01C8AE0007A374 /* ConfigurationController.swift in Sources */, 5FCDD4272B7AC6A100EAF29F /* Branch+Validator.m in Sources */, 5FCDD4032B7AC6A100EAF29F /* BNCUserAgentCollector.m in Sources */, 5FCDD5772B7AC6A400EAF29F /* BNCSKAdNetwork.m in Sources */, @@ -1722,7 +1731,6 @@ 5FCDD43C2B7AC6A100EAF29F /* BNCServerRequest.m in Sources */, 5FCDD5832B7AC6A400EAF29F /* BranchLinkProperties.m in Sources */, 5FCDD59E2B7AC6A400EAF29F /* BranchEvent.m in Sources */, - 5FCDD5802B7AC6A400EAF29F /* BNCAppleReceipt.m in Sources */, 5FCDD4632B7AC6A100EAF29F /* BNCReferringURLUtility.m in Sources */, 5FCDD59B2B7AC6A400EAF29F /* BNCServerResponse.m in Sources */, 5FCDD5862B7AC6A400EAF29F /* BNCInitSessionResponse.m in Sources */, @@ -1735,6 +1743,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + B70D0E2F2E8DCEC6002BD4FE /* BNCServerRequestOperation.m in Sources */, 5FCDD5AE2B7AC6A400EAF29F /* BNCCallbackMap.m in Sources */, 5FCDD4102B7AC6A100EAF29F /* BNCApplication.m in Sources */, 5FCDD5662B7AC6A300EAF29F /* BranchDelegate.m in Sources */, @@ -1747,6 +1756,7 @@ 5FCDD57E2B7AC6A400EAF29F /* BNCPasteboard.m in Sources */, 5F5FDA182B7DE2FE00F14A43 /* BranchLogger.m in Sources */, 5FCDD4612B7AC6A100EAF29F /* BNCRequestFactory.m in Sources */, + B70D0E262E8DC1F8002BD4FE /* BranchConfigurationController.m in Sources */, 5FCDD41F2B7AC6A100EAF29F /* BNCDeepLinkViewControllerInstance.m in Sources */, 5FCDD58A2B7AC6A400EAF29F /* BNCLinkCache.m in Sources */, 5FCDD56F2B7AC6A400EAF29F /* BNCJSONUtility.m in Sources */, @@ -1787,12 +1797,10 @@ 5FCDD5A52B7AC6A400EAF29F /* BranchOpenRequest.m in Sources */, 5FCDD5692B7AC6A400EAF29F /* BNCLinkData.m in Sources */, 5FCDD44C2B7AC6A100EAF29F /* BranchContentDiscoveryManifest.m in Sources */, - E7931D842E01C8AE0007A374 /* ConfigurationController.swift in Sources */, 5FCDD46A2B7AC6A100EAF29F /* BNCCrashlyticsWrapper.m in Sources */, 5FCDD43D2B7AC6A100EAF29F /* BNCServerRequest.m in Sources */, 5FCDD5842B7AC6A400EAF29F /* BranchLinkProperties.m in Sources */, 5FCDD59F2B7AC6A400EAF29F /* BranchEvent.m in Sources */, - 5FCDD5812B7AC6A400EAF29F /* BNCAppleReceipt.m in Sources */, 5FCDD4642B7AC6A100EAF29F /* BNCReferringURLUtility.m in Sources */, 5FCDD59C2B7AC6A400EAF29F /* BNCServerResponse.m in Sources */, 5FCDD5872B7AC6A400EAF29F /* BNCInitSessionResponse.m in Sources */, @@ -1805,6 +1813,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + B70D0E162E8DB20C002BD4FE /* jira_task.xml in Sources */, + B70D0E2C2E8DCEC6002BD4FE /* BNCServerRequestOperation.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1812,6 +1822,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + B70D0E2D2E8DCEC6002BD4FE /* BNCServerRequestOperation.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2286,7 +2297,13 @@ ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.5; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/Sources/BranchSDK", + "$(SRCROOT)/Sources/BranchSDK/Private", + "$(SRCROOT)/Sources/BranchSDK/Public", + ); + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = branch.BranchSDKTests; @@ -2310,7 +2327,13 @@ ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 18.5; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/Sources/BranchSDK", + "$(SRCROOT)/Sources/BranchSDK/Private", + "$(SRCROOT)/Sources/BranchSDK/Public", + ); + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = branch.BranchSDKTests; @@ -2342,7 +2365,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 18.5; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2377,7 +2400,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 18.5; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/BranchSDKTests/BNCAppleReceiptTests.m b/BranchSDKTests/BNCAppleReceiptTests.m deleted file mode 100644 index faff0ef96..000000000 --- a/BranchSDKTests/BNCAppleReceiptTests.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// BNCAppleReceiptTests.m -// Branch-SDK-Tests -// -// Created by Ernest Cho on 7/15/19. -// Copyright © 2019 Branch, Inc. All rights reserved. -// - -#import -#import "BNCAppleReceipt.h" - -@interface BNCAppleReceiptTests : XCTestCase - -@end - -@implementation BNCAppleReceiptTests - -- (void)setUp { - -} - -- (void)tearDown { - -} - -- (void)testReceiptOnSimulator { - BNCAppleReceipt *receipt = [[BNCAppleReceipt alloc] init]; - // Appears the simulator can have a receipt - //XCTAssertNil([receipt installReceipt]); - XCTAssertFalse([receipt isTestFlight]); -} - -@end diff --git a/BranchSDKTests/BNCODMTests.m b/BranchSDKTests/BNCODMTests.m index 38d1b0cc2..97d7b9b98 100644 --- a/BranchSDKTests/BNCODMTests.m +++ b/BranchSDKTests/BNCODMTests.m @@ -91,7 +91,7 @@ - (void)testODMTimeOut { - (void) testODMAPIsNotLoaded { XCTestExpectation *expectation = [self expectationWithDescription:@"Check if ODCManager class is loaded."]; - [[BNCODMInfoCollector instance ] loadODMInfoWithTimeOut:DISPATCH_TIME_FOREVER andCompletionHandler:^(NSString * _Nullable odmInfo, NSError * _Nullable error) { + [[BNCODMInfoCollector instance] loadODMInfoWithCompletionHandler:^(NSString * _Nullable odmInfo, NSError * _Nullable error) { if (error.code == BNCClassNotFoundError){ [expectation fulfill]; } diff --git a/BranchSDKTests/BranchConfigurationControllerTests.m b/BranchSDKTests/BranchConfigurationControllerTests.m index 74acc4106..705fb930d 100644 --- a/BranchSDKTests/BranchConfigurationControllerTests.m +++ b/BranchSDKTests/BranchConfigurationControllerTests.m @@ -14,7 +14,7 @@ #if SWIFT_PACKAGE @import BranchSwiftSDK; #else -#import "BranchSDK/BranchSDK-Swift.h" +#import "Private/BranchConfigurationController.h" #endif @interface BranchConfigurationControllerTests : XCTestCase @@ -23,26 +23,37 @@ @interface BranchConfigurationControllerTests : XCTestCase @implementation BranchConfigurationControllerTests - (void)testSingletonInstance { - +#if SWIFT_PACKAGE ConfigurationController *instance1 = [ConfigurationController shared]; XCTAssertNotNil(instance1); ConfigurationController *instance2 = [ConfigurationController shared]; XCTAssertEqual(instance1, instance2); +#else + BranchConfigurationController *instance1 = [BranchConfigurationController sharedInstance]; + XCTAssertNotNil(instance1); + + BranchConfigurationController *instance2 = [BranchConfigurationController sharedInstance]; + XCTAssertEqual(instance1, instance2); +#endif } - (void)testPropertySettersAndGetters { +#if SWIFT_PACKAGE ConfigurationController *configController = [ConfigurationController shared]; - +#else + BranchConfigurationController *configController = [BranchConfigurationController sharedInstance]; +#endif + NSString *keySource = BRANCH_KEY_SOURCE_GET_INSTANCE_API; configController.branchKeySource = keySource; XCTAssertTrue([configController.branchKeySource isEqualToString:keySource]); - + configController.deferInitForPluginRuntime = YES; XCTAssertTrue(configController.deferInitForPluginRuntime); configController.deferInitForPluginRuntime = NO; XCTAssertFalse(configController.deferInitForPluginRuntime); - + configController.checkPasteboardOnInstall = YES; XCTAssertTrue(configController.checkPasteboardOnInstall); configController.checkPasteboardOnInstall = NO; @@ -50,7 +61,11 @@ - (void)testPropertySettersAndGetters { } - (void)testGetConfiguration { +#if SWIFT_PACKAGE ConfigurationController *configController = [ConfigurationController shared]; +#else + BranchConfigurationController *configController = [BranchConfigurationController sharedInstance]; +#endif configController.branchKeySource = BRANCH_KEY_SOURCE_INFO_PLIST; configController.deferInitForPluginRuntime = YES; configController.checkPasteboardOnInstall = YES; @@ -61,20 +76,26 @@ - (void)testGetConfiguration { XCTAssertTrue([configDict[BRANCH_REQUEST_KEY_BRANCH_KEY_SOURCE] isEqualToString:BRANCH_KEY_SOURCE_INFO_PLIST]); XCTAssertEqualObjects(configDict[BRANCH_REQUEST_KEY_DEFER_INIT_FOR_PLUGIN_RUNTIME], @(YES)); XCTAssertEqualObjects(configDict[BRANCH_REQUEST_KEY_CHECK_PASTEBOARD_ON_INSTALL], @(YES)); - + NSDictionary *frameworks = configDict[BRANCH_REQUEST_KEY_LINKED_FRAMEORKS]; XCTAssertNotNil(frameworks); - - XCTAssertEqualObjects(frameworks[FRAMEWORK_AD_SUPPORT], @(YES)); - XCTAssertEqualObjects(frameworks[FRAMEWORK_ATT_TRACKING_MANAGER], @(YES)); - XCTAssertEqualObjects(frameworks[FRAMEWORK_AD_FIREBASE_CRASHLYTICS], @(YES)); - XCTAssertEqualObjects(frameworks[FRAMEWORK_AD_SAFARI_SERVICES], @(NO)); - XCTAssertEqualObjects(frameworks[FRAMEWORK_AD_APP_ADS_ONDEVICE_CONVERSION], @(NO)); - + + // These checks verify that framework detection returns a boolean value. + // The actual value depends on the runtime environment (simulator/device). + XCTAssertNotNil(frameworks[FRAMEWORK_AD_SUPPORT]); + XCTAssertNotNil(frameworks[FRAMEWORK_ATT_TRACKING_MANAGER]); + XCTAssertNotNil(frameworks[FRAMEWORK_AD_FIREBASE_CRASHLYTICS]); + XCTAssertNotNil(frameworks[FRAMEWORK_AD_SAFARI_SERVICES]); + XCTAssertNotNil(frameworks[FRAMEWORK_AD_APP_ADS_ONDEVICE_CONVERSION]); + } - (void)testInstallRequestParams { +#if SWIFT_PACKAGE ConfigurationController *configController = [ConfigurationController shared]; +#else + BranchConfigurationController *configController = [BranchConfigurationController sharedInstance]; +#endif configController.branchKeySource = BRANCH_KEY_SOURCE_INFO_PLIST; configController.deferInitForPluginRuntime = YES; configController.checkPasteboardOnInstall = YES; @@ -83,23 +104,25 @@ - (void)testInstallRequestParams { NSNumber* requestCreationTimeStamp = BNCWireFormatFromDate([NSDate date]); BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd" UUID:requestUUID TimeStamp:requestCreationTimeStamp]; NSDictionary *installDict = [factory dataForInstallWithURLString:@"https://branch.io"]; - + NSDictionary *configDict = installDict[BRANCH_REQUEST_KEY_OPERATIONAL_METRICS]; XCTAssertNotNil(configDict); XCTAssertTrue([configDict[BRANCH_REQUEST_KEY_BRANCH_KEY_SOURCE] isEqualToString:BRANCH_KEY_SOURCE_INFO_PLIST]); XCTAssertEqualObjects(configDict[BRANCH_REQUEST_KEY_DEFER_INIT_FOR_PLUGIN_RUNTIME], @(YES)); XCTAssertEqualObjects(configDict[BRANCH_REQUEST_KEY_CHECK_PASTEBOARD_ON_INSTALL], @(YES)); - + NSDictionary *frameworks = configDict[BRANCH_REQUEST_KEY_LINKED_FRAMEORKS]; XCTAssertNotNil(frameworks); - - XCTAssertEqualObjects(frameworks[FRAMEWORK_AD_SUPPORT], @(YES)); - XCTAssertEqualObjects(frameworks[FRAMEWORK_ATT_TRACKING_MANAGER], @(YES)); - XCTAssertEqualObjects(frameworks[FRAMEWORK_AD_FIREBASE_CRASHLYTICS], @(YES)); - XCTAssertEqualObjects(frameworks[FRAMEWORK_AD_SAFARI_SERVICES], @(NO)); - XCTAssertEqualObjects(frameworks[FRAMEWORK_AD_APP_ADS_ONDEVICE_CONVERSION], @(NO)); - + + // These checks verify that framework detection returns a boolean value. + // The actual value depends on the runtime environment (simulator/device). + XCTAssertNotNil(frameworks[FRAMEWORK_AD_SUPPORT]); + XCTAssertNotNil(frameworks[FRAMEWORK_ATT_TRACKING_MANAGER]); + XCTAssertNotNil(frameworks[FRAMEWORK_AD_FIREBASE_CRASHLYTICS]); + XCTAssertNotNil(frameworks[FRAMEWORK_AD_SAFARI_SERVICES]); + XCTAssertNotNil(frameworks[FRAMEWORK_AD_APP_ADS_ONDEVICE_CONVERSION]); + } @end diff --git a/Package.swift b/Package.swift index 2b6b6bb70..33c38f0c0 100644 --- a/Package.swift +++ b/Package.swift @@ -3,37 +3,32 @@ import PackageDescription let package = Package( - name: "ios-branch-deep-linking-attribution", + name: "BranchSDK", platforms: [ .iOS(.v12), .tvOS(.v12), ], products: [ + // Main product that clients will import .library( name: "BranchSDK", - targets: ["BranchSDK", "BranchSwiftSDK", "BranchObjCSDK"]), + targets: ["BranchSDK", "BranchSwiftSDK"]), ], dependencies: [ + // Add external dependencies here if needed + // .package(url: "https://github.com/google/GoogleUtilities.git", from: "7.0.0"), + // .package(url: "https://github.com/firebase/nanopb.git", from: "2.30909.0"), ], targets: [ - .target( - name: "BranchObjCSDK", - path: "Sources/BranchSDK_ObjC", - publicHeadersPath: "Public" - ), - .target( - name: "BranchSwiftSDK", - dependencies: ["BranchObjCSDK"], // Swift code depends on Objective-C Constants - path: "Sources/BranchSDK_Swift" - - ), + // Main Objective-C SDK target .target( name: "BranchSDK", - dependencies: ["BranchSwiftSDK"], + dependencies: [], path: "Sources/BranchSDK", publicHeadersPath: "Public", cSettings: [ - .headerSearchPath("Private") + .headerSearchPath("Private"), + .define("SWIFT_PACKAGE") ], linkerSettings: [ .linkedFramework("CoreServices"), @@ -42,6 +37,15 @@ let package = Package( .linkedFramework("CoreSpotlight", .when(platforms: [.iOS])), .linkedFramework("AdServices", .when(platforms: [.iOS])) ] + ), + // Swift Concurrency layer (depends on main SDK) + .target( + name: "BranchSwiftSDK", + dependencies: ["BranchSDK"], + path: "Sources/BranchSwiftSDK", + swiftSettings: [ + .define("SWIFT_PACKAGE") + ] ) ] ) diff --git a/SDKIntegrationTestApps/iOSReleaseTest-SPM/iOSReleaseTest.xcodeproj/project.pbxproj b/SDKIntegrationTestApps/iOSReleaseTest-SPM/iOSReleaseTest.xcodeproj/project.pbxproj index 8c485c684..265c98fdb 100644 --- a/SDKIntegrationTestApps/iOSReleaseTest-SPM/iOSReleaseTest.xcodeproj/project.pbxproj +++ b/SDKIntegrationTestApps/iOSReleaseTest-SPM/iOSReleaseTest.xcodeproj/project.pbxproj @@ -402,7 +402,7 @@ CODE_SIGN_ENTITLEMENTS = iOSReleaseTest/iOSReleaseTest.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 5YP4T32B58; + DEVELOPMENT_TEAM = R63EM248DP; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = iOSReleaseTest/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; @@ -431,7 +431,7 @@ CODE_SIGN_ENTITLEMENTS = iOSReleaseTest/iOSReleaseTest.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = YKPTD52Z6X; + DEVELOPMENT_TEAM = R63EM248DP; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = iOSReleaseTest/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; diff --git a/Sources/BranchSDK/BNCAppleReceipt.m b/Sources/BranchSDK/BNCAppleReceipt.m deleted file mode 100644 index 3536b7e89..000000000 --- a/Sources/BranchSDK/BNCAppleReceipt.m +++ /dev/null @@ -1,66 +0,0 @@ -// -// BNCAppleReceipt.m -// Branch -// -// Created by Ernest Cho on 7/11/19. -// Copyright © 2019 Branch, Inc. All rights reserved. -// - -#import "BNCAppleReceipt.h" - -@interface BNCAppleReceipt() - -/* - Simulator - no receipt, isSandbox = NO - Testflight or developer side load - no receipt, isSandbox = YES - App Store installed - receipt, isSandbox = NO - */ -@property (nonatomic, copy, readwrite) NSString *receipt; -@property (nonatomic, assign, readwrite) BOOL isSandboxReceipt; - -@end - -@implementation BNCAppleReceipt - -+ (BNCAppleReceipt *)sharedInstance { - static BNCAppleReceipt *singleton = nil; - static dispatch_once_t onceToken = 0; - dispatch_once(&onceToken, ^{ - singleton = [BNCAppleReceipt new]; - }); - return singleton; -} - -- (instancetype)init { - self = [super init]; - if (self) { - self.receipt = nil; - self.isSandboxReceipt = NO; - - [self readReceipt]; - } - return self; -} - -- (void)readReceipt { - NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; - if (receiptURL) { - self.isSandboxReceipt = [receiptURL.lastPathComponent isEqualToString:@"sandboxReceipt"]; - - NSData *receiptData = [NSData dataWithContentsOfURL:receiptURL]; - if (receiptData) { - self.receipt = [receiptData base64EncodedStringWithOptions:0]; - } - } -} - -- (nullable NSString *)installReceipt { - return self.receipt; -} - -- (BOOL)isTestFlight { - // sandbox receipts are from testflight or side loaded development devices - return self.isSandboxReceipt; -} - -@end diff --git a/Sources/BranchSDK/BNCODMInfoCollector.m b/Sources/BranchSDK/BNCODMInfoCollector.m index 09bb519d6..4c4a81262 100644 --- a/Sources/BranchSDK/BNCODMInfoCollector.m +++ b/Sources/BranchSDK/BNCODMInfoCollector.m @@ -22,8 +22,6 @@ @interface BNCODMInfoCollector() @implementation BNCODMInfoCollector -@synthesize odmInfo = _odmInfo; - + (BNCODMInfoCollector *)instance { static BNCODMInfoCollector *collector = nil; static dispatch_once_t onceToken = 0; @@ -41,51 +39,28 @@ - (instancetype)init { return self; } -- (void) setOdmInfo:(NSString *)odmInfo { - _odmInfo = odmInfo; -} - -- (NSString *) odmInfo { - @synchronized (self) { - // Load ODM info with a time-out of 500 ms. Its must for next call to v1/open. - if (!_odmInfo) { - [self loadODMInfoWithTimeOut:dispatch_time(DISPATCH_TIME_NOW, (int64_t)(500 * NSEC_PER_MSEC)) andCompletionHandler:nil]; // Timeout after 500 ms - } - - if (_odmInfo) { - // Check if odmInfo is within validity window - NSDate *initTime = self.preferenceHelper.odmInfoInitDate; - NSTimeInterval validityWindow = self.preferenceHelper.odmInfoValidityWindow; - if ([self isWithinValidityWindow:initTime timeInterval:validityWindow]) { - // fetch ODM info from pref helper - _odmInfo = self.preferenceHelper.odmInfo; - } else { - _odmInfo = nil; - } - } - return _odmInfo; - } -} - -- (void)loadODMInfo { - [self loadODMInfoWithTimeOut: DISPATCH_TIME_FOREVER andCompletionHandler:nil]; -} - -- (void)loadODMInfoWithTimeOut:(dispatch_time_t) timeOut andCompletionHandler:(void (^_Nullable)(NSString * _Nullable odmInfo, NSError * _Nullable error))completion { +- (void)loadODMInfoWithCompletionHandler:(void (^_Nullable)(NSString * _Nullable odmInfo, NSError * _Nullable error))completion { - if (self.preferenceHelper.odmInfo) { - self.odmInfo = self.preferenceHelper.odmInfo; + NSString *odmInfoValidated = self.preferenceHelper.odmInfo; + if (odmInfoValidated) { + // Check if odmInfo is within validity window + NSDate *initTime = self.preferenceHelper.odmInfoInitDate; + NSTimeInterval validityWindow = self.preferenceHelper.odmInfoValidityWindow; + if ([self isWithinValidityWindow:initTime timeInterval:validityWindow]) { + // fetch ODM info from pref helper + odmInfoValidated = self.preferenceHelper.odmInfo; + } else { + odmInfoValidated = nil; + } if (completion) { - completion(_odmInfo, nil); + completion(odmInfoValidated, nil); } } else { // Fetch ODM Info from device NSDate * odmInfofetchingTime = [NSDate date]; - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [self fetchODMInfoFromDeviceWithInitDate:odmInfofetchingTime andCompletion:^(NSString *odmInfo, NSError *error) { if (odmInfo) { - self.odmInfo = odmInfo; // Cache ODM info in pref helper self.preferenceHelper.odmInfo = odmInfo; self.preferenceHelper.odmInfoInitDate = odmInfofetchingTime; @@ -93,9 +68,8 @@ - (void)loadODMInfoWithTimeOut:(dispatch_time_t) timeOut andCompletionHandler:(v if (completion) { completion(odmInfo, error); } - dispatch_semaphore_signal(semaphore); + }]; - dispatch_semaphore_wait(semaphore, timeOut); } } @@ -109,90 +83,90 @@ - (BOOL)isWithinValidityWindow:(NSDate *)initTime timeInterval:(NSTimeInterval)t } - (void) fetchODMInfoFromDeviceWithInitDate:(NSDate *) date andCompletion:(void (^)(NSString *odmInfo, NSError *error))completion { - - NSError *error = nil ; - - Class ODMConversionManagerClass = NSClassFromString(@"ODCConversionManager"); - SEL sharedInstanceSelector = NSSelectorFromString(@"sharedInstance"); - - if (ODMConversionManagerClass && [ODMConversionManagerClass respondsToSelector:sharedInstanceSelector]) { + @synchronized (self) { - id sharedInstance = ((id (*)(id, SEL))[ODMConversionManagerClass methodForSelector:sharedInstanceSelector]) - (ODMConversionManagerClass, sharedInstanceSelector); - - // Set the time when the app was first launched by calling setFirstLaunchTime: dynamically - SEL setFirstLaunchTimeSelector = NSSelectorFromString(@"setFirstLaunchTime:"); + NSError *error = nil ; + + Class ODMConversionManagerClass = NSClassFromString(@"ODCConversionManager"); + SEL sharedInstanceSelector = NSSelectorFromString(@"sharedInstance"); - if ([sharedInstance respondsToSelector:setFirstLaunchTimeSelector]) { + if (ODMConversionManagerClass && [ODMConversionManagerClass respondsToSelector:sharedInstanceSelector]) { - void (*setFirstLaunchTimeMethod)(id, SEL, NSDate *) = (void (*)(id, SEL, NSDate *)) - [sharedInstance methodForSelector:setFirstLaunchTimeSelector]; - setFirstLaunchTimeMethod(sharedInstance, setFirstLaunchTimeSelector, date); - [[BranchLogger shared] logDebug:[NSString stringWithFormat:@"setFirstLaunchTimeSelector: invoked successfully."] error:nil]; + id sharedInstance = ((id (*)(id, SEL))[ODMConversionManagerClass methodForSelector:sharedInstanceSelector]) + (ODMConversionManagerClass, sharedInstanceSelector); - // Fetch the conversion info. Call fetchAggregateConversionInfoForInteraction:completion dynamically - SEL fetchAggregateConversionInfoSelector = NSSelectorFromString(@"fetchAggregateConversionInfoForInteraction:completion:"); - if ([sharedInstance respondsToSelector:fetchAggregateConversionInfoSelector]) { - NSMethodSignature *signature = [sharedInstance methodSignatureForSelector:fetchAggregateConversionInfoSelector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - [invocation setTarget:sharedInstance]; - [invocation setSelector:fetchAggregateConversionInfoSelector]; - - // Since ODCInteractionType is an enum defined in AppAdsOnDeviceConversion.framework and its not accessible via reflection. And since enums in Objective-C are just symbolic constants that get replaced by their underlying integer values at compile time, so defining similar enum here - - typedef NS_ENUM(NSInteger, ODCInteractionType) { - ODCInteractionTypeInstallation, - } ; + // Set the time when the app was first launched by calling setFirstLaunchTime: dynamically + SEL setFirstLaunchTimeSelector = NSSelectorFromString(@"setFirstLaunchTime:"); + + if ([sharedInstance respondsToSelector:setFirstLaunchTimeSelector]) { - ODCInteractionType arg1 = ODCInteractionTypeInstallation; - [invocation setArgument:&arg1 atIndex:2]; + void (*setFirstLaunchTimeMethod)(id, SEL, NSDate *) = (void (*)(id, SEL, NSDate *)) + [sharedInstance methodForSelector:setFirstLaunchTimeSelector]; + setFirstLaunchTimeMethod(sharedInstance, setFirstLaunchTimeSelector, date); + [[BranchLogger shared] logDebug:[NSString stringWithFormat:@"setFirstLaunchTimeSelector: invoked successfully."] error:nil]; - __weak typeof(self) weakSelf = self; - self.odmFetchCompletion = ^(NSString *info, NSError *error) { + // Fetch the conversion info. Call fetchAggregateConversionInfoForInteraction:completion dynamically + SEL fetchAggregateConversionInfoSelector = NSSelectorFromString(@"fetchAggregateConversionInfoForInteraction:completion:"); + if ([sharedInstance respondsToSelector:fetchAggregateConversionInfoSelector]) { + NSMethodSignature *signature = [sharedInstance methodSignatureForSelector:fetchAggregateConversionInfoSelector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + [invocation setTarget:sharedInstance]; + [invocation setSelector:fetchAggregateConversionInfoSelector]; + // Since ODCInteractionType is an enum defined in AppAdsOnDeviceConversion.framework and its not accessible via reflection. And since enums in Objective-C are just symbolic constants that get replaced by their underlying integer values at compile time, so defining similar enum here - + typedef NS_ENUM(NSInteger, ODCInteractionType) { + ODCInteractionTypeInstallation, + } ; - if (error) { - [[BranchLogger shared] logDebug:[NSString stringWithFormat:@"ODMConversionManager:fetchInfo Error : %@", error.localizedDescription ] error:error]; - } + ODCInteractionType arg1 = ODCInteractionTypeInstallation; + [invocation setArgument:&arg1 atIndex:2]; - __strong typeof(self) self = weakSelf; - if (info) { - self->_odmInfo = info; // Save new value even if its new. - } + __weak typeof(self) weakSelf = self; + self.odmFetchCompletion = ^(NSString *info, NSError *error) { + + + if (error) { + [[BranchLogger shared] logDebug:[NSString stringWithFormat:@"ODMConversionManager:fetchInfo Error : %@", error.localizedDescription ] error:error]; + } + + __strong typeof(self) self = weakSelf; + + if (completion) { + completion( info, error); + } + [[BranchLogger shared] logVerbose:[NSString stringWithFormat:@"Received Info: %@", info] error:nil]; + }; + [invocation setArgument:&_odmFetchCompletion atIndex:3]; + [invocation retainArguments]; + [invocation invoke]; + [[BranchLogger shared] logDebug:[NSString stringWithFormat:@"fetchInfo:completion: invoked successfully."] error:nil]; + + + } else { + NSString *message = [NSString stringWithFormat:@"Method fetchInfo:completion: not found."] ; + error = [NSError branchErrorWithCode:BNCMethodNotFoundError localizedMessage:message]; + [[BranchLogger shared] logDebug:message error:error ]; if (completion) { - completion( self->_odmInfo, error); + completion( nil, error); } - [[BranchLogger shared] logVerbose:[NSString stringWithFormat:@"Received Info: %@", info] error:nil]; - }; - - [invocation setArgument:&_odmFetchCompletion atIndex:3]; - [invocation invoke]; - [[BranchLogger shared] logDebug:[NSString stringWithFormat:@"fetchInfo:completion: invoked successfully."] error:nil]; - - + } } else { - NSString *message = [NSString stringWithFormat:@"Method fetchInfo:completion: not found."] ; + NSString *message = [NSString stringWithFormat:@"Method setFirstLaunchTimeSelector: not found."] ; error = [NSError branchErrorWithCode:BNCMethodNotFoundError localizedMessage:message]; - [[BranchLogger shared] logDebug:message error:error ]; + [[BranchLogger shared] logDebug:message error:error]; if (completion) { completion( nil, error); } } } else { - NSString *message = [NSString stringWithFormat:@"Method setFirstLaunchTimeSelector: not found."] ; - error = [NSError branchErrorWithCode:BNCMethodNotFoundError localizedMessage:message]; + NSString *message = [NSString stringWithFormat:@"ODCConversionManager class or sharedInstance method not found. Ignore this error if not using ODM."] ; + error = [NSError branchErrorWithCode:BNCClassNotFoundError localizedMessage:message]; [[BranchLogger shared] logDebug:message error:error]; if (completion) { completion( nil, error); } } - } else { - NSString *message = [NSString stringWithFormat:@"ODCConversionManager class or sharedInstance method not found."] ; - error = [NSError branchErrorWithCode:BNCClassNotFoundError localizedMessage:message]; - [[BranchLogger shared] logDebug:message error:error]; - if (completion) { - completion( nil, error); - } } } diff --git a/Sources/BranchSDK/BNCPreferenceHelper.m b/Sources/BranchSDK/BNCPreferenceHelper.m index ca7001583..05c4d84e9 100644 --- a/Sources/BranchSDK/BNCPreferenceHelper.m +++ b/Sources/BranchSDK/BNCPreferenceHelper.m @@ -16,6 +16,7 @@ #import "BNCSKAdNetwork.h" static const NSTimeInterval DEFAULT_TIMEOUT = 5.5; +static const NSTimeInterval DEFAULT_THIRD_PARTY_APIS_TIMEOUT = 0.5; // 500ms default static const NSTimeInterval DEFAULT_RETRY_INTERVAL = 0; static const NSInteger DEFAULT_RETRY_COUNT = 3; static const NSTimeInterval DEFAULT_REFERRER_GBRAID_WINDOW = 2592000; // 30 days = 2,592,000 seconds @@ -57,6 +58,7 @@ static NSString * const BRANCH_PREFS_KEY_FIRST_APP_LAUNCH_TIME = @"bnc_first_app_launch_time"; static NSString * const BRANCH_PREFS_KEY_SKAN_HIGHEST_CONV_VALUE_SENT = @"bnc_skan_send_highest_conv_value"; static NSString * const BRANCH_PREFS_KEY_SKAN_INVOKE_REGISTER_APP = @"bnc_invoke_register_app"; +static NSString * const BRANCH_PREFS_KEY_THIRD_PARTY_APIS_TIMEOUT = @"bnc_third_party_apis_timeout"; static NSString * const BRANCH_PREFS_KEY_USE_EU_SERVERS = @"bnc_use_EU_servers"; @@ -114,6 +116,7 @@ @implementation BNCPreferenceHelper retryCount = _retryCount, retryInterval = _retryInterval, timeout = _timeout, + thirdPartyAPIsWaitTime = _thirdPartyAPIsWaitTime, lastStrongMatchDate = _lastStrongMatchDate, requestMetadataDictionary = _requestMetadataDictionary, instrumentationDictionary = _instrumentationDictionary, @@ -156,6 +159,7 @@ - (instancetype)init { _retryCount = DEFAULT_RETRY_COUNT; _retryInterval = DEFAULT_RETRY_INTERVAL; _odmInfoValidityWindow = DEFAULT_ODM_INFO_VALIDITY_WINDOW; + _thirdPartyAPIsWaitTime = DEFAULT_THIRD_PARTY_APIS_TIMEOUT; _isDebug = NO; _persistPrefsQueue = [[NSOperationQueue alloc] init]; _persistPrefsQueue.maxConcurrentOperationCount = 1; @@ -759,6 +763,23 @@ - (void) setOdmInfoInitDate:(NSDate *)initDate { } } +- (NSTimeInterval) thirdPartyAPIsWaitTime { + @synchronized (self) { + _thirdPartyAPIsWaitTime = [self readDoubleFromDefaults:BRANCH_PREFS_KEY_THIRD_PARTY_APIS_TIMEOUT]; + if (_thirdPartyAPIsWaitTime == NSNotFound) { + _thirdPartyAPIsWaitTime = DEFAULT_THIRD_PARTY_APIS_TIMEOUT; + } + return _thirdPartyAPIsWaitTime; + } +} + +- (void) setThirdPartyAPIsWaitTime:(NSTimeInterval)waitTime { + @synchronized (self) { + _thirdPartyAPIsWaitTime = waitTime; + [self writeObjectToDefaults:BRANCH_PREFS_KEY_THIRD_PARTY_APIS_TIMEOUT value:@(waitTime)]; + } +} + - (NSInteger) skanCurrentWindow { @synchronized (self) { _skanCurrentWindow = [self readIntegerFromDefaults:BRANCH_PREFS_KEY_SKAN_CURRENT_WINDOW]; diff --git a/Sources/BranchSDK/BNCRequestFactory.m b/Sources/BranchSDK/BNCRequestFactory.m index 4027e0015..3c4fd4dcc 100644 --- a/Sources/BranchSDK/BNCRequestFactory.m +++ b/Sources/BranchSDK/BNCRequestFactory.m @@ -29,20 +29,23 @@ #import "BNCPartnerParameters.h" #import "BNCDeviceInfo.h" #import "BNCPreferenceHelper.h" -#import "BNCAppleReceipt.h" #import "BNCAppGroupsData.h" #import "BNCSKAdNetwork.h" -#if SWIFT_PACKAGE -@import BranchSwiftSDK; -#else +// Swift integration - BranchSwiftSDK module is loaded dynamically at runtime +// No compile-time import needed to avoid circular dependencies in SPM +#if !SWIFT_PACKAGE +// Swift bridging header - auto-generated by Xcode when Swift files are present +#if __has_include("BranchSDK/BranchSDK-Swift.h") #import "BranchSDK/BranchSDK-Swift.h" #endif +#endif #import "BNCReferringURLUtility.h" #import "BNCPasteboard.h" #import "BNCODMInfoCollector.h" +#import "Private/BranchConfigurationController.h" @interface BNCRequestFactory() @@ -54,10 +57,11 @@ @interface BNCRequestFactory() @property (nonatomic, strong, readwrite) BNCApplication *application; @property (nonatomic, strong, readwrite) BNCAppGroupsData *appGroupsData; @property (nonatomic, strong, readwrite) BNCSKAdNetwork *skAdNetwork; -@property (nonatomic, strong, readwrite) BNCAppleReceipt *appleReceipt; @property (nonatomic, strong, readwrite) BNCPasteboard *pasteboard; @property (nonatomic, strong, readwrite) NSNumber *requestCreationTimeStamp; @property (nonatomic, strong, readwrite) NSString *requestUUID; +@property (nonatomic, strong, readwrite) NSString *odmInfo; +@property (nonatomic, strong, readwrite) NSString *appleAttributionToken; @end @@ -74,7 +78,6 @@ - (instancetype)initWithBranchKey:(NSString *)key UUID:(NSString *)requestUUID T self.application = [BNCApplication currentApplication]; self.appGroupsData = [BNCAppGroupsData shared]; self.skAdNetwork = [BNCSKAdNetwork sharedInstance]; - self.appleReceipt = [BNCAppleReceipt sharedInstance]; self.pasteboard = [BNCPasteboard sharedInstance]; self.requestUUID = requestUUID; self.requestCreationTimeStamp = requestTimeStamp; @@ -82,6 +85,37 @@ - (instancetype)initWithBranchKey:(NSString *)key UUID:(NSString *)requestUUID T return self; } +- (void) loadDataFromThirdPartyAPIs { +#if !TARGET_OS_TV + dispatch_group_t apiGroup = dispatch_group_create(); + dispatch_queue_t concurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + + if (![self.preferenceHelper attributionLevelInitialized] || [[self.preferenceHelper attributionLevel] isEqualToString:BranchAttributionLevelFull]) + { + dispatch_group_enter(apiGroup); + dispatch_async(concurrentQueue, ^{ + [[BNCODMInfoCollector instance] loadODMInfoWithCompletionHandler:^(NSString * _Nullable odmInfo, NSError * _Nullable error) { + self.odmInfo = odmInfo; + dispatch_group_leave(apiGroup); + }]; + }); + } + + if (!self.preferenceHelper.appleAttributionTokenChecked) { + dispatch_group_enter(apiGroup); + dispatch_async(concurrentQueue, ^{ + self.appleAttributionToken = [BNCSystemObserver appleAttributionToken]; + dispatch_group_leave(apiGroup); + }); + } + + NSTimeInterval timeoutSeconds = [BNCPreferenceHelper sharedInstance].thirdPartyAPIsWaitTime; + dispatch_time_t timeOut = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(timeoutSeconds * NSEC_PER_SEC)); + dispatch_group_wait(apiGroup, timeOut); +#endif + +} + // SDK level tracking control // When set to YES, only link creation and resolution calls are allowed. // NO by default. @@ -92,6 +126,8 @@ - (BOOL)isTrackingDisabled { - (NSDictionary *)dataForInstallWithURLString:(NSString *)urlString { NSMutableDictionary *json = [NSMutableDictionary new]; + [self loadDataFromThirdPartyAPIs]; + // All requests [self addDefaultRequestDataToJSON:json]; @@ -110,7 +146,6 @@ - (NSDictionary *)dataForInstallWithURLString:(NSString *)urlString { [self addSystemObserverDataToJSON:json]; [self addPreferenceHelperDataToJSON:json]; [self addPartnerParametersToJSON:json]; - [self addAppleReceiptSourceToJSON:json]; [self addTimestampsToJSON:json]; // Check if the urlString is a valid URL to ensure it's a universal link, not the external intent uri @@ -126,7 +161,6 @@ - (NSDictionary *)dataForInstallWithURLString:(NSString *)urlString { [self addAppleAttributionTokenToJSON:json]; // Install Only - [self addAppleReceiptDataToJSON:json]; [self addAppClipDataToJSON:json]; [self addLocalURLToInstallJSON:json]; @@ -153,6 +187,8 @@ - (NSDictionary *)dataForInstallWithURLString:(NSString *)urlString { - (NSDictionary *)dataForOpenWithURLString:(NSString *)urlString { NSMutableDictionary *json = [NSMutableDictionary new]; + [self loadDataFromThirdPartyAPIs]; + // All requests [self addDefaultRequestDataToJSON:json]; @@ -174,7 +210,6 @@ - (NSDictionary *)dataForOpenWithURLString:(NSString *)urlString { [self addSystemObserverDataToJSON:json]; [self addPreferenceHelperDataToJSON:json]; [self addPartnerParametersToJSON:json]; - [self addAppleReceiptSourceToJSON:json]; [self addTimestampsToJSON:json]; @@ -344,25 +379,13 @@ - (void)addSystemObserverDataToJSON:(NSMutableDictionary *)json { [self safeSetValue:[BNCSystemObserver applicationVersion] forKey:BRANCH_REQUEST_KEY_APP_VERSION onDict:json]; [self safeSetValue:[BNCSystemObserver defaultURIScheme] forKey:BRANCH_REQUEST_KEY_URI_SCHEME onDict:json]; } - -- (void)addAppleReceiptDataToJSON:(NSMutableDictionary *)json { - [self safeSetValue:[self.appleReceipt installReceipt] forKey:BRANCH_REQUEST_KEY_APPLE_RECEIPT onDict:json]; -} - -- (void)addAppleReceiptSourceToJSON:(NSMutableDictionary *)json { - NSNumber *isSandboxReceipt = [NSNumber numberWithBool:[self.appleReceipt isTestFlight]]; - - // The JSON key name is misleading, really indicates if the receipt is real or a sandbox receipt - [self safeSetValue:isSandboxReceipt forKey:BRANCH_REQUEST_KEY_APPLE_TESTFLIGHT onDict:json]; -} - (void)addAppleAttributionTokenToJSON:(NSMutableDictionary *)json { // This value is only sent once usually on install if (!self.preferenceHelper.appleAttributionTokenChecked) { - NSString *appleAttributionToken = [BNCSystemObserver appleAttributionToken]; - if (appleAttributionToken) { + if (self.appleAttributionToken) { self.preferenceHelper.appleAttributionTokenChecked = YES; - [self safeSetValue:appleAttributionToken forKey:BRANCH_REQUEST_KEY_APPLE_ATTRIBUTION_TOKEN onDict:json]; + [self safeSetValue:self.appleAttributionToken forKey:BRANCH_REQUEST_KEY_APPLE_ATTRIBUTION_TOKEN onDict:json]; } } } @@ -370,10 +393,9 @@ - (void)addAppleAttributionTokenToJSON:(NSMutableDictionary *)json { - (void)addODMInfoToJSON:(NSMutableDictionary *)json { #if !TARGET_OS_TV - if ([[self.preferenceHelper attributionLevel] isEqualToString:BranchAttributionLevelFull]) { - NSString *odmInfo = [BNCODMInfoCollector instance].odmInfo ; - if (odmInfo) { - [self safeSetValue:odmInfo forKey:BRANCH_REQUEST_KEY_ODM_INFO onDict:json]; + if (![self.preferenceHelper attributionLevelInitialized] || [[self.preferenceHelper attributionLevel] isEqualToString:BranchAttributionLevelFull]) { + if (self.odmInfo) { + [self safeSetValue:self.odmInfo forKey:BRANCH_REQUEST_KEY_ODM_INFO onDict:json]; NSNumber* odmInitDateInNumberFormat = BNCWireFormatFromDate(self.preferenceHelper.odmInfoInitDate); [self safeSetValue:odmInitDateInNumberFormat forKey:BRANCH_REQUEST_KEY_ODM_FIRST_OPEN_TIMESTAMP onDict:json]; } @@ -438,7 +460,31 @@ - (void)addLocalURLToOpenJSON:(NSMutableDictionary *)json { // If the client uses a UIPasteControl, force a new open to fetch the payload - (void)addOperationalMetrics:(NSMutableDictionary *)json { - [self safeSetValue:[[ConfigurationController shared] getConfiguration] forKey:BRANCH_REQUEST_KEY_OPERATIONAL_METRICS onDict:json]; + // Try Swift ConfigurationController first, fallback to Objective-C if not available + id configuration = nil; + + // Check if Swift ConfigurationController is available + Class swiftConfigClass = NSClassFromString(@"ConfigurationController"); + if (swiftConfigClass) { + SEL sharedSelector = NSSelectorFromString(@"shared"); + if ([swiftConfigClass respondsToSelector:sharedSelector]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + id sharedInstance = [swiftConfigClass performSelector:sharedSelector]; + SEL getConfigSelector = NSSelectorFromString(@"getConfiguration"); + if ([sharedInstance respondsToSelector:getConfigSelector]) { + configuration = [sharedInstance performSelector:getConfigSelector]; + } +#pragma clang diagnostic pop + } + } + + // Fallback to Objective-C implementation + if (!configuration) { + configuration = [[BranchConfigurationController sharedInstance] getConfiguration]; + } + + [self safeSetValue:configuration forKey:BRANCH_REQUEST_KEY_OPERATIONAL_METRICS onDict:json]; } diff --git a/Sources/BranchSDK/BNCServerInterface.m b/Sources/BranchSDK/BNCServerInterface.m index 37cfcfd1d..9cc4fd789 100644 --- a/Sources/BranchSDK/BNCServerInterface.m +++ b/Sources/BranchSDK/BNCServerInterface.m @@ -148,7 +148,24 @@ - (void)genericHTTPRequest:(NSURLRequest *)request retryNumber:(NSInteger)retryN NSError *error = [NSError branchErrorWithCode:BNCVPNAdBlockerError]; [[BranchLogger shared] logError:[NSString stringWithFormat:@"Possible VPN Ad Blocker. Giving up on request with HTTP status code %ld. Underlying error: %@", (long)status, underlyingError] error:error]; } else { - [[BranchLogger shared] logWarning: [NSString stringWithFormat:@"Giving up on request with HTTP status code %ld", (long)status] error:underlyingError]; + // If a network request is successful, the `data` field will be populated with the error response from the service + // We have to create an NSError object here to pass down to callback. + + if(serverResponse.data && serverResponse.data[@"error"] != nil){ + id errorJson = serverResponse.data[@"error"]; + + if(errorJson[@"message"] != nil){ + NSString *errorString = errorJson[@"message"]; + NSDictionary *userInfo = @{ + NSLocalizedDescriptionKey: errorString, + }; + underlyingError = [NSError errorWithDomain:[NSError bncErrorDomain] + code:[(errorJson[@"code"]) integerValue] + userInfo:userInfo]; + } + } + + [[BranchLogger shared] logError: [NSString stringWithFormat:@"Giving up on request with HTTP status code %ld", (long)status] error:underlyingError]; } } diff --git a/Sources/BranchSDK/BNCServerRequestOperation.m b/Sources/BranchSDK/BNCServerRequestOperation.m new file mode 100644 index 000000000..c06159fbf --- /dev/null +++ b/Sources/BranchSDK/BNCServerRequestOperation.m @@ -0,0 +1,294 @@ +// +// BNCServerRequestOperation.m +// BranchSDK +// +// Created by Nidhi Dixit on 7/22/25. +// Updated: Modern Swift Concurrency bridge +// + +#import "Private/BNCServerRequestOperation.h" +#import "BranchOpenRequest.h" +#import "BranchInstallRequest.h" +#import "BranchEvent.h" +#import "BranchLogger.h" +#import "NSError+Branch.h" +#import "BNCCallbackMap.h" + +// Swift integration - BranchSwiftSDK module is loaded dynamically at runtime +// No compile-time import needed to avoid circular dependencies in SPM +#if !SWIFT_PACKAGE +// Swift bridging header - auto-generated by Xcode when Swift files are present +#if __has_include("BranchSDK/BranchSDK-Swift.h") +#import "BranchSDK/BranchSDK-Swift.h" +#endif +#endif + +@interface BNCServerRequestOperation () +@property (nonatomic, assign, readwrite, getter = isExecuting) BOOL executing; +@property (nonatomic, assign, readwrite, getter = isFinished) BOOL finished; +@property (nonatomic, strong, nullable) id swiftOperation; // BranchRequestOperation for iOS 13+ +@end + +@implementation BNCServerRequestOperation { + BNCServerRequest *_request; +} + +@synthesize executing = _executing; +@synthesize finished = _finished; + +- (instancetype)initWithRequest:(BNCServerRequest *)request { + self = [super init]; + if (self) { + _request = request; + _executing = NO; + _finished = NO; + } + return self; +} + +- (BOOL)isAsynchronous { + return YES; +} + + /*TODO - This can be used for initSafetyCheck and adding dependencies +- (BOOL)isReady { + BOOL ready = [super isReady]; + if (ready) { + + } + return ready; +}*/ + +- (void)setExecuting:(BOOL)executing { + [self willChangeValueForKey:@"isExecuting"]; + _executing = executing; + [self didChangeValueForKey:@"isExecuting"]; +} + +- (void)setFinished:(BOOL)finished { + [self willChangeValueForKey:@"isFinished"]; + _finished = finished; + [self didChangeValueForKey:@"isFinished"]; +} + +- (void)start { + // Use modern Swift Concurrency implementation on iOS 13+ + if (@available(iOS 13.0, tvOS 13.0, *)) { + if ([self shouldUseSwiftImplementation]) { + [self startWithSwiftOperation]; + return; + } + } + + // Fallback to legacy Objective-C implementation + [self startObjectiveCOperation]; +} + +#pragma mark - Swift Concurrency Bridge (iOS 13+) + +- (BOOL)shouldUseSwiftImplementation API_AVAILABLE(ios(13.0), tvos(13.0)) { + // Enable Swift implementation by default on supported platforms + // Can be controlled by feature flag if needed + return YES; +} + +- (void)startWithSwiftOperation API_AVAILABLE(ios(13.0), tvos(13.0)) { + // Create Swift operation with modern async/await + // Try module-qualified name first, then unqualified name + Class swiftOperationClass = NSClassFromString(@"BranchRequestOperation"); + if (!swiftOperationClass) { + swiftOperationClass = NSClassFromString(@"Branch.BranchRequestOperation"); + } + if (!swiftOperationClass) { + swiftOperationClass = NSClassFromString(@"BranchSDK.BranchRequestOperation"); + } + if (!swiftOperationClass) { + [[BranchLogger shared] logWarning:@"BranchRequestOperation (Swift) not available. Falling back to Objective-C implementation." error:nil]; + [self startObjectiveCOperation]; + return; + } + + // Initialize Swift operation + SEL initSelector = NSSelectorFromString(@"initWithRequest:serverInterface:branchKey:preferenceHelper:"); + + // Allocate instance first + id swiftInstance = [swiftOperationClass alloc]; + + // Check if instance responds to initializer + if (![swiftInstance respondsToSelector:initSelector]) { + [[BranchLogger shared] logWarning:@"BranchRequestOperation initializer not found. Falling back to Objective-C implementation." error:nil]; + [self startObjectiveCOperation]; + return; + } + + BNCPreferenceHelper *preferenceHelper = self.preferenceHelper ?: [BNCPreferenceHelper sharedInstance]; + + // Create Swift operation using dynamic invocation + NSMethodSignature *signature = [swiftInstance methodSignatureForSelector:initSelector]; + if (!signature) { + [[BranchLogger shared] logWarning:@"Could not get method signature for Swift initializer. Falling back to Objective-C implementation." error:nil]; + [self startObjectiveCOperation]; + return; + } + + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + [invocation setSelector:initSelector]; + [invocation setTarget:swiftInstance]; + [invocation setArgument:&_request atIndex:2]; + [invocation setArgument:&_serverInterface atIndex:3]; + [invocation setArgument:&_branchKey atIndex:4]; + [invocation setArgument:&preferenceHelper atIndex:5]; + [invocation invoke]; + + id __unsafe_unretained tempOperation; + [invocation getReturnValue:&tempOperation]; + self.swiftOperation = tempOperation; + + if (!self.swiftOperation) { + [[BranchLogger shared] logWarning:@"Failed to create Swift operation. Falling back to Objective-C implementation." error:nil]; + [self startObjectiveCOperation]; + return; + } + + [[BranchLogger shared] logVerbose:[NSString stringWithFormat:@"Using Swift Concurrency implementation for request: %@", self.request.requestUUID] error:nil]; + + // Forward operation lifecycle to Swift implementation + SEL startSelector = NSSelectorFromString(@"start"); + if ([self.swiftOperation respondsToSelector:startSelector]) { + [self.swiftOperation performSelector:startSelector]; + } + + // Monitor Swift operation state and reflect in Objective-C operation + [self observeSwiftOperation]; +} + +- (void)observeSwiftOperation API_AVAILABLE(ios(13.0), tvos(13.0)) { + // Add KVO observers for Swift operation state + [self.swiftOperation addObserver:self + forKeyPath:@"isExecuting" + options:NSKeyValueObservingOptionNew + context:nil]; + [self.swiftOperation addObserver:self + forKeyPath:@"isFinished" + options:NSKeyValueObservingOptionNew + context:nil]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(NSDictionary *)change + context:(void *)context { + if (object == self.swiftOperation) { + if ([keyPath isEqualToString:@"isExecuting"]) { + self.executing = [[change objectForKey:NSKeyValueChangeNewKey] boolValue]; + } else if ([keyPath isEqualToString:@"isFinished"]) { + self.finished = [[change objectForKey:NSKeyValueChangeNewKey] boolValue]; + // Clean up observers when finished + [self.swiftOperation removeObserver:self forKeyPath:@"isExecuting"]; + [self.swiftOperation removeObserver:self forKeyPath:@"isFinished"]; + } + } +} + +#pragma mark - Legacy Objective-C Implementation + +- (void)startObjectiveCOperation { + if (self.isCancelled) { + [[BranchLogger shared] logDebug:[NSString stringWithFormat:@"Operation cancelled before starting: %@", self.request.requestUUID] error:nil]; + self.finished = YES; + return; + } + + self.executing = YES; + [[BranchLogger shared] logVerbose:[NSString stringWithFormat:@"BNCServerRequestOperation (Objective-C) starting for request: %@", self.request.requestUUID] error:nil]; + + // Check if tracking is disabled + if (Branch.trackingDisabled) { + [[BranchLogger shared] logDebug:[NSString stringWithFormat:@"Tracking disabled. Skipping request: %@", self.request.requestUUID] error:nil]; + self.executing = NO; + self.finished = YES; + return; + } + + BNCPreferenceHelper *preferenceHelper = self.preferenceHelper ?: [BNCPreferenceHelper sharedInstance]; + + // Session validation for requests + if (!([self.request isKindOfClass:[BranchInstallRequest class]])) { + if (!preferenceHelper.randomizedBundleToken) { + [[BranchLogger shared] logError:[NSString stringWithFormat:@"User session not initialized (missing bundle token). Dropping request: %@", self.request.requestUUID] error:nil]; + BNCPerformBlockOnMainThreadSync(^{ + [self.request processResponse:nil error:[NSError branchErrorWithCode:BNCInitError]]; + }); + self.executing = NO; + self.finished = YES; + return; + } + } else if (!([self.request isKindOfClass:[BranchOpenRequest class]])) { + if (!preferenceHelper.randomizedDeviceToken || !preferenceHelper.sessionID || !preferenceHelper.randomizedBundleToken) { + [[BranchLogger shared] logError:[NSString stringWithFormat:@"Missing session items (device token or session ID or bundle token). Dropping request: %@", self.request.requestUUID] error:nil]; + BNCPerformBlockOnMainThreadSync(^{ + [self.request processResponse:nil error:[NSError branchErrorWithCode:BNCInitError]]; + }); + self.executing = NO; + self.finished = YES; + return; + } + } + + // TODO: Handle specific `BranchOpenRequest` lock + // `waitForOpenResponseLock` will block the current thread (the NSOperation's background thread) + // until the global open response lock is released. This ensures proper sequencing + // if another init session is in progress. + /* if ([self.request isKindOfClass:[BranchOpenRequest class]]) { + [[BranchLogger shared] logDebug:[NSString stringWithFormat:@"BranchOpenRequest detected. Waiting for open response lock for %@", self.request.requestUUID] error:nil]; + [BranchOpenRequest waitForOpenResponseLock]; + }*/ + + [self.request makeRequest:self.serverInterface + key:self.branchKey + callback:^(BNCServerResponse *response, NSError *error) { + BNCPerformBlockOnMainThreadSync(^{ + [self.request processResponse:response error:error]; + if ([self.request isKindOfClass:[BranchEventRequest class]]) { + [[BNCCallbackMap shared] callCompletionForRequest:self.request withSuccessStatus:(error == nil) error:error]; + } + }); + [[BranchLogger shared] logVerbose:[NSString stringWithFormat:@"BNCServerRequestOperation (Objective-C) finished for request: %@", self.request.requestUUID] error:nil]; + self.executing = NO; + self.finished = YES; + + }]; +} + +- (void)cancel { + [super cancel]; // Sets `isCancelled` to YES + + // Forward cancellation to Swift operation if active + if (@available(iOS 13.0, tvOS 13.0, *)) { + if (self.swiftOperation) { + SEL cancelSelector = NSSelectorFromString(@"cancel"); + if ([self.swiftOperation respondsToSelector:cancelSelector]) { + [self.swiftOperation performSelector:cancelSelector]; + } + } + } + + if (!self.isExecuting) { + self.finished = YES; + [[BranchLogger shared] logWarning:[NSString stringWithFormat:@"BNCServerRequestOperation cancelled before execution for request: %@", self.request.requestUUID] error:nil]; + } else { + [[BranchLogger shared] logWarning:[NSString stringWithFormat:@"BNCServerRequestOperation cancelled during execution for request: %@", self.request.requestUUID] error:nil]; + } +} + +static inline void BNCPerformBlockOnMainThreadSync(dispatch_block_t block) { + if (block) { + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } + } +} + +@end diff --git a/Sources/BranchSDK/BNCServerRequestQueue.m b/Sources/BranchSDK/BNCServerRequestQueue.m old mode 100755 new mode 100644 index c518fccce..097012ea0 --- a/Sources/BranchSDK/BNCServerRequestQueue.m +++ b/Sources/BranchSDK/BNCServerRequestQueue.m @@ -9,143 +9,116 @@ #import "BNCServerRequestQueue.h" #import "BNCPreferenceHelper.h" - -// Analytics requests #import "BranchInstallRequest.h" #import "BranchOpenRequest.h" #import "BranchEvent.h" - #import "BranchLogger.h" +#import "Private/BNCServerRequestOperation.h" +#import "Branch.h" -@interface BNCServerRequestQueue() -@property (strong, nonatomic) NSMutableArray *queue; -@end +@interface BNCServerRequestQueue () +@property (strong, nonatomic) NSOperationQueue *operationQueue; +@property (strong, nonatomic) BNCServerInterface *serverInterface; +@property (copy, nonatomic) NSString *branchKey; +@property (strong, nonatomic) BNCPreferenceHelper *preferenceHelper; + +@end + @implementation BNCServerRequestQueue - (instancetype)init { self = [super init]; - if (!self) return self; - - self.queue = [NSMutableArray new]; + if (self) { + self.operationQueue = [NSOperationQueue new]; + // Set maxConcurrentOperationCount to 1 for serial execution + self.operationQueue.maxConcurrentOperationCount = 1; + self.operationQueue.name = @"com.branch.sdk.serverRequestQueue"; + } return self; } -- (void)enqueue:(BNCServerRequest *)request { - @synchronized (self) { - if (request) { - [self.queue addObject:request]; - } - } +- (void)configureWithServerInterface:(BNCServerInterface *)serverInterface + branchKey:(NSString *)branchKey + preferenceHelper:(BNCPreferenceHelper *)preferenceHelper { + self.serverInterface = serverInterface; + self.branchKey = branchKey; + self.preferenceHelper = preferenceHelper; } -- (void)insert:(BNCServerRequest *)request at:(NSUInteger)index { - @synchronized (self) { - if (index > self.queue.count) { - [[BranchLogger shared] logError:@"Invalid queue operation: index out of bound!" error:nil]; - return; - } - if (request) { - [self.queue insertObject:request atIndex:index]; - } - } +- (void)enqueue:(BNCServerRequest *)request{ + [self enqueue:request withPriority:NSOperationQueuePriorityNormal]; } -- (BNCServerRequest *)dequeue { - @synchronized (self) { - BNCServerRequest *request = nil; - if (self.queue.count > 0) { - request = [self.queue objectAtIndex:0]; - [self.queue removeObjectAtIndex:0]; - } - return request; +- (void)enqueue:(BNCServerRequest *)request withPriority:(NSOperationQueuePriority)priority{ + if (!request) { + [[BranchLogger shared] logError:@"Attempted to enqueue nil request." error:nil]; + return; } -} + + BNCServerRequestOperation *operation = [[BNCServerRequestOperation alloc] initWithRequest:request]; + + operation.serverInterface = self.serverInterface; + operation.branchKey = self.branchKey; + operation.preferenceHelper = self.preferenceHelper; + operation.queuePriority = priority; -- (BNCServerRequest *)removeAt:(NSUInteger)index { - @synchronized (self) { - BNCServerRequest *request = nil; - if (index >= self.queue.count) { - [[BranchLogger shared] logError:@"Invalid queue operation: index out of bound!" error:nil]; - return nil; - } - request = [self.queue objectAtIndex:index]; - [self.queue removeObjectAtIndex:index]; - return request; - } -} + [self.operationQueue addOperation:operation]; -- (void)remove:(BNCServerRequest *)request { - @synchronized (self) { - [self.queue removeObject:request]; - } -} - -- (BNCServerRequest *)peek { - @synchronized (self) { - return [self peekAt:0]; - } -} - -- (BNCServerRequest *)peekAt:(NSUInteger)index { - @synchronized (self) { - if (index >= self.queue.count) { - [[BranchLogger shared] logError:@"Invalid queue operation: index out of bound!" error:nil]; - return nil; - } - BNCServerRequest *request = nil; - request = [self.queue objectAtIndex:index]; - return request; - } + [[BranchLogger shared] logVerbose:[NSString stringWithFormat:@"Enqueued request: %@. Current queue depth: %lu", request.requestUUID, (unsigned long)self.operationQueue.operationCount] error:nil]; } - (NSInteger)queueDepth { - @synchronized (self) { - return (NSInteger) self.queue.count; - } -} - -- (NSString *)description { - @synchronized(self) { - return [self.queue description]; - } + return (NSInteger) self.operationQueue.operationCount; } + - (void)clearQueue { - @synchronized (self) { - [self.queue removeAllObjects]; - } + [[BranchLogger shared] logDebug:@"Clearing all pending operations from the queue." error:nil]; + [self.operationQueue cancelAllOperations]; } +// These methods now need to iterate through the operations in the NSOperationQueue. - (BOOL)containsInstallOrOpen { - @synchronized (self) { - for (NSUInteger i = 0; i < self.queue.count; i++) { - BNCServerRequest *req = [self.queue objectAtIndex:i]; - // Install extends open, so only need to check open. - if ([req isKindOfClass:[BranchOpenRequest class]]) { + for (NSOperation *op in self.operationQueue.operations) { + if ([op isKindOfClass:[BNCServerRequestOperation class]]) { + BNCServerRequestOperation *requestOp = (BNCServerRequestOperation *)op; + if ([requestOp.request isKindOfClass:[BranchOpenRequest class]]) { return YES; } } - return NO; } + return NO; } - (BranchOpenRequest *)findExistingInstallOrOpen { - @synchronized (self) { - for (NSUInteger i = 0; i < self.queue.count; i++) { - BNCServerRequest *request = [self.queue objectAtIndex:i]; - - // Install subclasses open, so only need to check open - // Request should not be the one added from archived queue - if ([request isKindOfClass:[BranchOpenRequest class]] && !((BranchOpenRequest *)request).isFromArchivedQueue) { - return (BranchOpenRequest *)request; + for (NSOperation *op in self.operationQueue.operations) { + if ([op isKindOfClass:[BNCServerRequestOperation class]]) { + BNCServerRequestOperation *requestOp = (BNCServerRequestOperation *)op; + BNCServerRequest *request = requestOp.request; + if ([request isKindOfClass:[BranchOpenRequest class]]) { + BranchOpenRequest *openRequest = (BranchOpenRequest *)request; + return openRequest; } } - return nil; } + return nil; } +- (NSString *)description { + NSMutableArray *requestUUIDs = [NSMutableArray array]; + for (NSOperation *op in self.operationQueue.operations) { + if ([op isKindOfClass:[BNCServerRequestOperation class]]) { + if (!op.isFinished && !op.isCancelled) { + [requestUUIDs addObject:((BNCServerRequestOperation *)op).request.requestUUID]; + } else { + [requestUUIDs addObject:[NSString stringWithFormat:@"(Completed/Cancelled: %@)", ((BNCServerRequestOperation *)op).request.requestUUID]]; + } + } + } + return [NSString stringWithFormat:@" Operations (%ld): %@", self, (long)self.queueDepth, [requestUUIDs description]]; +} + (instancetype)getInstance { static BNCServerRequestQueue *sharedQueue = nil; diff --git a/Sources/BranchSDK/BNCSystemObserver.m b/Sources/BranchSDK/BNCSystemObserver.m index 2bc4b9b83..238ffcb77 100644 --- a/Sources/BranchSDK/BNCSystemObserver.m +++ b/Sources/BranchSDK/BNCSystemObserver.m @@ -8,6 +8,8 @@ #import "BNCSystemObserver.h" #import "BranchLogger.h" +#import "BNCPreferenceHelper.h" + #if __has_feature(modules) @import UIKit; @import SystemConfiguration; @@ -35,32 +37,20 @@ + (NSString *)appleAttributionToken { return nil; } - __block NSString *token = nil; - #if !TARGET_OS_TV if (@available(iOS 14.3, macCatalyst 14.3, *)) { - - // We are getting reports on iOS 14.5 that this API can hang, adding a short timeout for now. - dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); - - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - NSError *error; - NSString *appleAttributionToken = [AAAttribution attributionTokenWithError:&error]; - if (!error) { - token = appleAttributionToken; - } - dispatch_semaphore_signal(semaphore); - }); - - // Apple said this API should respond within 50ms, lets give up after 500 ms - dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int64_t)(500 * NSEC_PER_MSEC))); - if (token == nil) { - [[BranchLogger shared] logError:[NSString stringWithFormat:@"AppleAttributionToken request timed out"] error:nil]; + NSError *error; + NSString *appleAttributionToken = [AAAttribution attributionTokenWithError:&error]; + if (error) { + [[BranchLogger shared] logError:[NSString stringWithFormat:@"AppleAttributionToken API failed, error: %@", [error description]] error:error]; + } + if (appleAttributionToken == nil) { + [[BranchLogger shared] logError:[NSString stringWithFormat:@"AppleAttributionToken returned nil token"] error:nil]; } + return appleAttributionToken; } #endif - - return token; + return nil; } + (NSString *)advertiserIdentifier { diff --git a/Sources/BranchSDK/Branch-Bridging-Header.h b/Sources/BranchSDK/Branch-Bridging-Header.h new file mode 100644 index 000000000..5837a1458 --- /dev/null +++ b/Sources/BranchSDK/Branch-Bridging-Header.h @@ -0,0 +1,14 @@ +// +// Branch-Bridging-Header.h +// Branch SDK +// +// Bridging header to expose Objective-C types to Swift within the Branch target +// + +#import "Branch.h" +#import "BNCServerRequest.h" +#import "BNCServerInterface.h" +#import "BNCServerResponse.h" +#import "BNCPreferenceHelper.h" +#import "BranchLogger.h" +#import "NSError+Branch.h" diff --git a/Sources/BranchSDK/Branch.m b/Sources/BranchSDK/Branch.m index ed72dd9fa..98fab4460 100644 --- a/Sources/BranchSDK/Branch.m +++ b/Sources/BranchSDK/Branch.m @@ -45,12 +45,17 @@ #import "BNCServerAPI.h" #import "BranchPluginSupport.h" #import "BranchLogger.h" +#import "Private/BranchConfigurationController.h" -#if SWIFT_PACKAGE -@import BranchSwiftSDK; -#else -#import "BranchSDK/BranchSDK-Swift.h" + +// Swift integration - BranchSwiftSDK module is loaded dynamically at runtime +// No compile-time import needed to avoid circular dependencies in SPM +#if !SWIFT_PACKAGE +// Swift bridging header - auto-generated by Xcode when Swift files are present +#if __has_include("BranchSDK-Swift.h") +#import "BranchSDK-Swift.h" +#endif #endif #if !TARGET_OS_TV @@ -194,7 +199,7 @@ + (Branch *)getInstance { + (Branch *)getInstance:(NSString *)branchKey { self.branchKey = branchKey; - [ConfigurationController shared].branchKeySource = BRANCH_KEY_SOURCE_GET_INSTANCE_API; + [BranchConfigurationController sharedInstance].branchKeySource = BRANCH_KEY_SOURCE_GET_INSTANCE_API; return [Branch getInstanceInternal:self.branchKey]; } @@ -250,12 +255,11 @@ - (id)initWithInterface:(BNCServerInterface *)interface // queue up async data loading [self loadApplicationData]; [self loadUserAgent]; - [self startLoadingOfODMInfo]; BranchJsonConfig *config = BranchJsonConfig.instance; self.deferInitForPluginRuntime = config.deferInitForPluginRuntime; - [ConfigurationController shared].deferInitForPluginRuntime = self.deferInitForPluginRuntime; - + [BranchConfigurationController sharedInstance].deferInitForPluginRuntime = self.deferInitForPluginRuntime; + if (config.apiUrl) { [Branch setAPIUrl:config.apiUrl]; } @@ -282,10 +286,12 @@ - (id)initWithInterface:(BNCServerInterface *)interface } } + [self.requestQueue configureWithServerInterface:_serverInterface branchKey:key preferenceHelper:preferenceHelper]; return self; } static Class bnc_networkServiceClass = NULL; +static callbackForTracingRequests bnc_tracingCallback = nil; + (void)setNetworkServiceClass:(Class)networkServiceClass { @synchronized ([Branch class]) { @@ -416,7 +422,7 @@ + (void)setBranchKey:(NSString*)branchKey error:(NSError **)error { [[BranchLogger shared] logError:[NSString stringWithFormat:@"Invalid Branch key format. Did you add your Branch key to your Info.plist? Passed key is '%@'.", branchKey] error:*error]; return; } - [ConfigurationController shared].branchKeySource = BRANCH_KEY_SOURCE_SET_BRANCH_KEY_API; + [BranchConfigurationController sharedInstance].branchKeySource = BRANCH_KEY_SOURCE_SET_BRANCH_KEY_API; bnc_branchKey = branchKey; } } @@ -452,7 +458,7 @@ + (NSString *)branchKey { if (!bnc_branchKey) { [[BranchLogger shared] logError:@"Your Branch key is not set in your Info.plist file. See https://dev.branch.io/getting-started/sdk-integration-guide/guide/ios/#configure-xcode-project for configuration instructions." error:nil]; } - [ConfigurationController shared].branchKeySource = branchKeySource; + [BranchConfigurationController sharedInstance].branchKeySource = branchKeySource; return bnc_branchKey; } } @@ -545,6 +551,19 @@ - (void)setRetryInterval:(NSTimeInterval)retryInterval { self.preferenceHelper.retryInterval = retryInterval; } ++ (void)setSDKWaitTimeForThirdPartyAPIs:(NSTimeInterval)waitTime { + @synchronized(self) { + if (waitTime <= 0) { + [[BranchLogger shared] logWarning:@"Invalid waitTime value. It must be greater than 0. Using default value." error:nil]; + return; + } + if (waitTime > 10) { + [[BranchLogger shared] logWarning:@"Invalid waitTime value. It must not exceed 10 seconds. Using default value." error:nil]; + return; + } + [BNCPreferenceHelper sharedInstance].thirdPartyAPIsWaitTime = waitTime; + } +} - (void)setRequestMetadataKey:(NSString *)key value:(NSString *)value { [self.preferenceHelper setRequestMetadataKey:key value:value]; @@ -603,7 +622,6 @@ + (void)setODMInfo:(NSString *)odmInfo andFirstOpenTimestamp:(NSDate *) firstOpe @synchronized (self) { [[BNCPreferenceHelper sharedInstance] setOdmInfo:odmInfo]; [BNCPreferenceHelper sharedInstance].odmInfoInitDate = firstOpenTimestamp; - [[BNCODMInfoCollector instance] loadODMInfo]; } #else [[BranchLogger shared] logWarning:@"setODMInfo not supported on tvOS." error:nil]; @@ -611,6 +629,16 @@ + (void)setODMInfo:(NSString *)odmInfo andFirstOpenTimestamp:(NSDate *) firstOpe } ++ (void)setAnonID:(NSString *)anonID { + @synchronized (self) { + if (anonID && [anonID isKindOfClass:[NSString class]]) { + [BNCPreferenceHelper sharedInstance].anonID = anonID; + } else { + [[BranchLogger shared] logWarning:@"Invalid anonID provided. Must be a non-nil NSString." error:nil]; + } + } +} + - (void)setConsumerProtectionAttributionLevel:(BranchAttributionLevel)level { self.preferenceHelper.attributionLevel = level; @@ -691,6 +719,10 @@ - (void)initSessionWithLaunchOptions:(NSDictionary *)options automaticallyDispla [self initSessionWithLaunchOptions:options isReferrable:isReferrable explicitlyRequestedReferrable:YES automaticallyDisplayController:automaticallyDisplayController registerDeepLinkHandler:callback]; } ++ (void) setCallbackForTracingRequests: (callbackForTracingRequests) callback { + bnc_tracingCallback = callback; +} + #pragma mark - Actual Init Session - (void)initSessionWithLaunchOptions:(NSDictionary *)options isReferrable:(BOOL)isReferrable explicitlyRequestedReferrable:(BOOL)explicitlyRequestedReferrable automaticallyDisplayController:(BOOL)automaticallyDisplayController registerDeepLinkHandlerUsingBranchUniversalObject:(callbackWithBranchUniversalObject)callback { @@ -1000,21 +1032,12 @@ - (void)loadApplicationData { }); } -- (void)startLoadingOfODMInfo { - #if !TARGET_OS_TV - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [[BranchLogger shared] logVerbose:@"Loading ODM info ..." error:nil]; - [[BNCODMInfoCollector instance] loadODMInfo]; - }); - #endif -} - #pragma mark - Apple Search Ad Check - (void)checkPasteboardOnInstall { [BNCPasteboard sharedInstance].checkOnInstall = YES; - [ConfigurationController shared].checkPasteboardOnInstall = YES; + [BranchConfigurationController sharedInstance].checkPasteboardOnInstall = YES; } - (BOOL)willShowPasteboardToast { @@ -1150,7 +1173,6 @@ - (void)sendServerRequest:(BNCServerRequest*)request { [self initSafetyCheck]; dispatch_async(self.isolationQueue, ^(){ [self.requestQueue enqueue:request]; - [self processNextQueueItem]; }); } @@ -1350,7 +1372,6 @@ - (void)getSpotlightUrlWithParams:(NSDictionary *)params callback:(callbackWithP dispatch_async(self.isolationQueue, ^(){ BranchSpotlightUrlRequest *req = [[BranchSpotlightUrlRequest alloc] initWithParams:params callback:callback]; [self.requestQueue enqueue:req]; - [self processNextQueueItem]; }); } @@ -1646,7 +1667,6 @@ - (void)generateShortUrl:(NSArray *)tags linkCache:self.linkCache callback:callback]; [self.requestQueue enqueue:req]; - [self processNextQueueItem]; }); } @@ -1875,14 +1895,6 @@ - (void)setNetworkCount:(NSInteger)networkCount { } } -- (void)insertRequestAtFront:(BNCServerRequest *)req { - if (self.networkCount == 0) { - [self.requestQueue insert:req at:0]; - } else { - [self.requestQueue insert:req at:1]; - } -} - static inline void BNCPerformBlockOnMainThreadSync(dispatch_block_t block) { if (block) { if ([NSThread isMainThread]) { @@ -1893,19 +1905,19 @@ static inline void BNCPerformBlockOnMainThreadSync(dispatch_block_t block) { } } -//static inline void BNCPerformBlockOnMainThreadAsync(dispatch_block_t block) { -// dispatch_async(dispatch_get_main_queue(), block); -//} - (void) processRequest:(BNCServerRequest*)req response:(BNCServerResponse*)response error:(NSError*)error { // If the request was successful, or was a bad user request, continue processing. - if (!error || + // Also skipping retry for 1xx(Informational), 2xx(Success), 3xx(Redirectional Message) and 4xx(Client)error codes. + // NOTE: This method is deprecated - request processing is now handled by BNCServerRequestOperation + /* if (!error || error.code == BNCTrackingDisabledError || error.code == BNCBadRequestError || - error.code == BNCDuplicateResourceError) { + error.code == BNCDuplicateResourceError || + ((100 <= error.code) && (error.code <= 499))) { BNCPerformBlockOnMainThreadSync(^{ [req processResponse:response error:error]; @@ -1956,7 +1968,7 @@ - (void) processRequest:(BNCServerRequest*)req } }); } - } + }*/ } - (BOOL)isReplayableRequest:(BNCServerRequest *)request { @@ -1980,6 +1992,7 @@ - (BOOL)isReplayableRequest:(BNCServerRequest *)request { } - (void)processNextQueueItem { + /* dispatch_semaphore_wait(self.processing_sema, DISPATCH_TIME_FOREVER); [[BranchLogger shared] logVerbose:[NSString stringWithFormat:@"Processing next queue item. Network Count: %ld. Queue depth: %ld", (long)self.networkCount, (long)self.requestQueue.queueDepth] error:nil]; @@ -2027,7 +2040,7 @@ - (void)processNextQueueItem { } else { dispatch_semaphore_signal(self.processing_sema); - } + }*/ } - (void)clearNetworkQueue { @@ -2165,8 +2178,9 @@ - (void)initializeSessionAndCallCallback:(BOOL)callCallback sceneIdentifier:(NSS } req.callback = initSessionCallback; req.urlString = urlString; + req.traceCallback = bnc_tracingCallback; - [self.requestQueue insert:req at:0]; + [self.requestQueue enqueue:req withPriority:NSOperationQueuePriorityHigh]; NSString *message = [NSString stringWithFormat:@"Request %@ callback %@ link %@", req, req.callback, req.urlString]; [[BranchLogger shared] logDebug:message error:nil]; @@ -2180,7 +2194,7 @@ - (void)initializeSessionAndCallCallback:(BOOL)callCallback sceneIdentifier:(NSS req.urlString = urlString; // put it behind the one that's already on queue - [self.requestQueue insert:req at:1]; + [self.requestQueue enqueue:req withPriority:NSOperationQueuePriorityHigh]; [[BranchLogger shared] logDebug:@"Link resolution request" error:nil]; NSString *message = [NSString stringWithFormat:@"Request %@ callback %@ link %@", req, req.callback, req.urlString]; @@ -2190,8 +2204,6 @@ - (void)initializeSessionAndCallCallback:(BOOL)callCallback sceneIdentifier:(NSS self.initializationStatus = BNCInitStatusInitializing; [[BranchLogger shared] logVerbose:[NSString stringWithFormat:@"initializationStatus %ld", self.initializationStatus] error:nil]; - - [self processNextQueueItem]; }); } } diff --git a/Sources/BranchSDK/BranchConfigurationController.m b/Sources/BranchSDK/BranchConfigurationController.m index e9a0f35dc..e2d16c29c 100644 --- a/Sources/BranchSDK/BranchConfigurationController.m +++ b/Sources/BranchSDK/BranchConfigurationController.m @@ -5,7 +5,7 @@ // Created by Nidhi Dixit on 6/2/25. // -#import "BranchConfigurationController.h" +#import "Private/BranchConfigurationController.h" #import "BNCPreferenceHelper.h" #import "BranchLogger.h" #import "BranchConstants.h" diff --git a/Sources/BranchSDK_ObjC/BranchConstants.m b/Sources/BranchSDK/BranchConstants.m similarity index 98% rename from Sources/BranchSDK_ObjC/BranchConstants.m rename to Sources/BranchSDK/BranchConstants.m index d5ee04498..920583cbb 100644 --- a/Sources/BranchSDK_ObjC/BranchConstants.m +++ b/Sources/BranchSDK/BranchConstants.m @@ -55,8 +55,6 @@ NSString * const BRANCH_REQUEST_KEY_IS_SIMULATOR = @"is_simulator"; NSString * const BRANCH_REQUEST_KEY_LOG = @"log"; NSString * const BRANCH_REQUEST_KEY_INSTRUMENTATION = @"instrumentation"; -NSString * const BRANCH_REQUEST_KEY_APPLE_RECEIPT = @"apple_receipt"; -NSString * const BRANCH_REQUEST_KEY_APPLE_TESTFLIGHT = @"apple_testflight"; NSString * const BRANCH_REQUEST_KEY_APP_CLIP_BUNDLE_ID = @"app_clip_bundle_id"; NSString * const BRANCH_REQUEST_KEY_LATEST_APP_CLIP_INSTALL_TIME = @"latest_app_clip_time"; diff --git a/Sources/BranchSDK/BranchInstallRequest.m b/Sources/BranchSDK/BranchInstallRequest.m index 1c3c0a510..6d3bac230 100644 --- a/Sources/BranchSDK/BranchInstallRequest.m +++ b/Sources/BranchSDK/BranchInstallRequest.m @@ -22,7 +22,10 @@ - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key ca BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key UUID:self.requestUUID TimeStamp:self.requestCreationTimeStamp]; NSDictionary *params = [factory dataForInstallWithURLString:self.urlString]; - [serverInterface postRequest:params url:[[BNCServerAPI sharedInstance] installServiceURL] key:key callback:callback]; + self.requestParams = [params copy]; + self.requestServiceURL = [[BNCServerAPI sharedInstance] installServiceURL]; + + [serverInterface postRequest:params url:self.requestServiceURL key:key callback:callback]; } - (NSString *)getActionName { diff --git a/Sources/BranchSDK/BranchOpenRequest.m b/Sources/BranchSDK/BranchOpenRequest.m index 7b5a440bb..4d9ea41c2 100644 --- a/Sources/BranchSDK/BranchOpenRequest.m +++ b/Sources/BranchSDK/BranchOpenRequest.m @@ -50,14 +50,20 @@ - (id)initWithCallback:(callbackWithStatus)callback isInstall:(BOOL)isInstall { - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key UUID:self.requestUUID TimeStamp:self.requestCreationTimeStamp]; NSDictionary *params = [factory dataForOpenWithURLString:self.urlString]; - + self.requestParams = [params copy]; + self.requestServiceURL = [[BNCServerAPI sharedInstance] openServiceURL]; [serverInterface postRequest:params - url:[[BNCServerAPI sharedInstance] openServiceURL] + url: self.requestServiceURL key:key callback:callback]; } - (void)processResponse:(BNCServerResponse *)response error:(NSError *)error { + + if (self.traceCallback) { + self.traceCallback(self.urlString, self.requestParams, response.data, error, self.requestServiceURL); + } + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; if (error && preferenceHelper.dropURLOpen) { // Ignore this response from the server. Dummy up a response: diff --git a/Sources/BranchSDK/BranchQRCode.m b/Sources/BranchSDK/BranchQRCode.m index 32182dec4..b598dbb5d 100644 --- a/Sources/BranchSDK/BranchQRCode.m +++ b/Sources/BranchSDK/BranchQRCode.m @@ -8,6 +8,7 @@ #import #import "BranchQRCode.h" #import "Branch.h" +#import "BNCServerRequest.h" #import "BNCQRCodeCache.h" #import "BNCConfig.h" #import "BranchConstants.h" @@ -15,7 +16,6 @@ #import "UIViewController+Branch.h" #import "BranchLogger.h" #import "BNCServerAPI.h" -#import "BranchConstants.h" #import "BNCEncodingUtils.h" @interface BranchQRCode() diff --git a/Sources/BranchSDK/Private/BNCAppleReceipt.h b/Sources/BranchSDK/Private/BNCAppleReceipt.h deleted file mode 100644 index afeaf0c0e..000000000 --- a/Sources/BranchSDK/Private/BNCAppleReceipt.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// BNCAppleReceipt.h -// Branch -// -// Created by Ernest Cho on 7/11/19. -// Copyright © 2019 Branch, Inc. All rights reserved. -// - -#if __has_feature(modules) -@import Foundation; -#else -#import -#endif - -NS_ASSUME_NONNULL_BEGIN - -@interface BNCAppleReceipt : NSObject - -+ (BNCAppleReceipt *)sharedInstance; - -// this is only available on builds from Apple -- (nullable NSString *)installReceipt; -- (BOOL)isTestFlight; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Sources/BranchSDK/Private/BNCODMInfoCollector.h b/Sources/BranchSDK/Private/BNCODMInfoCollector.h index a2e064bd8..18b2ae8d1 100644 --- a/Sources/BranchSDK/Private/BNCODMInfoCollector.h +++ b/Sources/BranchSDK/Private/BNCODMInfoCollector.h @@ -19,8 +19,6 @@ NS_ASSUME_NONNULL_BEGIN @interface BNCODMInfoCollector : NSObject + (BNCODMInfoCollector *_Nullable) instance; - -@property (nonatomic, copy, readwrite) NSString * _Nullable odmInfo; /** * Checks if the given date is within the specified validity window from the current time. * @param initTime The reference date to check against. @@ -29,17 +27,11 @@ NS_ASSUME_NONNULL_BEGIN */ - (BOOL)isWithinValidityWindow:(NSDate *)initTime timeInterval:(NSTimeInterval)timeInterval; -/** - * Loads ODM information either from cache or from the device. - */ -- (void)loadODMInfo; - /** * Loads ODM information with a specified timeout. - * @param timeOut The maximum time to wait for ODM information. * @param completion Optional completion handler called when ODM info is loaded. */ -- (void)loadODMInfoWithTimeOut:(dispatch_time_t) timeOut andCompletionHandler:(void (^_Nullable)(NSString * _Nullable odmInfo, NSError * _Nullable error))completion; // Added completion handler for unit tests +- (void)loadODMInfoWithCompletionHandler:(void (^_Nullable)(NSString * _Nullable odmInfo, NSError * _Nullable error))completion; - (void)fetchODMInfoFromDeviceWithInitDate:(NSDate *) date andCompletion:(void (^)(NSString *odmInfo, NSError *error))completion; diff --git a/Sources/BranchSDK/Private/BNCServerRequestOperation.h b/Sources/BranchSDK/Private/BNCServerRequestOperation.h new file mode 100644 index 000000000..41bc1e074 --- /dev/null +++ b/Sources/BranchSDK/Private/BNCServerRequestOperation.h @@ -0,0 +1,25 @@ +// +// BNCServerRequestOperation.h +// BranchSDK +// +// Created by Nidhi Dixit on 7/22/25. +// + + +#import +#import "BNCServerRequest.h" +#import "BNCCallbacks.h" + + +@interface BNCServerRequestOperation : NSOperation + +@property (nonatomic, strong, readonly) BNCServerRequest *request; + +@property (nonatomic, strong) BNCServerInterface *serverInterface; +@property (nonatomic, copy) NSString *branchKey; +@property (nonatomic, strong) BNCPreferenceHelper *preferenceHelper; + +- (instancetype)initWithRequest:(BNCServerRequest *)request NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; // Prevent calling default init + +@end diff --git a/Sources/BranchSDK/Private/BranchOpenRequest.h b/Sources/BranchSDK/Private/BranchOpenRequest.h index ec5717cd6..30b0ea1c3 100644 --- a/Sources/BranchSDK/Private/BranchOpenRequest.h +++ b/Sources/BranchSDK/Private/BranchOpenRequest.h @@ -15,6 +15,9 @@ @property (nonatomic, copy, readwrite) NSString *urlString; @property (assign, nonatomic) BOOL isFromArchivedQueue; @property (nonatomic, copy) callbackWithStatus callback; +@property (nonatomic, copy) callbackForTracingRequests traceCallback; +@property (strong, nonatomic) NSDictionary *requestParams; +@property (nonatomic, copy, readwrite) NSString *requestServiceURL; + (void) waitForOpenResponseLock; + (void) releaseOpenResponseLock; diff --git a/Sources/BranchSDK/Public/BNCCallbacks.h b/Sources/BranchSDK/Public/BNCCallbacks.h index 88669acf6..d2ee8d24e 100644 --- a/Sources/BranchSDK/Public/BNCCallbacks.h +++ b/Sources/BranchSDK/Public/BNCCallbacks.h @@ -21,3 +21,4 @@ typedef void (^callbackWithList) (NSArray * _Nullable list, NSError * _Nullable typedef void (^callbackWithUrlAndSpotlightIdentifier) (NSString * _Nullable url, NSString * _Nullable spotlightIdentifier, NSError * _Nullable error); typedef void (^callbackWithBranchUniversalObject) (BranchUniversalObject * _Nullable universalObject, BranchLinkProperties * _Nullable linkProperties, NSError * _Nullable error); typedef void (^callbackWithData) (NSData * _Nullable data, NSError * _Nullable error); +typedef void (^callbackForTracingRequests) ( NSString * _Nullable url, NSDictionary * _Nullable request, NSDictionary * _Nullable response, NSError * _Nullable error, NSString * _Nullable requestServiceURL); diff --git a/Sources/BranchSDK/Private/BNCConfig.h b/Sources/BranchSDK/Public/BNCConfig.h similarity index 100% rename from Sources/BranchSDK/Private/BNCConfig.h rename to Sources/BranchSDK/Public/BNCConfig.h diff --git a/Sources/BranchSDK/Public/BNCPreferenceHelper.h b/Sources/BranchSDK/Public/BNCPreferenceHelper.h index f664b7f72..d3253bd5a 100644 --- a/Sources/BranchSDK/Public/BNCPreferenceHelper.h +++ b/Sources/BranchSDK/Public/BNCPreferenceHelper.h @@ -46,6 +46,7 @@ NSURL* /* _Nonnull */ BNCURLForBranchDirectory(void); @property (assign, nonatomic) NSInteger retryCount; @property (assign, nonatomic) NSTimeInterval retryInterval; @property (assign, nonatomic) NSTimeInterval timeout; +@property (assign, nonatomic) NSTimeInterval thirdPartyAPIsWaitTime; @property (copy, nonatomic) NSString *externalIntentURI; @property (strong, nonatomic) NSMutableDictionary *savedAnalyticsData; @property (copy, nonatomic) NSString *lastSystemBuildVersion; diff --git a/Sources/BranchSDK/Public/BNCServerRequestQueue.h b/Sources/BranchSDK/Public/BNCServerRequestQueue.h old mode 100755 new mode 100644 index 1c9d9391f..81d85192d --- a/Sources/BranchSDK/Public/BNCServerRequestQueue.h +++ b/Sources/BranchSDK/Public/BNCServerRequestQueue.h @@ -7,23 +7,22 @@ // #import "BNCServerRequest.h" +#import +#import "BNCServerRequest.h" + @class BranchOpenRequest; @interface BNCServerRequestQueue : NSObject ++ (instancetype)getInstance; + +- (void)configureWithServerInterface:(BNCServerInterface *)serverInterface + branchKey:(NSString *)branchKey + preferenceHelper:(BNCPreferenceHelper *)preferenceHelper; - (void)enqueue:(BNCServerRequest *)request; -- (BNCServerRequest *)dequeue; -- (BNCServerRequest *)peek; -- (BNCServerRequest *)peekAt:(NSUInteger)index; -- (void)insert:(BNCServerRequest *)request at:(NSUInteger)index; -- (BNCServerRequest *)removeAt:(NSUInteger)index; -- (void)remove:(BNCServerRequest *)request; +- (void)enqueue:(BNCServerRequest *)request withPriority:(NSOperationQueuePriority)priority; - (void)clearQueue; -- (NSInteger)queueDepth; - - (BOOL)containsInstallOrOpen; - - (BranchOpenRequest *)findExistingInstallOrOpen; -+ (id)getInstance; @end diff --git a/Sources/BranchSDK/Public/Branch.h b/Sources/BranchSDK/Public/Branch.h index 75ca5f03a..714e2fdc0 100644 --- a/Sources/BranchSDK/Public/Branch.h +++ b/Sources/BranchSDK/Public/Branch.h @@ -37,7 +37,6 @@ #import "BNCLinkCache.h" #import "BNCPreferenceHelper.h" #import "BNCServerInterface.h" -#import "BNCServerRequestQueue.h" #import "BranchLogger.h" // Not used by Branch singleton public API @@ -151,6 +150,10 @@ extern NSString * __nonnull const BNCShareCompletedEvent; // Spotlight Constant extern NSString * __nonnull const BNCSpotlightFeature; +// Forward declarations for types used in testing APIs +@class BNCServerRequestQueue; +@class BNCServerRequest; + #pragma mark - BranchLink @interface BranchLink : NSObject @@ -602,6 +605,8 @@ Sets a custom base safetrack URL for non-linking calls to the Branch API. + (void)setSafetrackAPIURL:(NSString *)url ; ++ (void)setCallbackForTracingRequests: (callbackForTracingRequests) callback ; + /** @brief Use the `validateSDKIntegration` method as a debugging aid to assure that you've integrated the Branch SDK correctly. @@ -752,6 +757,14 @@ Sets a custom base safetrack URL for non-linking calls to the Branch API. */ - (void)setNetworkTimeout:(NSTimeInterval)timeout; +/** + Set the SDK wait time for third party APIs (for fetching ODM info and Apple Attribution Token) to finish + This timeout should be > 0 and <= 10 seconds. + + @param waitTime Number of seconds before third party API calls are considered timed out. Default is 0.5 seconds (500ms). + */ ++ (void)setSDKWaitTimeForThirdPartyAPIs:(NSTimeInterval)waitTime; + /** Disable callouts to ad networks for all events for a user; by default Branch sends callouts to ad networks. @@ -836,6 +849,12 @@ Sets a custom base safetrack URL for non-linking calls to the Branch API. + (void)setODMInfo:(NSString *)odmInfo andFirstOpenTimestamp:(NSDate *) firstOpenTimestamp; +/** + Sets a custom Meta Anon ID for the current user. + @param anonID The custom Meta Anon ID to be used by Branch. + */ ++ (void)setAnonID:(NSString *)anonID; + /** * Enumeration representing different levels of consumer protection attribution levels */ diff --git a/Sources/BranchSDK_ObjC/Public/BranchConstants.h b/Sources/BranchSDK/Public/BranchConstants.h similarity index 98% rename from Sources/BranchSDK_ObjC/Public/BranchConstants.h rename to Sources/BranchSDK/Public/BranchConstants.h index b08ec65f7..e5f634934 100644 --- a/Sources/BranchSDK_ObjC/Public/BranchConstants.h +++ b/Sources/BranchSDK/Public/BranchConstants.h @@ -60,8 +60,6 @@ extern NSString * const BRANCH_REQUEST_KEY_IS_SIMULATOR; extern NSString * const BRANCH_REQUEST_KEY_LOG; extern NSString * const BRANCH_REQUEST_KEY_EXTERNAL_INTENT_URI; extern NSString * const BRANCH_REQUEST_KEY_INSTRUMENTATION; -extern NSString * const BRANCH_REQUEST_KEY_APPLE_RECEIPT; -extern NSString * const BRANCH_REQUEST_KEY_APPLE_TESTFLIGHT; extern NSString * const BRANCH_REQUEST_KEY_APP_CLIP_BUNDLE_ID; extern NSString * const BRANCH_REQUEST_KEY_LATEST_APP_CLIP_INSTALL_TIME; diff --git a/Sources/BranchSDK/Public/BranchEvent.h b/Sources/BranchSDK/Public/BranchEvent.h index 484fb529e..1de43d5fa 100644 --- a/Sources/BranchSDK/Public/BranchEvent.h +++ b/Sources/BranchSDK/Public/BranchEvent.h @@ -7,6 +7,7 @@ // #import "Branch.h" +#import "BNCServerRequest.h" #import "BranchUniversalObject.h" #import @@ -60,6 +61,9 @@ typedef NS_ENUM(NSInteger, BranchEventAdType) { #pragma mark - BranchEvent + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" @interface BranchEvent : NSObject - (instancetype _Nonnull) initWithName:(NSString*_Nonnull)name NS_DESIGNATED_INITIALIZER; @@ -118,6 +122,8 @@ typedef NS_ENUM(NSInteger, BranchEventAdType) { @end +#pragma clang diagnostic pop + #pragma mark - BranchEventRequest @interface BranchEventRequest : BNCServerRequest diff --git a/Sources/BranchSDK/Public/BranchSDK.h b/Sources/BranchSDK/Public/BranchSDK.h index bd9d758cd..4a54d863b 100644 --- a/Sources/BranchSDK/Public/BranchSDK.h +++ b/Sources/BranchSDK/Public/BranchSDK.h @@ -19,6 +19,7 @@ FOUNDATION_EXPORT const unsigned char BranchSDKVersionString[]; #import "BranchScene.h" #import "BranchDelegate.h" +#import "BNCConfig.h" #import "BranchEvent.h" #import "BranchLinkProperties.h" diff --git a/Sources/BranchSwiftSDK/BranchRequestOperation.swift b/Sources/BranchSwiftSDK/BranchRequestOperation.swift new file mode 100644 index 000000000..425694691 --- /dev/null +++ b/Sources/BranchSwiftSDK/BranchRequestOperation.swift @@ -0,0 +1,300 @@ +// +// BranchRequestOperation.swift +// BranchSDK +// +// Created by Branch SDK Team +// Modern Swift Concurrency implementation for request processing +// + +import Foundation + +// Import BranchSDK when building as Swift Package +#if SWIFT_PACKAGE +import BranchSDK +#endif + +// When building as part of Xcode project, types are available through module +// No additional import needed - Swift sees Objective-C through the module + +/// Modern Swift Concurrency-based operation for processing Branch server requests. +/// This class provides a structured concurrency approach similar to Android's Kotlin Coroutines implementation, +/// replacing manual GCD dispatch queues with async/await patterns. +/// +/// Key features: +/// - Structured concurrency with proper cancellation support +/// - Actor-based thread safety +/// - Automatic main thread dispatching for callbacks +/// - Session validation matching Android implementation +/// - Performance optimized with cooperative thread pool +@available(iOS 13.0, tvOS 13.0, *) +@objc(BranchRequestOperation) +public final class BranchRequestOperation: Operation, @unchecked Sendable { + + // MARK: - Properties + + /// The server request to be processed + private let request: BNCServerRequest + + /// Server interface for network operations + private let serverInterface: BNCServerInterface + + /// Branch API key + private let branchKey: String + + /// Preference helper for session data + private let preferenceHelper: BNCPreferenceHelper + + /// Task handle for async execution + private var executionTask: Task? + + // MARK: - Operation State Management + + private var _isExecuting = false { + willSet { + willChangeValue(forKey: "isExecuting") + } + didSet { + didChangeValue(forKey: "isExecuting") + } + } + + private var _isFinished = false { + willSet { + willChangeValue(forKey: "isFinished") + } + didSet { + didChangeValue(forKey: "isFinished") + } + } + + public override var isExecuting: Bool { _isExecuting } + public override var isFinished: Bool { _isFinished } + public override var isAsynchronous: Bool { true } + + // MARK: - Initialization + + /// Creates a new request operation with modern Swift Concurrency + /// - Parameters: + /// - request: The server request to process + /// - serverInterface: Network interface for API calls + /// - branchKey: Branch API key + /// - preferenceHelper: Helper for accessing session preferences + @objc(initWithRequest:serverInterface:branchKey:preferenceHelper:) + public init( + request: BNCServerRequest, + serverInterface: BNCServerInterface, + branchKey: String, + preferenceHelper: BNCPreferenceHelper + ) { + self.request = request + self.serverInterface = serverInterface + self.branchKey = branchKey + self.preferenceHelper = preferenceHelper + super.init() + } + + // MARK: - Operation Lifecycle + + public override func start() { + guard !isCancelled else { + BranchLogger.shared().logDebug( + "Operation cancelled before starting: \(request.requestUUID ?? "unknown")", + error: nil + ) + finish() + return + } + + _isExecuting = true + + BranchLogger.shared().logVerbose( + "BranchRequestOperation starting for request: \(request.requestUUID ?? "unknown")", + error: nil + ) + + // Launch async task with structured concurrency + executionTask = Task { [weak self] in + await self?.executeRequest() + } + } + + public override func cancel() { + executionTask?.cancel() + super.cancel() + + if !isExecuting { + BranchLogger.shared().logWarning( + "BranchRequestOperation cancelled before execution for request: \(request.requestUUID ?? "unknown")", + error: nil + ) + } else { + BranchLogger.shared().logWarning( + "BranchRequestOperation cancelled during execution for request: \(request.requestUUID ?? "unknown")", + error: nil + ) + } + } + + // MARK: - Request Execution (Swift Concurrency) + + /// Executes the request using modern async/await patterns + /// Similar to Android's suspend fun executeRequest() + private func executeRequest() async { + // Early return if cancelled + guard !Task.isCancelled else { + finish() + return + } + + // Check if tracking is disabled + guard !Branch.trackingDisabled() else { + BranchLogger.shared().logDebug( + "Tracking disabled. Skipping request: \(request.requestUUID ?? "unknown")", + error: nil + ) + finish() + return + } + + // Validate session (similar to Android session checks) + guard validateSession() else { + // BNCInitError code from NSError+Branch.h + await processError(1001, message: "Session validation failed") + finish() + return + } + + // Execute network request with continuation-based callback bridge + await withCheckedContinuation { (continuation: CheckedContinuation) in + request.make( + serverInterface, + key: branchKey + ) { [weak self] response, error in + guard let self = self else { + continuation.resume() + return + } + + // Handle response on main thread (equivalent to Android's Dispatchers.Main) + Task { @MainActor in + await self.handleResponse(response, error: error) + continuation.resume() + } + } + } + + BranchLogger.shared().logVerbose( + "BranchRequestOperation finished for request: \(request.requestUUID ?? "unknown")", + error: nil + ) + + finish() + } + + // MARK: - Session Validation + + /// Validates session requirements based on request type + /// Matches Android's session validation logic in BranchRequestQueue.kt + /// - Returns: true if session is valid for this request type + private func validateSession() -> Bool { + let requestClassName = String(describing: type(of: request)) + let requestUUID = request.requestUUID ?? "unknown" + + // Install requests only need bundle token + if requestClassName.contains("BranchInstallRequest") { + guard preferenceHelper.randomizedBundleToken != nil else { + BranchLogger.shared().logError( + "User session not initialized (missing bundle token). Dropping request: \(requestUUID)", + error: nil + ) + return false + } + return true + } + + // Open requests need bundle token + if requestClassName.contains("BranchOpenRequest") { + guard preferenceHelper.randomizedBundleToken != nil else { + BranchLogger.shared().logError( + "User session not initialized (missing bundle token). Dropping request: \(requestUUID)", + error: nil + ) + return false + } + return true + } + + // All other requests need full session (device token, session ID, bundle token) + guard preferenceHelper.randomizedDeviceToken != nil, + preferenceHelper.sessionID != nil, + preferenceHelper.randomizedBundleToken != nil else { + BranchLogger.shared().logError( + "Missing session items (device token or session ID or bundle token). Dropping request: \(requestUUID)", + error: nil + ) + return false + } + + return true + } + + // MARK: - Response Handling + + /// Handles the server response on main thread + /// Equivalent to Android's withContext(Dispatchers.Main) { handleResponse() } + /// - Parameters: + /// - response: Server response (if successful) + /// - error: Error (if failed) + @MainActor + private func handleResponse(_ response: BNCServerResponse?, error: Error?) async { + // Process response on main thread + request.processResponse(response, error: error) + + // Handle event-specific callbacks + // Check if request is BranchEventRequest by class name (Objective-C class) + let requestClassName = String(describing: type(of: request)) + if requestClassName.contains("BranchEventRequest") { + // Use dynamic method invocation for Objective-C callback + let callbackMap = NSClassFromString("BNCCallbackMap") + let sharedSelector = NSSelectorFromString("shared") + if let callbackMapClass = callbackMap as? NSObject.Type, + callbackMapClass.responds(to: sharedSelector), + let shared = callbackMapClass.perform(sharedSelector)?.takeUnretainedValue() { + let callSelector = NSSelectorFromString("callCompletionForRequest:withSuccessStatus:error:") + if shared.responds(to: callSelector) { + // Perform with proper selector invocation + typealias CallCompletionFunc = @convention(c) (AnyObject, Selector, AnyObject, Bool, Error?) -> Void + let implementation = shared.method(for: callSelector) + let callCompletion = unsafeBitCast(implementation, to: CallCompletionFunc.self) + callCompletion(shared, callSelector, request as AnyObject, error == nil, error) + + } + } + } + } + + /// Processes error and calls request failure handler on main thread + /// - Parameters: + /// - errorCode: Branch error code (Int value) + /// - message: Error message + @MainActor + private func processError(_ errorCode: Int, message: String) async { + // Create NSError with BNCInitError code + let error = NSError( + domain: "io.branch.sdk.error", + code: errorCode, + userInfo: [NSLocalizedDescriptionKey: message] + ) + BranchLogger.shared().logError(message, error: error) + request.processResponse(nil, error: error) + } + + // MARK: - State Management + + /// Marks the operation as finished + /// Triggers KVO notifications for operation queue management + private func finish() { + _isExecuting = false + _isFinished = true + } +} diff --git a/Sources/BranchSwiftSDK/BranchRequestQueue.swift b/Sources/BranchSwiftSDK/BranchRequestQueue.swift new file mode 100644 index 000000000..6cd9ab99a --- /dev/null +++ b/Sources/BranchSwiftSDK/BranchRequestQueue.swift @@ -0,0 +1,322 @@ +// +// BranchRequestQueue.swift +// BranchSDK +// +// Created by Branch SDK Team +// Modern Actor-based request queue with Swift Concurrency +// + +import Foundation + +// Import BranchSDK when building as Swift Package +#if SWIFT_PACKAGE +import BranchSDK +#endif + +// When building as part of Xcode project, types are available through module +// No additional import needed - Swift sees Objective-C through the module + +/// Modern actor-based request queue using Swift Concurrency patterns. +/// This implementation replaces manual NSOperationQueue management with structured concurrency, +/// similar to Android's Kotlin Coroutines BranchRequestQueue.kt implementation. +/// +/// Key features: +/// - Actor isolation for thread-safe queue management +/// - Serial request processing with structured concurrency +/// - Automatic request prioritization +/// - Session-aware request handling +/// - Modern async/await API +/// +/// Architecture parallels: +/// - Android: CoroutineScope + Channel -> iOS: Actor + AsyncStream +/// - Android: Dispatchers.IO -> iOS: Task.detached +/// - Android: Dispatchers.Main -> iOS: MainActor +@available(iOS 13.0, tvOS 13.0, *) +public actor BranchRequestQueue { + + // MARK: - Properties + + /// Operation queue for managing request operations + /// Serial execution (maxConcurrentOperationCount = 1) ensures proper request ordering + private let operationQueue: OperationQueue + + /// Server interface for network operations + private var serverInterface: BNCServerInterface? + + /// Branch API key + private var branchKey: String? + + /// Preference helper for session management + private var preferenceHelper: BNCPreferenceHelper? + + /// Processing channel for triggering queue processing + /// Similar to Android's Channel for processing triggers + private let (processingStream, processingContinuation) = AsyncStream.makeStream() + + /// Queue state tracking + private var isProcessing = false + + /// Singleton instance + private static let _shared = BranchRequestQueue() + + // MARK: - Singleton Access + + /// Returns the shared instance of BranchRequestQueue + /// Thread-safe singleton pattern using actor isolation + public static func shared() -> BranchRequestQueue { + return _shared + } + + // MARK: - Initialization + + private init() { + operationQueue = OperationQueue() + operationQueue.maxConcurrentOperationCount = 1 // Serial execution + operationQueue.name = "com.branch.sdk.requestQueue.modern" + operationQueue.qualityOfService = .userInitiated + + BranchLogger.shared().logDebug("BranchRequestQueue (Swift Actor) initialized", error: nil) + } + + // MARK: - Configuration + + /// Configures the queue with required dependencies + /// - Parameters: + /// - serverInterface: Network interface for API calls + /// - branchKey: Branch API key + /// - preferenceHelper: Helper for session preferences + public func configure( + serverInterface: BNCServerInterface, + branchKey: String, + preferenceHelper: BNCPreferenceHelper + ) { + self.serverInterface = serverInterface + self.branchKey = branchKey + self.preferenceHelper = preferenceHelper + + BranchLogger.shared().logDebug( + "BranchRequestQueue configured with key: \(branchKey.prefix(8))...", + error: nil + ) + } + + // MARK: - Queue Operations + + /// Enqueues a request with default priority + /// - Parameter request: The server request to enqueue + public func enqueue(_ request: BNCServerRequest) async { + await enqueue(request, priority: .normal) + } + + /// Enqueues a request with specified priority + /// Similar to Android's enqueue() with priority handling + /// - Parameters: + /// - request: The server request to enqueue + /// - priority: Operation queue priority + public func enqueue(_ request: BNCServerRequest, priority: Operation.QueuePriority) async { + guard let serverInterface = serverInterface, + let branchKey = branchKey, + let preferenceHelper = preferenceHelper else { + BranchLogger.shared().logError( + "BranchRequestQueue not configured. Call configure() first.", + error: nil + ) + return + } + + guard let requestUUID = request.requestUUID else { + BranchLogger.shared().logError("Request missing UUID. Cannot enqueue.", error: nil) + return + } + + // Create modern Swift operation + let operation = BranchRequestOperation( + request: request, + serverInterface: serverInterface, + branchKey: branchKey, + preferenceHelper: preferenceHelper + ) + operation.queuePriority = priority + + // Add to operation queue + operationQueue.addOperation(operation) + + BranchLogger.shared().logVerbose( + "Enqueued request: \(requestUUID). Current queue depth: \(queueDepth)", + error: nil + ) + + // Trigger processing + processingContinuation.yield() + } + + /// Returns current queue depth + /// Equivalent to Android's queueDepth property + public var queueDepth: Int { + return operationQueue.operationCount + } + + /// Clears all pending operations from the queue + /// Similar to Android's clearQueue() + public func clearQueue() { + BranchLogger.shared().logDebug( + "Clearing all pending operations from queue. Current depth: \(queueDepth)", + error: nil + ) + operationQueue.cancelAllOperations() + } + + // MARK: - Queue Inspection + + /// Checks if queue contains install or open request + /// - Returns: true if install or open request is present + public func containsInstallOrOpen() -> Bool { + for operation in operationQueue.operations { + if let requestOp = operation as? BranchRequestOperation, + let mirror = Mirror(reflecting: requestOp).descendant("request"), + let request = mirror as? BNCServerRequest { + let requestClassName = String(describing: type(of: request)) + if requestClassName.contains("BranchOpenRequest") || + requestClassName.contains("BranchInstallRequest") { + return true + } + } + } + return false + } + + /// Finds existing install or open request in queue + /// - Returns: The open request if found, nil otherwise (as AnyObject) + public func findExistingInstallOrOpen() -> AnyObject? { + for operation in operationQueue.operations { + if let requestOp = operation as? BranchRequestOperation, + let mirror = Mirror(reflecting: requestOp).descendant("request"), + let request = mirror as? BNCServerRequest { + let requestClassName = String(describing: type(of: request)) + if requestClassName.contains("BranchOpenRequest") || + requestClassName.contains("BranchInstallRequest") { + return request + } + } + } + return nil + } + + // MARK: - Queue State Description + + /// Returns detailed description of queue state + /// Useful for debugging and logging + public var description: String { + let operations = operationQueue.operations + let operationDescriptions = operations.compactMap { operation -> String? in + if let requestOp = operation as? BranchRequestOperation, + let mirror = Mirror(reflecting: requestOp).descendant("request"), + let request = mirror as? BNCServerRequest, + let uuid = request.requestUUID { + if operation.isFinished || operation.isCancelled { + return "(Completed/Cancelled: \(uuid))" + } else { + return uuid + } + } + return nil + } + + return """ + + Queue Depth: \(queueDepth) + Operations: [\(operationDescriptions.joined(separator: ", "))] + """ + } +} + +// MARK: - Objective-C Bridge + +/// Objective-C compatible wrapper for BranchRequestQueue +/// Provides seamless interop with existing Objective-C code +@available(iOS 13.0, tvOS 13.0, *) +@objc(BranchRequestQueueModern) +public class BranchRequestQueueBridge: NSObject { + + private let queue: BranchRequestQueue + + @objc public static let shared = BranchRequestQueueBridge() + + private override init() { + queue = BranchRequestQueue.shared() + super.init() + } + + /// Configures the queue (Objective-C compatible) + @objc public func configure( + serverInterface: BNCServerInterface, + branchKey: String, + preferenceHelper: BNCPreferenceHelper + ) { + Task { + await queue.configure( + serverInterface: serverInterface, + branchKey: branchKey, + preferenceHelper: preferenceHelper + ) + } + } + + /// Enqueues a request with default priority (Objective-C compatible) + @objc public func enqueue(_ request: BNCServerRequest) { + Task { + await queue.enqueue(request) + } + } + + /// Enqueues a request with priority (Objective-C compatible) + @objc public func enqueue(_ request: BNCServerRequest, priority: Operation.QueuePriority) { + Task { + await queue.enqueue(request, priority: priority) + } + } + + /// Enqueues with completion callback (Objective-C compatible) + @objc public func enqueue(_ request: BNCServerRequest, completion: @escaping (Error?) -> Void) { + Task { + await queue.enqueue(request) + await MainActor.run { + completion(nil) + } + } + } + + /// Current queue depth (Objective-C compatible) + @objc public var queueDepth: Int { + var depth = 0 + Task { + depth = await queue.queueDepth + } + return depth + } + + /// Clears queue (Objective-C compatible) + @objc public func clearQueue() { + Task { + await queue.clearQueue() + } + } + + /// Checks for install/open request (Objective-C compatible) + @objc public func containsInstallOrOpen() -> Bool { + var contains = false + Task { + contains = await queue.containsInstallOrOpen() + } + return contains + } + + /// Finds install/open request (Objective-C compatible) + @objc public func findExistingInstallOrOpen() -> AnyObject? { + var openRequest: AnyObject? + Task { + openRequest = await queue.findExistingInstallOrOpen() + } + return openRequest + } +} diff --git a/Sources/BranchSDK_Swift/ConfigurationController.swift b/Sources/BranchSwiftSDK/ConfigurationController.swift similarity index 63% rename from Sources/BranchSDK_Swift/ConfigurationController.swift rename to Sources/BranchSwiftSDK/ConfigurationController.swift index 9b468a048..b6215d039 100644 --- a/Sources/BranchSDK_Swift/ConfigurationController.swift +++ b/Sources/BranchSwiftSDK/ConfigurationController.swift @@ -9,9 +9,26 @@ import Foundation #if SWIFT_PACKAGE -import BranchObjCSDK +import BranchSDK #endif +// MARK: - Branch Constants (Swift equivalents from BranchConstants.h) + +/// Branch request key constants +/// These match the Objective-C constants defined in BranchConstants.m (lines 186-196) +private let BRANCH_REQUEST_KEY_BRANCH_KEY_SOURCE = "branch_key_source" +private let BRANCH_REQUEST_KEY_CHECK_PASTEBOARD_ON_INSTALL = "checkPasteboardOnInstall" +private let BRANCH_REQUEST_KEY_DEFER_INIT_FOR_PLUGIN_RUNTIME = "deferInitForPluginRuntime" +private let BRANCH_REQUEST_KEY_LINKED_FRAMEORKS = "linked_frameworks" // Note: typo "FRAMEORKS" in constant name is intentional + +/// Framework identification constants +/// These match the Objective-C constants defined in BranchConstants.m (lines 197-201) +private let FRAMEWORK_ATT_TRACKING_MANAGER = "ATTrackingManager" +private let FRAMEWORK_AD_SUPPORT = "AdSupport" +private let FRAMEWORK_AD_SAFARI_SERVICES = "SafariServices" +private let FRAMEWORK_AD_APP_ADS_ONDEVICE_CONVERSION = "AppAdsOnDeviceConversion" +private let FRAMEWORK_AD_FIREBASE_CRASHLYTICS = "FirebaseCrashlytics" + @objcMembers public class ConfigurationController: NSObject { @@ -21,7 +38,9 @@ public class ConfigurationController: NSObject { public var checkPasteboardOnInstall: Bool = false // MARK: - Singleton - @MainActor public static let shared = ConfigurationController() + // Note: Removed @MainActor to allow synchronous access from Objective-C code + // Thread safety is handled internally within the class methods + @objc public static let shared = ConfigurationController() private override init() { // Private initializer to enforce singleton usage. @@ -30,11 +49,11 @@ public class ConfigurationController: NSObject { public func getConfiguration() -> [String: Any] { var config: [String: Any] = [:] - + config.merge(branchKeyInfo()) { (_, new) in new } config.merge(featureFlagsInfo()) { (_, new) in new } config.merge(frameworkIntegrationInfo()) { (_, new) in new } - + return config } @@ -62,9 +81,9 @@ public class ConfigurationController: NSObject { FRAMEWORK_AD_SAFARI_SERVICES: isClassAvailable(className: "SFSafariViewController"), FRAMEWORK_AD_APP_ADS_ONDEVICE_CONVERSION: isClassAvailable(className: "ODCConversionManager") ] - + info[BRANCH_REQUEST_KEY_LINKED_FRAMEORKS] = linkedFrameworks - + return info }