diff --git a/.github/workflows/automation-trigger-test.yml b/.github/workflows/automation-trigger-test.yml index 6888e7e4b..cdbf77488 100644 --- a/.github/workflows/automation-trigger-test.yml +++ b/.github/workflows/automation-trigger-test.yml @@ -23,7 +23,7 @@ jobs: BROWSERSTACK_USER: ${{ secrets.BROWSER_STACK_USER }} steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install the Apple certificate and provisioning profile env: BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} @@ -69,7 +69,7 @@ jobs: echo "::add-mask::$parsed" echo "APP_URL=$parsed" >> "$GITHUB_ENV" - name: Cheout Automation Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: BranchMetrics/qentelli-saas-sdk-testing-automation token: ${{ secrets.BRANCHLET_ACCESS_TOKEN_PUBLIC }} diff --git a/.github/workflows/dependabot-merger.yml b/.github/workflows/dependabot-merger.yml index 2804f0588..b39c57492 100644 --- a/.github/workflows/dependabot-merger.yml +++ b/.github/workflows/dependabot-merger.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: master diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 1f3a9a1dd..079e2cf9e 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -9,7 +9,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby 2.7 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/post-release-qa.yml b/.github/workflows/post-release-qa.yml index 758e6a14d..869796deb 100644 --- a/.github/workflows/post-release-qa.yml +++ b/.github/workflows/post-release-qa.yml @@ -8,7 +8,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install pod, build project and run tests run: | ./scripts/getSimulator @@ -20,7 +20,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run carthage command, build project and run tests run: | ./scripts/getSimulator @@ -32,7 +32,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: build project and run tests run: | ./scripts/getSimulator @@ -43,7 +43,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install pod, build project and run tests run: | ./scripts/getSimulator diff --git a/.github/workflows/pre-release-qa.yml b/.github/workflows/pre-release-qa.yml index 2494bf6ce..2178d9faf 100644 --- a/.github/workflows/pre-release-qa.yml +++ b/.github/workflows/pre-release-qa.yml @@ -7,7 +7,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install pod, build project and run tests run: | echo "branch=${{ github.ref }}" >> $GITHUB_OUTPUT @@ -20,7 +20,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create Cart File, run carthage command, build project and run tests env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} @@ -36,7 +36,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: build project and run tests run: | ./scripts/getSimulator @@ -47,7 +47,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: build xcframework, then build project and run tests run: | ./scripts/getSimulator @@ -59,7 +59,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: build static xcframework, then build project and run tests run: | ./scripts/getSimulator @@ -71,7 +71,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install pod, build project and run tests run: | ./scripts/getSimulator @@ -83,7 +83,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Verify Integration using Carthage for tvOS run: | ./scripts/getSimulator @@ -94,7 +94,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: build xcframework, then build project and run tests run: | ./scripts/getSimulator diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 93c2160f3..29a3fa190 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run static analysis run: | xcodebuild analyze -project BranchSDK.xcodeproj @@ -31,7 +31,7 @@ jobs: # needs: [static-analysis] # steps: # - name: Check out code - # uses: actions/checkout@v3 + # uses: actions/checkout@v4 # - name: Update Version # run: | # if [[ ${{ inputs.version }} == "patch" ]]; then @@ -56,7 +56,7 @@ jobs: needs: [static-analysis] steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build xcframework run: | ./scripts/prep_xcframework.sh @@ -74,7 +74,7 @@ jobs: needs: [static-analysis] steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build xcframework run: | ./scripts/prep_xcframework_noidfa.sh @@ -92,7 +92,7 @@ jobs: needs: [static-analysis] steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build static xcframework run: | ./scripts/prep_static_xcframework.sh @@ -110,7 +110,7 @@ jobs: needs: [static-analysis] steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build static xcframework run: | ./scripts/prep_static_xcframework_noidfa.sh @@ -127,7 +127,7 @@ jobs: needs: [build-framework, build-static-framework, build-noidfa-framework, build-static-noidfa-framework] steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby 2.7 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3adc37e2c..c310eb430 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -17,7 +17,7 @@ jobs: issues: write steps: - - uses: actions/stale@v8 + - uses: actions/stale@v5 with: repo-token: ${{ secrets.STALE_PERSONAL_ACCESS_TOKEN }} days-before-issue-stale: 60 diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 2e6e534eb..bb594cba0 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -10,7 +10,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby 2.7 uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index a621c4fcc..38b7f9842 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -15,7 +15,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby 2.7 uses: ruby/setup-ruby@v1 with: diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m b/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m index 5f70fcb68..3740e9e8f 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m @@ -13,361 +13,109 @@ #import "BranchConstants.h" @interface BNCAPIServerTest : XCTestCase - +@property (nonatomic, strong, readwrite) BNCServerAPI *serverAPI; +@property (nonatomic, strong, readwrite) NSString *optedInStatus; @end @implementation BNCAPIServerTest -- (void)testInstallServiceURL { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - - NSString *url = [serverAPI installServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v1/install"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testOpenServiceURL { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - - NSString *url = [serverAPI openServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v1/open"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); +- (void)setUp { + self.serverAPI = [BNCServerAPI sharedInstance]; + self.optedInStatus = [BNCSystemObserver attOptedInStatus]; } -- (void)testStandardEventServiceURL { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; +- (void)testGetBaseURLWithVersion { - NSString *url = [serverAPI standardEventServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v2/event/standard"; + NSString *urlStr = [[BNCServerAPI sharedInstance] getBaseURLWithVersion]; + NSString *expectedUrlStr; - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testCustomEventServiceURL { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; + if ([self.optedInStatus isEqualToString:@"authorized"]){ + expectedUrlStr = [BNC_SAFETRACK_API_URL stringByAppendingFormat:@"/%@/", BNC_API_VERSION_3]; + } else { + expectedUrlStr = [BNC_API_URL stringByAppendingFormat:@"/%@/", BNC_API_VERSION_3]; + } - NSString *url = [serverAPI customEventServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v2/event/custom"; + XCTAssertTrue([urlStr isEqualToString:expectedUrlStr]); - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testLinkServiceURL { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; + [self.serverAPI setUseEUServers:true]; + urlStr = [[BNCServerAPI sharedInstance] getBaseURLWithVersion]; - NSString *url = [serverAPI linkServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v1/url"; + if ([self.optedInStatus isEqualToString:@"authorized"]){ + expectedUrlStr = [BNC_SAFETRACK_EU_API_URL stringByAppendingFormat:@"/%@/", BNC_API_VERSION_3]; + } else { + expectedUrlStr = [BNC_EU_API_URL stringByAppendingFormat:@"/%@/", BNC_API_VERSION_3]; + } - XCTAssertTrue([url isEqualToString:expectedUrlStr]); + XCTAssertTrue([urlStr isEqualToString:expectedUrlStr]); + [self.serverAPI setUseEUServers:false]; } -- (void)testQRCodeServiceURL { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - - NSString *url = [serverAPI qrcodeServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v1/qr-code"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testLATDServiceURL { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - - NSString *url = [serverAPI latdServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v1/cpid/latd"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testValidationServiceURL { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - - NSString *url = [serverAPI validationServiceURL]; - NSString *expectedUrlPrefix= @"https://api3.branch.io/v1/app-link-settings"; - - XCTAssertTrue([url hasPrefix:expectedUrlPrefix]); -} - -- (void)testInstallServiceURL_Tracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI installServiceURL]; - NSString *expectedUrlStr = @"https://api-safetrack.branch.io/v1/install"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testOpenServiceURL_Tracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI openServiceURL]; - NSString *expectedUrlStr = @"https://api-safetrack.branch.io/v1/open"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testStandardEventServiceURL_Tracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI standardEventServiceURL]; - NSString *expectedUrlStr = @"https://api-safetrack.branch.io/v2/event/standard"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testCustomEventServiceURL_Tracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI customEventServiceURL]; - NSString *expectedUrlStr = @"https://api-safetrack.branch.io/v2/event/custom"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testLinkServiceURL_Tracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI linkServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v1/url"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testQRCodeServiceURL_Tracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI qrcodeServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v1/qr-code"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testLATDServiceURL_Tracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI latdServiceURL]; - NSString *expectedUrlStr = @"https://api3.branch.io/v1/cpid/latd"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testValidationServiceURL_Tracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI validationServiceURL]; - NSString *expectedUrlPrefix= @"https://api3.branch.io/v1/app-link-settings"; - - XCTAssertTrue([url hasPrefix:expectedUrlPrefix]); -} - -- (void)testInstallServiceURL_EU { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - - NSString *url = [serverAPI installServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v1/install"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testOpenServiceURL_EU { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - - NSString *url = [serverAPI openServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v1/open"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testStandardEventServiceURL_EU { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - - NSString *url = [serverAPI standardEventServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v2/event/standard"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testCustomEventServiceURL_EU { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - - NSString *url = [serverAPI customEventServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v2/event/custom"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testLinkServiceURL_EU { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - - NSString *url = [serverAPI linkServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v1/url"; - - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testQRCodeServiceURL_EU { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - - NSString *url = [serverAPI qrcodeServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v1/qr-code"; +- (void)testInstallServiceURL { + NSURL *url; + NSString *expectedUrlStr; - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testLATDServiceURL_EU { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - - NSString *url = [serverAPI latdServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v1/cpid/latd"; + [self.serverAPI setUseEUServers:true]; + url = [[BNCServerAPI sharedInstance] installServiceURL]; - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testValidationServiceURL_EU { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - - NSString *url = [serverAPI validationServiceURL]; - NSString *expectedUrlPrefix= @"https://api3-eu.branch.io/v1/app-link-settings"; + if ([self.optedInStatus isEqualToString:@"authorized"]){ + expectedUrlStr = [BNC_SAFETRACK_EU_API_URL stringByAppendingFormat:@"/%@/%@", BNC_API_VERSION_3, BRANCH_REQUEST_ENDPOINT_INSTALL]; + } else { + expectedUrlStr = [BNC_EU_API_URL stringByAppendingFormat:@"/%@/%@", BNC_API_VERSION_3, BRANCH_REQUEST_ENDPOINT_INSTALL]; + } - XCTAssertTrue([url hasPrefix:expectedUrlPrefix]); + XCTAssertTrue([url isEqual:[ NSURL URLWithString:expectedUrlStr]]); + [self.serverAPI setUseEUServers:false]; } -- (void)testInstallServiceURL_EUTracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - serverAPI.useTrackingDomain = YES; +- (void)testOpenServiceURL { + NSURL *url; + NSString *expectedUrlStr; - NSString *url = [serverAPI installServiceURL]; - NSString *expectedUrlStr = @"https://api-safetrack-eu.branch.io/v1/install"; + [self.serverAPI setUseEUServers:true]; + url = [[BNCServerAPI sharedInstance] openServiceURL]; - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testOpenServiceURL_EUTracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI openServiceURL]; - NSString *expectedUrlStr = @"https://api-safetrack-eu.branch.io/v1/open"; + if ([self.optedInStatus isEqualToString:@"authorized"]){ + expectedUrlStr = [BNC_SAFETRACK_EU_API_URL stringByAppendingFormat:@"/%@/%@", BNC_API_VERSION_3, BRANCH_REQUEST_ENDPOINT_OPEN]; + } else { + expectedUrlStr = [BNC_EU_API_URL stringByAppendingFormat:@"/%@/%@", BNC_API_VERSION_3, BRANCH_REQUEST_ENDPOINT_OPEN]; + } - XCTAssertTrue([url isEqualToString:expectedUrlStr]); + XCTAssertTrue([url isEqual:[ NSURL URLWithString:expectedUrlStr]]); + [self.serverAPI setUseEUServers:false]; } -- (void)testStandardEventServiceURL_EUTracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI standardEventServiceURL]; - NSString *expectedUrlStr = @"https://api-safetrack-eu.branch.io/v2/event/standard"; +- (void)testEventServiceURL { + NSURL *url; + NSString *expectedUrlStr; - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testCustomEventServiceURL_EUTracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI customEventServiceURL]; - NSString *expectedUrlStr = @"https://api-safetrack-eu.branch.io/v2/event/custom"; + [self.serverAPI setUseEUServers:true]; + url = [[BNCServerAPI sharedInstance] eventServiceURL]; - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testLinkServiceURL_EUTracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI linkServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v1/url"; + if ([self.optedInStatus isEqualToString:@"authorized"]){ + expectedUrlStr = [BNC_SAFETRACK_EU_API_URL stringByAppendingFormat:@"/%@/%@", BNC_API_VERSION_3, BRANCH_REQUEST_ENDPOINT_USER_COMPLETED_ACTION]; + } else { + expectedUrlStr = [BNC_EU_API_URL stringByAppendingFormat:@"/%@/%@", BNC_API_VERSION_3, BRANCH_REQUEST_ENDPOINT_USER_COMPLETED_ACTION]; + } - XCTAssertTrue([url isEqualToString:expectedUrlStr]); + XCTAssertTrue([url isEqual:[ NSURL URLWithString:expectedUrlStr]]); + [self.serverAPI setUseEUServers:false]; } -- (void)testQRCodeServiceURL_EUTracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI qrcodeServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v1/qr-code"; +- (void)testLinkServiceURL { + NSURL *url; + NSString *expectedUrlStr; - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testLATDServiceURL_EUTracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI latdServiceURL]; - NSString *expectedUrlStr = @"https://api3-eu.branch.io/v1/cpid/latd"; + [self.serverAPI setUseEUServers:true]; + url = [[BNCServerAPI sharedInstance] linkServiceURL]; - XCTAssertTrue([url isEqualToString:expectedUrlStr]); -} - -- (void)testValidationServiceURL_EUTracking { - BNCServerAPI *serverAPI = [BNCServerAPI new]; - serverAPI.automaticallyEnableTrackingDomain = NO; - serverAPI.useEUServers = YES; - serverAPI.useTrackingDomain = YES; - - NSString *url = [serverAPI validationServiceURL]; - NSString *expectedUrlPrefix= @"https://api3-eu.branch.io/v1/app-link-settings"; + if ([self.optedInStatus isEqualToString:@"authorized"]){ + expectedUrlStr = [BNC_SAFETRACK_EU_API_URL stringByAppendingFormat:@"/%@/%@", BNC_API_VERSION_3, BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL]; + } else { + expectedUrlStr = [BNC_EU_API_URL stringByAppendingFormat:@"/%@/%@", BNC_API_VERSION_3, BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL]; + } - XCTAssertTrue([url hasPrefix:expectedUrlPrefix]); + XCTAssertTrue([url isEqual:[ NSURL URLWithString:expectedUrlStr]]); + [self.serverAPI setUseEUServers:false]; } @end diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m index faff0ef96..4660d2c43 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m @@ -25,8 +25,7 @@ - (void)tearDown { - (void)testReceiptOnSimulator { BNCAppleReceipt *receipt = [[BNCAppleReceipt alloc] init]; - // Appears the simulator can have a receipt - //XCTAssertNil([receipt installReceipt]); + XCTAssertNil([receipt installReceipt]); XCTAssertFalse([receipt isTestFlight]); } diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCDeviceInfoTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCDeviceInfoTests.m index fdbe51220..e28563f13 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCDeviceInfoTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCDeviceInfoTests.m @@ -82,6 +82,11 @@ - (void)testIsFirstOptIn { XCTAssert(self.deviceInfo.isFirstOptIn == NO); } +- (void)testIsAdTrackingEnabled { + // on iOS 14+, this is always NO + XCTAssert(self.deviceInfo.isAdTrackingEnabled == NO); +} + - (void)testLocalIPAddress { NSString *address = [self.deviceInfo localIPAddress]; XCTAssertNotNil(address); @@ -187,4 +192,16 @@ - (void)testRegisterPluginNameVersion { XCTAssert([expectedVersion isEqualToString:self.deviceInfo.pluginVersion]); } +// just a sanity check on the V2 dictionary +- (void)testV2Dictionary { + NSDictionary *dict = [self.deviceInfo v2dictionary]; + XCTAssertNotNil(dict); + XCTAssertNotNil(dict[@"brand"]); + XCTAssertNotNil(dict[@"os"]); + XCTAssertNotNil(dict[@"sdk"]); + XCTAssertNotNil(dict[@"sdk_version"]); + + XCTAssertNil(dict[@"disable_ad_network_callouts"]); +} + @end diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m index e1a12126e..a16b4e224 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m @@ -52,8 +52,6 @@ - (void)testPreferenceSets { XCTAssertEqual(self.prefHelper.timeout, NSIntegerMax); } -/* - // This test is not reliable when run concurrently with other tests that set the patterListURL - (void)testURLFilter { XCTAssertTrue([@"https://cdn.branch.io" isEqualToString:self.prefHelper.patternListURL]); @@ -61,7 +59,17 @@ - (void)testURLFilter { self.prefHelper.patternListURL = customURL; XCTAssertTrue([customURL isEqualToString:self.prefHelper.patternListURL]); } - */ + +// only verifies that the flag is stored correctly +// there are no tests to verify close calls are sent or omitted +- (void)testSendCloseRequests { + XCTAssertFalse(self.prefHelper.sendCloseRequests); + [self.prefHelper setSendCloseRequests:YES]; + XCTAssertTrue(self.prefHelper.sendCloseRequests); + + // restore to default + [self.prefHelper setSendCloseRequests:NO]; +} - (void)testSerializeDict_Nil { NSMutableDictionary *dict = nil; @@ -202,7 +210,6 @@ - (void)testURLSkipList { XCTAssert([filterDesc isEqualToString:valueDesc]); } -/* - (void)testSetAPIURL_Example { NSString *url = @"https://www.example.com/"; @@ -258,6 +265,5 @@ - (void)testSetCDNBaseURL_InvalidEmpty { XCTAssert(![urlStored isEqualToString:@""]); XCTAssert([urlStored isEqualToString:BNC_CDN_URL]); } - */ @end diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCServerInterface.Test.m b/Branch-TestBed/Branch-SDK-Tests/BNCServerInterface.Test.m index c2b220f93..23436a4a2 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCServerInterface.Test.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCServerInterface.Test.m @@ -347,6 +347,52 @@ - (void)testPostRequestAsyncRetriesWhenInappropriateRetryCount { [self waitForExpectationsWithTimeout:1.0 handler:nil]; } +//================================================================================== +// TEST 09 +// Test certifcate pinning functionality. + +// We do NOT pin by default anymore. +//- (void) testCertificatePinning { +// +// [OHHTTPStubs removeAllStubs]; +// BNCServerInterface *serverInterface = [[BNCServerInterface alloc] init]; +// +// XCTestExpectation* pinSuccess = [self expectationWithDescription:@"PinSuccess1"]; +// [serverInterface getRequest:[NSDictionary new] +// url:@"https://branch.io" +// key:@"" +// callback:^ (BNCServerResponse*response, NSError*error) { +// XCTAssertEqualObjects(response.statusCode, @200); +// [pinSuccess fulfill]; +// }]; +// +// XCTestExpectation* pinFail1 = [self expectationWithDescription:@"PinFail1"]; +// [serverInterface getRequest:[NSDictionary new] +// url:@"https://google.com" +// key:@"" +// callback:^ (BNCServerResponse*response, NSError*error) { +// XCTAssertEqualObjects(response.statusCode, @-999); +// [pinFail1 fulfill]; +// }]; +// +//#if 0 +// // TODO: Fix so the end point so the test works on external (outside the Branch office) networks. +// +// XCTestExpectation* pinFail2 = [self expectationWithDescription:@"PinFail2"]; +// [serverInterface getRequest:[NSDictionary new] +// url:@"https://internal-cert-pinning-test-470549067.us-west-1.elb.amazonaws.com/" +// key:@"" +// callback:^ (BNCServerResponse*response, NSError*error) { +// XCTAssertEqualObjects(response.statusCode, @-999); +// //XCTAssertEqualObjects(response.statusCode, @200); +// [pinFail2 fulfill]; +// }]; +//#endif +// +// [self waitForExpectationsWithTimeout:10.0 handler:nil]; +//} + + //================================================================================== // TEST 10 // Test mapping of X-Branch-Request-Id to [BNCServerResponse requestId] diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueOldTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueOldTests.m index 9ca55fd3b..ee736b062 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueOldTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueOldTests.m @@ -9,6 +9,7 @@ #import "BNCTestCase.h" #import "BNCServerRequestQueue.h" #import "BranchOpenRequest.h" +#import "BranchCloseRequest.h" #import #import "Branch.h" diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m index 4d8664b82..af286b38a 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m @@ -9,6 +9,7 @@ #import #import "BNCServerRequestQueue.h" #import "BNCServerRequest.h" +#import "BranchCloseRequest.h" // Analytics requests #import "BranchInstallRequest.h" diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCSystemObserverTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCSystemObserverTests.m index 2eb3cb282..90c483959 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCSystemObserverTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCSystemObserverTests.m @@ -77,6 +77,10 @@ - (void)testIsSimulator_Simulator { XCTAssert([BNCSystemObserver isSimulator]); } +- (void)testAdTrackingEnabled { + XCTAssert(![BNCSystemObserver adTrackingEnabled]); +} + - (void)testAdvertiserIdentifier_NoATTPrompt { XCTAssertNil([BNCSystemObserver advertiserIdentifier]); } diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCURLFilterTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCURLFilterTests.m index bc9c797f6..42dfa1af5 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCURLFilterTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCURLFilterTests.m @@ -32,19 +32,16 @@ - (void) tearDown { [BNCPreferenceHelper sharedInstance].dropURLOpen = NO; } -/* - // Test is unreliable when run in parallel with other tests, it's using a persistent datastore... - (void)testListDownLoad { XCTestExpectation *expectation = [self expectationWithDescription:@"List Download"]; BNCURLFilter *filter = [BNCURLFilter new]; [filter updatePatternListWithCompletion:^ (NSError*error, NSArray*list) { XCTAssertNil(error); - XCTAssertTrue(list.count > 0); + XCTAssertTrue(list.count == 6); [expectation fulfill]; }]; [self awaitExpectations]; } - */ - (NSArray*) badURLs { NSArray *kBadURLs = @[ diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchCrossPlatformIDTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchCrossPlatformIDTests.m new file mode 100644 index 000000000..1c21afed9 --- /dev/null +++ b/Branch-TestBed/Branch-SDK-Tests/BranchCrossPlatformIDTests.m @@ -0,0 +1,108 @@ +// +// BranchCrossPlatformIDTests.m +// Branch-SDK-Tests +// +// Created by Ernest Cho on 9/16/19. +// Copyright © 2019 Branch, Inc. All rights reserved. +// + +#import +#import "BranchCrossPlatformID.h" +#import "BNCJsonLoader.h" + +@interface BranchCrossPlatformIDTests : XCTestCase + +@end + +@implementation BranchCrossPlatformIDTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testBuildFromJSON { + NSDictionary *json = [BNCJsonLoader dictionaryFromJSONFileNamed:@"cpid"]; + XCTAssertNotNil(json); + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:json]; + XCTAssertNotNil(cpid); + XCTAssertNotNil(cpid.developerID); + XCTAssertNotNil(cpid.crossPlatformID); + XCTAssertNotNil(cpid.pastCrossPlatformIDs); + XCTAssertNotNil(cpid.probabiliticCrossPlatformIDs); +} + +- (void)testBuildFromJSON_EmptyId { + NSDictionary *json = [BNCJsonLoader dictionaryFromJSONFileNamed:@"cpid_empty_id"]; + XCTAssertNotNil(json); + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:json]; + XCTAssertNotNil(cpid); + XCTAssertTrue([@"" isEqualToString:cpid.crossPlatformID]); +} + +- (void)testBuildFromJSON_EmptyPast { + NSDictionary *json = [BNCJsonLoader dictionaryFromJSONFileNamed:@"cpid_empty_past"]; + XCTAssertNotNil(json); + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:json]; + XCTAssertNotNil(cpid); + XCTAssertTrue(cpid.pastCrossPlatformIDs.count == 0); +} + +- (void)testBuildFromJSON_EmptyProb { + NSDictionary *json = [BNCJsonLoader dictionaryFromJSONFileNamed:@"cpid_empty_prob"]; + XCTAssertNotNil(json); + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:json]; + XCTAssertNotNil(cpid); + XCTAssertTrue(cpid.probabiliticCrossPlatformIDs.count == 0); +} + +- (void)testBuildFromJSON_EmptyDevId { + NSDictionary *json = [BNCJsonLoader dictionaryFromJSONFileNamed:@"cpid_empty_dev_id"]; + XCTAssertNotNil(json); + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:json]; + XCTAssertNotNil(cpid); + XCTAssertTrue([@"" isEqualToString:cpid.developerID]); +} + +- (void)testBuildFromJSON_MissingId { + NSDictionary *json = [BNCJsonLoader dictionaryFromJSONFileNamed:@"cpid_missing_id"]; + XCTAssertNotNil(json); + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:json]; + XCTAssertNil(cpid); +} + +- (void)testBuildFromJSON_MissingPast { + NSDictionary *json = [BNCJsonLoader dictionaryFromJSONFileNamed:@"cpid_missing_past"]; + XCTAssertNotNil(json); + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:json]; + XCTAssertNil(cpid); +} + +- (void)testBuildFromJSON_MissingProb { + NSDictionary *json = [BNCJsonLoader dictionaryFromJSONFileNamed:@"cpid_missing_prob"]; + XCTAssertNotNil(json); + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:json]; + XCTAssertNil(cpid); +} + +- (void)testBuildFromJSON_MissingDevId { + NSDictionary *json = [BNCJsonLoader dictionaryFromJSONFileNamed:@"cpid_missing_dev_id"]; + XCTAssertNotNil(json); + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:json]; + XCTAssertNotNil(cpid); + XCTAssertNil(cpid.developerID); +} + +@end diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchEvent.Test.m b/Branch-TestBed/Branch-SDK-Tests/BranchEvent.Test.m index fa9ce3a57..7ea82607b 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchEvent.Test.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchEvent.Test.m @@ -52,6 +52,124 @@ - (void) testDescription { "items: 0 customData: {\n Key1 = Value1;\n}>"); } +- (void) testEvent { + + // Set up the Branch Universal Object -- + + BranchUniversalObject *buo = [BranchUniversalObject new]; + buo.canonicalIdentifier = @"item/12345"; + buo.canonicalUrl = @"https://branch.io/deepviews"; + buo.title = @"My Content Title"; + buo.contentDescription = @"my_product_description1"; + buo.imageUrl = @"https://test_img_url"; + buo.keywords = @[ @"My_Keyword1", @"My_Keyword2"]; + buo.creationDate = [NSDate dateWithTimeIntervalSince1970:1501869445321.0/1000.0]; + buo.expirationDate = [NSDate dateWithTimeIntervalSince1970:212123232544.0/1000.0]; + buo.locallyIndex = YES; + buo.publiclyIndex = NO; + + buo.contentMetadata.contentSchema = BranchContentSchemaCommerceProduct; + buo.contentMetadata.quantity = 2; + buo.contentMetadata.price = [NSDecimalNumber decimalNumberWithString:@"23.2"]; + buo.contentMetadata.currency = BNCCurrencyUSD; + buo.contentMetadata.sku = @"1994320302"; + buo.contentMetadata.productName = @"my_product_name1"; + buo.contentMetadata.productBrand = @"my_prod_Brand1"; + buo.contentMetadata.productCategory = BNCProductCategoryBabyToddler; + buo.contentMetadata.productVariant = @"3T"; + buo.contentMetadata.condition = BranchConditionFair; + + buo.contentMetadata.ratingAverage = 5; + buo.contentMetadata.ratingCount = 5; + buo.contentMetadata.ratingMax = 7; + buo.contentMetadata.rating = 6; + buo.contentMetadata.addressStreet = @"Street_name1"; + buo.contentMetadata.addressCity = @"city1"; + buo.contentMetadata.addressRegion = @"Region1"; + buo.contentMetadata.addressCountry = @"Country1"; + buo.contentMetadata.addressPostalCode= @"postal_code"; + buo.contentMetadata.latitude = 12.07; + buo.contentMetadata.longitude = -97.5; + buo.contentMetadata.imageCaptions = (id) @[@"my_img_caption1", @"my_img_caption_2"]; + buo.contentMetadata.customMetadata = (NSMutableDictionary*) @{ + @"Custom_Content_metadata_key1": @"Custom_Content_metadata_val1", + @"Custom_Content_metadata_key2": @"Custom_Content_metadata_val2" + }; + + // Set up the event properties -- + + BranchEvent *event = [BranchEvent standardEvent:BranchStandardEventPurchase]; + event.alias = @"event alias"; + event.transactionID = @"12344555"; + event.currency = BNCCurrencyUSD; + event.revenue = [NSDecimalNumber decimalNumberWithString:@"1.5"]; + event.shipping = [NSDecimalNumber decimalNumberWithString:@"10.2"]; + event.tax = [NSDecimalNumber decimalNumberWithString:@"12.3"]; + event.coupon = @"test_coupon"; + event.affiliation = @"test_affiliation"; + event.eventDescription= @"Event _description"; + event.searchQuery = @"Query"; + event.customData = (NSMutableDictionary*) @{ + @"Custom_Event_Property_Key1": @"Custom_Event_Property_val1", + @"Custom_Event_Property_Key2": @"Custom_Event_Property_val2" + }; + + NSDictionary *testDictionary = [event dictionary]; + NSMutableDictionary *dictionary = + [self mutableDictionaryFromBundleJSONWithKey:@"V2EventProperties"]; + XCTAssertEqualObjects(testDictionary, dictionary); + + testDictionary = [buo dictionary]; + dictionary = [self mutableDictionaryFromBundleJSONWithKey:@"BranchUniversalObjectJSON"]; + dictionary[@"$publicly_indexable"] = nil; // Remove this value since we don't add false values. + XCTAssertEqualObjects(testDictionary, dictionary); + + // Mock the result. Fix up the expectedParameters for simulator hardware -- + + NSMutableDictionary *expectedRequest = + [self mutableDictionaryFromBundleJSONWithKey:@"V2EventJSON"]; + expectedRequest[@"branch_key"] = Branch.branchKey; + expectedRequest[@"user_data"] = [[BNCDeviceInfo getInstance] v2dictionary]; + + Branch *branch = [Branch getInstance:@"key_live_foo"]; + XCTestExpectation *expectation = [self expectationWithDescription:@"v2-event"]; + id serverInterfaceMock = OCMPartialMock(branch.serverInterface); + + OCMStub( + [serverInterfaceMock genericHTTPRequest:[OCMArg any] + retryNumber:0 + callback:[OCMArg any] + retryHandler:[OCMArg any]] + ).andDo(^(NSInvocation *invocation) { + + __unsafe_unretained NSURLRequest *request = nil; + [invocation getArgument:&request atIndex:2]; + + NSError *error = nil; + NSString *url = request.URL.absoluteString; + NSData *bodyData = request.HTTPBody; + NSMutableDictionary *parameters = + [NSJSONSerialization JSONObjectWithData:bodyData + options:NSJSONReadingMutableContainers error:&error]; + XCTAssertNil(error); + + NSLog(@"testEvent 1"); + NSLog(@"URL: %@.", url); + NSLog(@"Body: %@.", parameters); + + if ([url containsString:@"branch.io/v2/event/standard"]) { + XCTAssertEqualObjects(expectedRequest, parameters); + [expectation fulfill]; + } + }); + + [branch clearNetworkQueue]; + event.contentItems = (NSMutableArray*) @[ buo ]; + [event logEvent]; + [self waitForExpectationsWithTimeout:15.0 handler:nil]; + [serverInterfaceMock stopMocking]; +} + - (void) testExampleSyntax { BranchUniversalObject *contentItem = [BranchUniversalObject new]; contentItem.canonicalIdentifier = @"item/123"; diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchInstallRequestTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchInstallRequestTests.m index 9b4cf8990..e38a25ef4 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchInstallRequestTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchInstallRequestTests.m @@ -31,6 +31,84 @@ - (void)setUp { [preferenceHelper synchronize]; } +- (void)testRequestBody { + NSString * const HARDWARE_ID = @"foo-hardware-id"; + NSNumber * const AD_TRACKING_SAFE = @YES; + NSString * const BUNDLE_ID = @"foo-bundle-id"; + NSString * const APP_VERSION = @"foo-app-version"; + NSString * const OS = @"foo-os"; + NSString * const OS_VERSION = @"foo-os-version"; + NSString * const URI_SCHEME = @"foo-uri-scheme"; + NSString * const LINK_IDENTIFIER = @"foo-link-id"; + NSString * const BRAND = @"foo-brand"; + NSString * const MODEL = @"foo-model"; + NSNumber * const SCREEN_WIDTH = @1; + NSNumber * const SCREEN_HEIGHT = @2; + + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + preferenceHelper.randomizedBundleToken = nil; + preferenceHelper.isDebug = YES; + preferenceHelper.linkClickIdentifier = LINK_IDENTIFIER; + + id systemObserverMock = OCMClassMock([BNCSystemObserver class]); + [[[systemObserverMock stub] andReturnValue:AD_TRACKING_SAFE] adTrackingEnabled]; + [[[systemObserverMock stub] andReturn:BUNDLE_ID] bundleIdentifier]; + [[[systemObserverMock stub] andReturn:APP_VERSION] applicationVersion]; + [[[systemObserverMock stub] andReturn:OS] osName]; + [[[systemObserverMock stub] andReturn:OS_VERSION] osVersion]; + [[[systemObserverMock stub] andReturn:URI_SCHEME] defaultURIScheme]; + [[[systemObserverMock stub] andReturn:BRAND] brand]; + [[[systemObserverMock stub] andReturn:MODEL] model]; + [[[systemObserverMock stub] andReturn:SCREEN_WIDTH] screenWidth]; + [[[systemObserverMock stub] andReturn:SCREEN_HEIGHT] screenHeight]; + + NSDate *appDate = [NSDate date]; + [[BNCApplication currentApplication] + setAppOriginalInstallDate:appDate + firstInstallDate:appDate + lastUpdateDate:appDate]; + [preferenceHelper setPreviousAppBuildDate:nil]; + + NSMutableDictionary *expectedParams = [NSMutableDictionary dictionaryWithDictionary:@{ + @"app_version": @"foo-app-version", + @"debug": @1, + @"latest_install_time": BNCWireFormatFromDate(appDate), + @"ios_bundle_id": @"foo-bundle-id", + @"ios_team_id": @"R63EM248DP", + @"lastest_update_time": BNCWireFormatFromDate(appDate), + @"link_identifier": @"foo-link-id", + @"first_install_time": BNCWireFormatFromDate(appDate), + @"uri_scheme": @"foo-uri-scheme", + @"update": @0, + @"apple_testflight": @0 + }]; + if (!self.class.isApplication) expectedParams[@"ios_team_id"] = nil; + + BranchInstallRequest *request = [[BranchInstallRequest alloc] init]; + id serverInterfaceMock = OCMClassMock([BNCServerInterface class]); + [[serverInterfaceMock expect] + postRequest:[OCMArg checkWithBlock:^BOOL(id value) { + if (![value isKindOfClass:[NSDictionary class]]) { + XCTFail(@"Expected NSDictionary. Got '%@'.", NSStringFromClass([value class])); + return YES; + } + NSDictionary *dictionary = (NSDictionary*)value; + XCTAssertEqualObjects(dictionary, expectedParams); + return YES; + }] + url:[OCMArg checkWithBlock:^BOOL(id value) { + if (![((NSString*)value) containsString:BRANCH_REQUEST_ENDPOINT_INSTALL]) { + XCTAssertEqualObjects(value, BRANCH_REQUEST_ENDPOINT_INSTALL); + } + return YES; + }] + key:[OCMArg any] + callback:[OCMArg any]]; + + [request makeRequest:serverInterfaceMock key:nil callback:NULL]; + [serverInterfaceMock verify]; +} + - (void)testSuccessWithAllKeysAndIsReferrable { NSString * const DEVICE_TOKEN = @"foo-token"; NSString * const USER_URL = @"http://foo"; diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchOpenRequestTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchOpenRequestTests.m index b5059db9d..f41a2fbae 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchOpenRequestTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchOpenRequestTests.m @@ -32,6 +32,153 @@ - (void)setUp { [preferenceHelper synchronize]; } +- (void)testRequestBodyWithNoDeviceToken { + NSString * const HARDWARE_ID = @"foo-hardware-id"; + NSNumber * const AD_TRACKING_SAFE = @YES; + NSNumber * const IS_DEBUG = @YES; + NSString * const BUNDLE_ID = @"foo-bundle-id"; + NSString * const APP_VERSION = @"foo-app-version"; + NSString * const OS = @"foo-os"; + NSString * const OS_VERSION = @"foo-os-version"; + NSString * const URI_SCHEME = @"foo-uri-scheme"; + NSString * const LINK_IDENTIFIER = @"foo-link-id"; + NSString * const RANDOMIZED_BUNDLE_TOKEN = @"foo-bundle-token"; + NSString * hardwareType = nil; + + BNCLogSetDisplayLevel(BNCLogLevelAll); + + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + id systemObserverMock = OCMClassMock([BNCSystemObserver class]); + [[[systemObserverMock stub] andReturnValue:AD_TRACKING_SAFE] adTrackingEnabled]; + [[[systemObserverMock stub] andReturn:BUNDLE_ID] bundleIdentifier]; + [[[systemObserverMock stub] andReturn:APP_VERSION] applicationVersion]; + [[[systemObserverMock stub] andReturn:OS] osName]; + [[[systemObserverMock stub] andReturn:OS_VERSION] osVersion]; + [[[systemObserverMock stub] andReturn:URI_SCHEME] defaultURIScheme]; + + preferenceHelper.isDebug = [IS_DEBUG boolValue]; + preferenceHelper.linkClickIdentifier = LINK_IDENTIFIER; + preferenceHelper.randomizedDeviceToken = nil; + preferenceHelper.randomizedBundleToken = RANDOMIZED_BUNDLE_TOKEN; + + NSTimeInterval kOneDayAgo = -1.0*24.0*60.0*60.0; + NSDate *installDate = [NSDate dateWithTimeIntervalSinceNow:2.0*kOneDayAgo]; + NSDate *updateDate = [NSDate dateWithTimeIntervalSinceNow:1.0*kOneDayAgo]; + [[BNCApplication currentApplication] + setAppOriginalInstallDate:installDate + firstInstallDate:installDate + lastUpdateDate:installDate]; + [preferenceHelper setPreviousAppBuildDate:updateDate]; + + NSMutableDictionary *expectedParams = [NSMutableDictionary dictionaryWithDictionary:@{ + @"app_version": APP_VERSION, + @"cd": @{ + @"mv": @"-1", + @"pn": BUNDLE_ID + }, + @"debug": IS_DEBUG, + @"randomized_bundle_token": RANDOMIZED_BUNDLE_TOKEN, + @"ios_bundle_id": BUNDLE_ID, + @"ios_team_id": @"R63EM248DP", + @"link_identifier": LINK_IDENTIFIER, + @"uri_scheme": URI_SCHEME, + + @"latest_install_time": BNCWireFormatFromDate(installDate), + @"lastest_update_time": BNCWireFormatFromDate(installDate), + @"first_install_time": BNCWireFormatFromDate(installDate), + @"previous_update_time": BNCWireFormatFromDate(updateDate), + @"update": @0, + @"apple_testflight": @0 + }]; + if (!self.class.isApplication) expectedParams[@"ios_team_id"] = nil; + + id serverInterfaceMock = OCMClassMock([BNCServerInterface class]); + [[serverInterfaceMock expect] + postRequest:[OCMArg checkWithBlock:^BOOL(id obj) { + XCTAssertEqualObjects(obj, expectedParams); + return YES; + }] + url:[self stringMatchingPattern:BRANCH_REQUEST_ENDPOINT_OPEN] + key:[OCMArg any] + callback:[OCMArg any]]; + + BranchOpenRequest *request = [[BranchOpenRequest alloc] init]; + [request makeRequest:serverInterfaceMock key:nil callback:NULL]; + [serverInterfaceMock verify]; +} + +- (void)testRequestBodyWithDeviceToken { + NSString * const HARDWARE_ID = @"foo-hardware-id"; + NSNumber * const AD_TRACKING_SAFE = @YES; + NSNumber * const IS_DEBUG = @YES; + NSString * const BUNDLE_ID = @"foo-bundle-id"; + NSString * const APP_VERSION = @"foo-app-version"; + NSString * const OS = @"foo-os"; + NSString * const OS_VERSION = @"foo-os-version"; + NSString * const URI_SCHEME = @"foo-uri-scheme"; + NSString * const LINK_IDENTIFIER = @"foo-link-id"; + NSString * const DEVICE_TOKEN = @"foo-token"; + NSString * const RANDOMIZED_BUNDLE_TOKEN = @"foo-bundle-token"; + NSString * hardwareType = nil; + + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + id systemObserverMock = OCMClassMock([BNCSystemObserver class]); + [[[systemObserverMock stub] andReturnValue:AD_TRACKING_SAFE] adTrackingEnabled]; + [[[systemObserverMock stub] andReturn:BUNDLE_ID] bundleIdentifier]; + [[[systemObserverMock stub] andReturn:APP_VERSION] applicationVersion]; + [[[systemObserverMock stub] andReturn:OS] osName]; + [[[systemObserverMock stub] andReturn:OS_VERSION] osVersion]; + [[[systemObserverMock stub] andReturn:URI_SCHEME] defaultURIScheme]; + + preferenceHelper.isDebug = [IS_DEBUG boolValue]; + preferenceHelper.linkClickIdentifier = LINK_IDENTIFIER; + preferenceHelper.randomizedDeviceToken = DEVICE_TOKEN; + preferenceHelper.randomizedBundleToken = RANDOMIZED_BUNDLE_TOKEN; + + NSTimeInterval kOneDayAgo = -1.0*24.0*60.0*60.0; + NSDate *installDate = [NSDate dateWithTimeIntervalSinceNow:2.0*kOneDayAgo]; + NSDate *updateDate = [NSDate dateWithTimeIntervalSinceNow:1.0*kOneDayAgo]; + [[BNCApplication currentApplication] + setAppOriginalInstallDate:installDate + firstInstallDate:installDate + lastUpdateDate:installDate]; + [preferenceHelper setPreviousAppBuildDate:updateDate]; + + NSMutableDictionary *expectedParams = [NSMutableDictionary dictionaryWithDictionary:@{ + @"app_version": APP_VERSION, + @"cd": @{ + @"mv": @"-1", + @"pn": BUNDLE_ID + }, + @"debug": IS_DEBUG, + @"randomized_device_token": DEVICE_TOKEN, + @"randomized_bundle_token": RANDOMIZED_BUNDLE_TOKEN, + @"ios_bundle_id": BUNDLE_ID, + @"ios_team_id": @"R63EM248DP", + @"link_identifier": LINK_IDENTIFIER, + @"uri_scheme": URI_SCHEME, + + @"latest_install_time": BNCWireFormatFromDate(installDate), + @"lastest_update_time": BNCWireFormatFromDate(installDate), + @"first_install_time": BNCWireFormatFromDate(installDate), + @"previous_update_time": BNCWireFormatFromDate(updateDate), + @"update": @0, + @"apple_testflight": @0 + }]; + if (!self.class.isApplication) expectedParams[@"ios_team_id"] = nil; + + id serverInterfaceMock = OCMClassMock([BNCServerInterface class]); + [[serverInterfaceMock expect] + postRequest:expectedParams + url:[self stringMatchingPattern:BRANCH_REQUEST_ENDPOINT_OPEN] + key:[OCMArg any] + callback:[OCMArg any]]; + + BranchOpenRequest *request = [[BranchOpenRequest alloc] init]; + [request makeRequest:serverInterfaceMock key:nil callback:NULL]; + [serverInterfaceMock verify]; +} + - (void)testSuccessWithAllKeysAndIsReferrable { NSString * const DEVICE_TOKEN = @"foo-token"; NSString * const USER_URL = @"http://foo"; diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchSDKFunctionalityTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchSDKFunctionalityTests.m index e48b545f3..858edb8ed 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchSDKFunctionalityTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchSDKFunctionalityTests.m @@ -73,6 +73,138 @@ - (void)test00OpenOrInstall { [self waitForExpectationsWithTimeout:2 handler:NULL]; } +- (void)test03GetShortURLSync { + id serverInterfaceMock = OCMClassMock([BNCServerInterface class]); + [self setupDefaultStubsForServerInterfaceMock:serverInterfaceMock]; + + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + Branch *branch = + [[Branch alloc] + initWithInterface:serverInterfaceMock + queue:[[BNCServerRequestQueue alloc] init] + cache:[[BNCLinkCache alloc] init] + preferenceHelper:preferenceHelper + key:@"key_live_foo"]; + + XCTestExpectation *getShortURLExpectation = [self expectationWithDescription:@"Test getShortURL Sync"]; + [branch initSessionWithLaunchOptions:@{} andRegisterDeepLinkHandler:^(NSDictionary *params, NSError *error) { + BNCServerResponse *fbLinkResponse = [[BNCServerResponse alloc] init]; + fbLinkResponse.statusCode = @200; + fbLinkResponse.data = @{ @"url": @"https://bnc.lt/l/4BGtJj-03N" }; + + BNCServerResponse *twLinkResponse = [[BNCServerResponse alloc] init]; + twLinkResponse.statusCode = @200; + twLinkResponse.data = @{ @"url": @"https://bnc.lt/l/-03N4BGtJj" }; + + // FB should only be called once + [[[serverInterfaceMock expect] andReturn:fbLinkResponse] postRequestSynchronous:[OCMArg checkWithBlock:^BOOL(NSDictionary *params) { + return [params[@"channel"] isEqualToString:@"facebook"]; + }] url:[preferenceHelper getAPIURL:@"url"] key:[OCMArg any]]; + + [[serverInterfaceMock reject] postRequestSynchronous:[OCMArg checkWithBlock:^BOOL(NSDictionary *params) { + return [params[@"channel"] isEqualToString:@"facebook"]; + }] url:[preferenceHelper getAPIURL:@"url"] key:[OCMArg any]]; + + // TW should be allowed still + [[[serverInterfaceMock expect] andReturn:twLinkResponse] postRequestSynchronous:[OCMArg checkWithBlock:^BOOL(NSDictionary *params) { + return [params[@"channel"] isEqualToString:@"twitter"]; + }] url:[preferenceHelper getAPIURL:@"url"] key:[OCMArg any]]; + + NSString *url1 = [branch getShortURLWithParams:nil andChannel:@"facebook" andFeature:nil]; + XCTAssertNotNil(url1); + + NSString *url2 = [branch getShortURLWithParams:nil andChannel:@"facebook" andFeature:nil]; + XCTAssertEqualObjects(url1, url2); + + NSString *url3 = [branch getShortURLWithParams:nil andChannel:@"twitter" andFeature:nil]; + XCTAssertNotNil(url3); + XCTAssertNotEqualObjects(url1, url3); + + [self safelyFulfillExpectation:getShortURLExpectation]; + }]; + + [self awaitExpectations]; + [serverInterfaceMock verify]; +} + +// Test scenario +// * Initialize the session +// * Get a short url. +// * Log out. +// * Get the same url: should be the same. +- (void)test13GetShortURLAfterLogout { + id serverInterfaceMock = OCMClassMock([BNCServerInterface class]); + [self setupDefaultStubsForServerInterfaceMock:serverInterfaceMock]; + + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + Branch *branch = + [[Branch alloc] + initWithInterface:serverInterfaceMock + queue:[[BNCServerRequestQueue alloc] init] + cache:[[BNCLinkCache alloc] init] + preferenceHelper:preferenceHelper + key:@"key_live_foo"]; + + // Init session + + XCTestExpectation *initSessionExpectation = + [self expectationWithDescription:@"Expect Session"]; + + [branch initSessionWithLaunchOptions:@{} + andRegisterDeepLinkHandler:^(NSDictionary *params, NSError *error) { + XCTAssert(!error); + NSLog(@"Fullfilled 1."); + [self safelyFulfillExpectation:initSessionExpectation]; + }]; + + [self awaitExpectations]; + + // Get short URL + + NSString * urlTruthString = @"https://bnc.lt/l/4BGtJj-03N"; + BNCServerResponse *urlResp = [[BNCServerResponse alloc] init]; + urlResp.statusCode = @200; + urlResp.data = @{ @"url": urlTruthString }; + + [[[serverInterfaceMock expect] + andReturn:urlResp] + postRequestSynchronous:[OCMArg any] + url:[preferenceHelper getAPIURL:@"url"] + key:[OCMArg any]]; + + NSString *url1 = [branch getShortURLWithParams:nil andChannel:nil andFeature:nil]; + XCTAssertEqual(urlTruthString, url1); + + // Log out + + BNCServerResponse *logoutResp = [[BNCServerResponse alloc] init]; + logoutResp.data = @{ @"session_id": @"foo", @"randomized_bundle_token": @"foo", @"link": @"http://foo" }; + + + XCTestExpectation *logoutExpectation = + [self expectationWithDescription:@"Logout Session"]; + + self.hasExceededExpectations = NO; + [branch logoutWithCallback:^(BOOL changed, NSError * _Nullable error) { + XCTAssertNil(error); + NSLog(@"Fullfilled 2."); + [self safelyFulfillExpectation:logoutExpectation]; + }]; + + [self awaitExpectations]; + + // Get short URL + + [[[serverInterfaceMock expect] + andReturn:urlResp] + postRequestSynchronous:[OCMArg any] + url:[preferenceHelper getAPIURL:@"url"] + key:[OCMArg any]]; + + NSString *url2 = [branch getShortURLWithParams:nil andChannel:nil andFeature:nil]; + XCTAssertEqualObjects(url1, url2); +} + #pragma mark - Test Utility - (void)safelyFulfillExpectation:(XCTestExpectation *)expectation { diff --git a/Branch-TestBed/Branch-SDK-Tests/BranchSetIdentityRequestTests.m b/Branch-TestBed/Branch-SDK-Tests/BranchSetIdentityRequestTests.m new file mode 100644 index 000000000..c6b156661 --- /dev/null +++ b/Branch-TestBed/Branch-SDK-Tests/BranchSetIdentityRequestTests.m @@ -0,0 +1,70 @@ +// +// BranchSetIdentityRequestTests.m +// Branch-TestBed +// +// Created by Graham Mueller on 6/10/15. +// Copyright (c) 2015 Branch Metrics. All rights reserved. +// + +#import "BNCTestCase.h" +#import "BranchConstants.h" +#import "BNCPreferenceHelper.h" +#import "Branch.h" +#import + +static NSString * const IDENTITY_TEST_USER_ID = @"foo_id"; + +@interface BranchSetIdentityRequestTests : BNCTestCase +@end + +@implementation BranchSetIdentityRequestTests + +#pragma mark - setIdentity Tests +- (void)testSetIdentityWithCallback { + Branch *branch = [Branch getInstance]; + [branch logoutWithCallback:^(BOOL changed, NSError * _Nullable error) { + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + + XCTestExpectation *expectation = [self expectationWithDescription:@"setIdentity callback is called"]; + + [branch setIdentity:@"testUserIdWithCallback" withCallback:^(NSDictionary *params, NSError *error) { + XCTAssertEqualObjects(@"testUserIdWithCallback", preferenceHelper.userIdentity); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:5 handler:nil]; + }]; +} + +- (void)testSetIdentityWithNilUserId { + Branch *branch = [Branch getInstance]; + [branch logoutWithCallback:^(BOOL changed, NSError * _Nullable error) { + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + + XCTestExpectation *expectation = [self expectationWithDescription:@"setIdentityWithNil callback is called"]; + + [branch setIdentity:nil withCallback:^(NSDictionary *params, NSError *error) { + XCTAssertNil(preferenceHelper.userIdentity); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:5 handler:nil]; + }]; + + +} + +- (void)testSetIdentityWithUserId { + Branch *branch = [Branch getInstance]; + [branch logoutWithCallback:^(BOOL changed, NSError * _Nullable error) { + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + + NSString *testUserId = @"testUserId"; + [branch setIdentity:testUserId withCallback:nil]; + + XCTAssertEqualObjects(@"testUserId", preferenceHelper.userIdentity); + }]; + +} + +@end diff --git a/Branch-TestBed/Branch-SDK-Unhosted-Tests/BNCServerInterfaceTests.m b/Branch-TestBed/Branch-SDK-Unhosted-Tests/BNCServerInterfaceTests.m new file mode 100644 index 000000000..b210a0b09 --- /dev/null +++ b/Branch-TestBed/Branch-SDK-Unhosted-Tests/BNCServerInterfaceTests.m @@ -0,0 +1,67 @@ +// +// BNCServerInterfaceTests.m +// Branch-SDK-Unhosted-Tests +// +// Created by Ernest Cho on 7/16/19. +// Copyright © 2019 Branch, Inc. All rights reserved. +// + +#import +#import "BNCServerInterface.h" + +// expose private method +@interface BNCServerInterface() +- (BOOL) isV2APIURL:(NSString *)urlstring baseURL:(NSString *)baseURL; +@end + +@interface BNCServerInterfaceTests : XCTestCase + +@end + +@implementation BNCServerInterfaceTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testIsV2Endpoint_Nil { + BNCServerInterface *service = [BNCServerInterface new]; + NSString *testURL = nil; + XCTAssertFalse([service isV2APIURL:testURL baseURL:@"api2.branch.io"]); +} + +- (void)testIsV2Endpoint_EmptyString { + BNCServerInterface *service = [BNCServerInterface new]; + NSString *testURL = @""; + XCTAssertFalse([service isV2APIURL:testURL baseURL:@"api2.branch.io"]); +} + +- (void)testIsV2Endpoint_V1Endpoint { + BNCServerInterface *service = [BNCServerInterface new]; + NSString *testURL = @"https://api2.branch.io/v1/"; + XCTAssertFalse([service isV2APIURL:testURL baseURL:@"api2.branch.io"]); +} + +- (void)testIsV2Endpoint_V2Endpoint { + BNCServerInterface *service = [BNCServerInterface new]; + NSString *testURL = @"https://api2.branch.io/v2/"; + XCTAssertTrue([service isV2APIURL:testURL baseURL:@"api2.branch.io"]); +} + +- (void)testIsV2Endpoint_CustomBaseURLWithStandardV2Endpoint { + BNCServerInterface *service = [BNCServerInterface new]; + NSString *testURL = @"https://api2.branch.io/v2/"; + XCTAssertFalse([service isV2APIURL:testURL baseURL:@"www.custom.com"]); +} + +- (void)testIsV2Endpoint_CustomBaseURLWithCustomV2Endpoint { + BNCServerInterface *service = [BNCServerInterface new]; + NSString *testURL = @"https://www.custom.com/v2/"; + XCTAssertTrue([service isV2APIURL:testURL baseURL:@"www.custom.com"]); +} + +@end diff --git a/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj b/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj index b9ca2c58f..d1e171596 100644 --- a/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj +++ b/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj @@ -33,7 +33,7 @@ 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 */; }; - 4D1683A62098C902008819E3 /* BranchSetIdentityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D16837B2098C901008819E3 /* BranchSetIdentityTests.m */; }; + 4D1683A62098C902008819E3 /* BranchSetIdentityRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D16837B2098C901008819E3 /* BranchSetIdentityRequestTests.m */; }; 4D1683A82098C902008819E3 /* BNCServerRequestQueueOldTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D16837D2098C901008819E3 /* BNCServerRequestQueueOldTests.m */; }; 4D1683AA2098C902008819E3 /* BranchOpenRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D16837F2098C901008819E3 /* BranchOpenRequestTests.m */; }; 4D1683AC2098C902008819E3 /* BranchInstallRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1683822098C901008819E3 /* BranchInstallRequestTests.m */; }; @@ -44,8 +44,10 @@ 4D1683B82098C902008819E3 /* BNCEncodingUtils.Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D16838E2098C901008819E3 /* BNCEncodingUtils.Test.m */; }; 4D1683B92098C902008819E3 /* BNCSystemObserverTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D16838F2098C901008819E3 /* BNCSystemObserverTests.m */; }; 4D1683BA2098C902008819E3 /* BNCLog.Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1683902098C901008819E3 /* BNCLog.Test.m */; }; + 4D1683BB2098C902008819E3 /* BranchShortUrlRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1683912098C901008819E3 /* BranchShortUrlRequestTests.m */; }; 4D1683BC2098C902008819E3 /* BranchDelegate.Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1683922098C901008819E3 /* BranchDelegate.Test.m */; }; 4D1683BD2098C902008819E3 /* BranchNetworkScenario.Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1683932098C901008819E3 /* BranchNetworkScenario.Test.m */; }; + 4D1683BE2098C902008819E3 /* BranchShortUrlSyncRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1683942098C901008819E3 /* BranchShortUrlSyncRequestTests.m */; }; 4D1683C02098C902008819E3 /* BranchUniversalObject.Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1683962098C901008819E3 /* BranchUniversalObject.Test.m */; }; 4D1683C12098C902008819E3 /* BNCApplication.Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1683972098C901008819E3 /* BNCApplication.Test.m */; }; 4D1683C62098C902008819E3 /* BranchEvent.Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D16839C2098C901008819E3 /* BranchEvent.Test.m */; }; @@ -98,6 +100,7 @@ 4DCF4B031F438A8700AF9AAB /* BranchEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DCF4AF81F4388F600AF9AAB /* BranchEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4DD056122177A65C009BD3DD /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DD056112177A65C009BD3DD /* libOCMock.a */; }; 4DD056142177A65C009BD3DD /* libOHHTTPStubs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DD056132177A65C009BD3DD /* libOHHTTPStubs.a */; }; + 4DDC52621DCC08E700CFB737 /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DDC52611DCC08E700CFB737 /* iAd.framework */; }; 4DE235641FB12C2700D4E5A9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4DBEFFFB1FB12A1000F7C41B /* Main.storyboard */; }; 4DE6491A1FE1D7F500226507 /* BNCFieldDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DE649191FE1D7F500226507 /* BNCFieldDefines.h */; }; 54391A161BA249FA0061CB0F /* BranchCSSearchableItemAttributeSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 54391A141BA249FA0061CB0F /* BranchCSSearchableItemAttributeSet.m */; }; @@ -112,14 +115,18 @@ 5F32D7C4242AC339000DE539 /* BranchScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F32D7C2242AC338000DE539 /* BranchScene.m */; }; 5F38020E24DCC2E800E6FAFD /* BranchContentPathProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801DF24DCC2E200E6FAFD /* BranchContentPathProperties.h */; }; 5F38020F24DCC2E800E6FAFD /* BNCServerRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3801E024DCC2E200E6FAFD /* BNCServerRequest.m */; }; + 5F38021024DCC2E800E6FAFD /* BranchCloseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801E124DCC2E300E6FAFD /* BranchCloseRequest.h */; }; 5F38021324DCC2E800E6FAFD /* BranchInstallRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3801E424DCC2E300E6FAFD /* BranchInstallRequest.m */; }; + 5F38021424DCC2E800E6FAFD /* BranchRegisterViewRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3801E524DCC2E300E6FAFD /* BranchRegisterViewRequest.m */; }; 5F38021524DCC2E800E6FAFD /* BranchShortUrlSyncRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3801E624DCC2E300E6FAFD /* BranchShortUrlSyncRequest.m */; }; 5F38021624DCC2E800E6FAFD /* BranchSpotlightUrlRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801E724DCC2E300E6FAFD /* BranchSpotlightUrlRequest.h */; }; 5F38021724DCC2E800E6FAFD /* BranchOpenRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3801E824DCC2E300E6FAFD /* BranchOpenRequest.m */; }; 5F38021A24DCC2E800E6FAFD /* BNCServerInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801EB24DCC2E400E6FAFD /* BNCServerInterface.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F38021B24DCC2E800E6FAFD /* BranchContentPathProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3801EC24DCC2E400E6FAFD /* BranchContentPathProperties.m */; }; 5F38021D24DCC2E800E6FAFD /* BranchLATDRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3801EE24DCC2E400E6FAFD /* BranchLATDRequest.m */; }; + 5F38021E24DCC2E800E6FAFD /* BranchCPIDRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801EF24DCC2E400E6FAFD /* BranchCPIDRequest.h */; }; 5F38021F24DCC2E800E6FAFD /* BNCServerResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801F024DCC2E400E6FAFD /* BNCServerResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5F38022224DCC2E800E6FAFD /* BranchRegisterViewRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801F324DCC2E500E6FAFD /* BranchRegisterViewRequest.h */; }; 5F38022424DCC2E800E6FAFD /* BranchShortUrlRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801F524DCC2E500E6FAFD /* BranchShortUrlRequest.h */; }; 5F38022524DCC2E800E6FAFD /* BranchLATDRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801F624DCC2E500E6FAFD /* BranchLATDRequest.h */; }; 5F38022624DCC2E800E6FAFD /* BranchShortUrlSyncRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3801F724DCC2E500E6FAFD /* BranchShortUrlSyncRequest.h */; }; @@ -134,6 +141,8 @@ 5F38023124DCC2E800E6FAFD /* BNCNetworkService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F38020224DCC2E600E6FAFD /* BNCNetworkService.h */; }; 5F38023224DCC2E800E6FAFD /* BNCServerRequestQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F38020324DCC2E600E6FAFD /* BNCServerRequestQueue.m */; }; 5F38023324DCC2E800E6FAFD /* BranchContentDiscoveryManifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F38020424DCC2E600E6FAFD /* BranchContentDiscoveryManifest.h */; }; + 5F38023424DCC2E800E6FAFD /* BranchCloseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F38020524DCC2E700E6FAFD /* BranchCloseRequest.m */; }; + 5F38023524DCC2E800E6FAFD /* BranchCPIDRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F38020624DCC2E700E6FAFD /* BranchCPIDRequest.m */; }; 5F38023624DCC2E800E6FAFD /* BNCServerInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F38020724DCC2E700E6FAFD /* BNCServerInterface.m */; }; 5F38023724DCC2E800E6FAFD /* BNCServerRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F38020824DCC2E700E6FAFD /* BNCServerRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F38023824DCC2E800E6FAFD /* BranchContentDiscoverer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F38020924DCC2E700E6FAFD /* BranchContentDiscoverer.h */; }; @@ -141,6 +150,7 @@ 5F38023B24DCC2E800E6FAFD /* BranchContentDiscoverer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F38020C24DCC2E700E6FAFD /* BranchContentDiscoverer.m */; }; 5F3D6714232C589100454FF1 /* BranchLastAttributedTouchData.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3D6712232C589100454FF1 /* BranchLastAttributedTouchData.m */; }; 5F3D6715232C589100454FF1 /* BranchLastAttributedTouchData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F3D6713232C589100454FF1 /* BranchLastAttributedTouchData.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5F3D6718233061CB00454FF1 /* BranchCrossPlatformIDTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3D6717233061CB00454FF1 /* BranchCrossPlatformIDTests.m */; }; 5F3D671B233062FD00454FF1 /* BNCJsonLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3D671A233062FD00454FF1 /* BNCJsonLoader.m */; }; 5F3D671C233062FD00454FF1 /* BNCJsonLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F3D671A233062FD00454FF1 /* BNCJsonLoader.m */; }; 5F4101F526851DC7003699AD /* BNCPasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F4101F326851DC7003699AD /* BNCPasteboard.h */; }; @@ -150,7 +160,6 @@ 5F437E3D237E03C00052064B /* BNCDeviceSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F437E3B237E03C00052064B /* BNCDeviceSystem.h */; }; 5F437E3E237E03C00052064B /* BNCDeviceSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F437E3C237E03C00052064B /* BNCDeviceSystem.m */; }; 5F437E40237E1A560052064B /* BNCDeviceSystemTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F437E3F237E1A560052064B /* BNCDeviceSystemTests.m */; }; - 5F5335C32A8D92C5006CF171 /* BNCRequestFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F5335C12A8D92C5006CF171 /* BNCRequestFactory.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F67F48E228F535500067429 /* BNCEncodingUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F67F48D228F535500067429 /* BNCEncodingUtilsTests.m */; }; 5F73FC7E23313F7A000EBD32 /* BNCJSONUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F73FC7C23313F7A000EBD32 /* BNCJSONUtility.h */; }; 5F73FC7F23313F7A000EBD32 /* BNCJSONUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F73FC7D23313F7A000EBD32 /* BNCJSONUtility.m */; }; @@ -161,6 +170,8 @@ 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 */; }; + 5F8F3E62232AD7F3002D0418 /* BranchCrossPlatformID.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F8F3E60232AD7F3002D0418 /* BranchCrossPlatformID.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5F8F3E63232AD7F3002D0418 /* BranchCrossPlatformID.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F8F3E61232AD7F3002D0418 /* BranchCrossPlatformID.m */; }; 5F909B5E23314CE900A774D2 /* BNCJSONUtilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F73FC8023314697000EBD32 /* BNCJSONUtilityTests.m */; }; 5F909B722332BEF600A774D2 /* BranchLastAttributedTouchDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F909B712332BEF600A774D2 /* BranchLastAttributedTouchDataTests.m */; }; 5F92B23123834AFD00CA909B /* BNCReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F92B22F23834AFD00CA909B /* BNCReachability.h */; }; @@ -176,15 +187,24 @@ 5FB38C802521234F00E9A85A /* BNCAppGroupsData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FB38C7E2521234F00E9A85A /* BNCAppGroupsData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FB38C812521234F00E9A85A /* BNCAppGroupsData.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FB38C7F2521234F00E9A85A /* BNCAppGroupsData.m */; }; 5FB6CC13264F0C7C0020E478 /* BNCServerRequestQueueTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FB6CC12264F0C7C0020E478 /* BNCServerRequestQueueTests.m */; }; - 5FC20E732A93D85F00D9E1C8 /* BNCRequestFactoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FC20E722A93D85F00D9E1C8 /* BNCRequestFactoryTests.m */; }; 5FC4CF8C24860C440001E701 /* latd.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF7E24860C320001E701 /* latd.json */; }; 5FC4CF8D24860C440001E701 /* latd_missing_window.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF7F24860C320001E701 /* latd_missing_window.json */; }; + 5FC4CF8E24860C440001E701 /* cpid.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8024860C320001E701 /* cpid.json */; }; + 5FC4CF8F24860C440001E701 /* cpid_missing_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8124860C320001E701 /* cpid_missing_id.json */; }; 5FC4CF9024860C440001E701 /* example.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8224860C320001E701 /* example.json */; }; 5FC4CF9124860C440001E701 /* latd_empty_data.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8324860C320001E701 /* latd_empty_data.json */; }; 5FC4CF9224860C440001E701 /* latd_missing_data.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8424860C320001E701 /* latd_missing_data.json */; }; + 5FC4CF9324860C440001E701 /* cpid_empty_prob.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8524860C320001E701 /* cpid_empty_prob.json */; }; + 5FC4CF9424860C440001E701 /* cpid_empty_dev_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8624860C320001E701 /* cpid_empty_dev_id.json */; }; + 5FC4CF9524860C440001E701 /* cpid_missing_past.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8724860C320001E701 /* cpid_missing_past.json */; }; + 5FC4CF9624860C440001E701 /* cpid_empty_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8824860C320001E701 /* cpid_empty_id.json */; }; + 5FC4CF9724860C440001E701 /* cpid_empty_past.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8924860C320001E701 /* cpid_empty_past.json */; }; + 5FC4CF9824860C440001E701 /* cpid_missing_prob.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8A24860C320001E701 /* cpid_missing_prob.json */; }; + 5FC4CF9924860C440001E701 /* cpid_missing_dev_id.json in Resources */ = {isa = PBXBuildFile; fileRef = 5FC4CF8B24860C320001E701 /* cpid_missing_dev_id.json */; }; 5FC7326822D81002006E6FBC /* BNCAppleReceipt.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FC7326622D81002006E6FBC /* BNCAppleReceipt.h */; }; 5FC7326922D81002006E6FBC /* BNCAppleReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FC7326722D81002006E6FBC /* BNCAppleReceipt.m */; }; 5FC7327022DD1F93006E6FBC /* BNCAppleReceiptTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FC7326F22DD1F93006E6FBC /* BNCAppleReceiptTests.m */; }; + 5FC7327722DE9A44006E6FBC /* BNCServerInterfaceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FC7327622DE9A44006E6FBC /* BNCServerInterfaceTests.m */; }; 5FCF7EAD29DC96A7008D629E /* BNCURLFilterSkiplistUpgradeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FCF7EAC29DC96A7008D629E /* BNCURLFilterSkiplistUpgradeTests.m */; }; 5FD1786E26DEE49D009696E3 /* BNCPasteboardTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FD1786D26DEE49C009696E3 /* BNCPasteboardTests.m */; }; 5FDB04ED24E4D23300F2F267 /* BNCSKAdNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FDB04EB24E4D23300F2F267 /* BNCSKAdNetwork.h */; }; @@ -199,8 +219,6 @@ 5FE693F72405E91500E3AEE2 /* BNCCallbackMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FE693F52405E91500E3AEE2 /* BNCCallbackMap.h */; }; 5FE693F82405E91500E3AEE2 /* BNCCallbackMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FE693F62405E91500E3AEE2 /* BNCCallbackMap.m */; }; 5FE694382405FA2700E3AEE2 /* BNCCallbackMapTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FE694372405FA2700E3AEE2 /* BNCCallbackMapTests.m */; }; - 5FF7D2842A9549970049158D /* BNCRequestFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5335C22A8D92C5006CF171 /* BNCRequestFactory.m */; }; - 5FF7D2862A9549B40049158D /* AdServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FF7D2852A9549B40049158D /* AdServices.framework */; }; 63E4C4881D25E16A00A45FD8 /* LogOutputViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E4C4871D25E16A00A45FD8 /* LogOutputViewController.m */; }; 63E4C48B1D25E17B00A45FD8 /* NavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E4C48A1D25E17B00A45FD8 /* NavigationController.m */; }; 63E4C4901D25E1BC00A45FD8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63E4C48F1D25E1BC00A45FD8 /* LaunchScreen.storyboard */; }; @@ -211,7 +229,9 @@ 6700166E1940F51400A9E103 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6700166C1940F51400A9E103 /* InfoPlist.strings */; }; 670016701940F51400A9E103 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6700166F1940F51400A9E103 /* main.m */; }; 6700167A1940F51400A9E103 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 670016791940F51400A9E103 /* ViewController.m */; }; + 677F4CB51C1FB1910029F2B3 /* Branch-TestBed.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 677F4CB41C1FB0FA0029F2B3 /* Branch-TestBed.entitlements */; }; 67F270891BA9FCFF002546A7 /* CoreSpotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67F270881BA9FCFF002546A7 /* CoreSpotlight.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 6EF9E0CC67B914F9A632E6F2 /* libPods-Branch-SDK-Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F8346B3671BEF4D5274161E /* libPods-Branch-SDK-Tests.a */; }; 7B18DF491F1F00E200C25C84 /* BNCCrashlyticsWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B18DF471F1F00E200C25C84 /* BNCCrashlyticsWrapper.h */; }; 7B18DF4A1F1F00E200C25C84 /* BNCCrashlyticsWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B18DF481F1F00E200C25C84 /* BNCCrashlyticsWrapper.m */; }; 7D58823A1CA1DF2700FF6358 /* BNCDeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5882391CA1DF2700FF6358 /* BNCDeviceInfo.m */; }; @@ -228,7 +248,6 @@ C12320B52808DB90007771C0 /* BranchQRCodeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C12320B42808DB90007771C0 /* BranchQRCodeTests.m */; }; C12320B7280E2060007771C0 /* BranchQRCode.h in Headers */ = {isa = PBXBuildFile; fileRef = C12320B6280E2060007771C0 /* BranchQRCode.h */; settings = {ATTRIBUTES = (Public, ); }; }; C12320B9280E2091007771C0 /* BranchQRCode.m in Sources */ = {isa = PBXBuildFile; fileRef = C12320B8280E2091007771C0 /* BranchQRCode.m */; }; - C15CC9DE2ABCB549003CC339 /* BNCCurrencyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C15CC9DD2ABCB549003CC339 /* BNCCurrencyTests.m */; }; C1614D56285BC8A00098946B /* LinkPresentation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1614D55285BC8A00098946B /* LinkPresentation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; C1614D5C285BD4AF0098946B /* BranchPluginSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = C1614D5A285BD4AF0098946B /* BranchPluginSupport.h */; }; C1614D5D285BD4AF0098946B /* BranchPluginSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = C1614D5B285BD4AF0098946B /* BranchPluginSupport.m */; }; @@ -241,7 +260,6 @@ C1CC888229BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CC888129BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m */; }; C1CC888829C27E8000BDD2B5 /* BNCUrlQueryParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = C1CC888629C27E8000BDD2B5 /* BNCUrlQueryParameter.h */; }; C1CC888929C27E8000BDD2B5 /* BNCUrlQueryParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CC888729C27E8000BDD2B5 /* BNCUrlQueryParameter.m */; }; - CE09D25C88071212954A776D /* libPods-Branch-SDK-Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F2C896423B99BFA2E8B0E4D6 /* libPods-Branch-SDK-Tests.a */; }; E2B9474A1D15D75000F2270D /* BNCCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = E2B947491D15D73900F2270D /* BNCCallbacks.h */; settings = {ATTRIBUTES = (Public, ); }; }; E72489D228E40D0200DCD8FD /* PasteControlViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E72489D128E40D0200DCD8FD /* PasteControlViewController.m */; }; E729974D28E2BBFA007D91B2 /* BranchPasteControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E729974B28E2BBFA007D91B2 /* BranchPasteControl.h */; }; @@ -316,7 +334,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 = ""; }; - 130D24DFC422D39DC8CB96CC /* Pods-Branch-SDK-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Branch-SDK-Tests.debug.xcconfig"; path = "Target Support Files/Pods-Branch-SDK-Tests/Pods-Branch-SDK-Tests.debug.xcconfig"; sourceTree = ""; }; 3A78D573251EB59B002A25CF /* BranchJsonConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchJsonConfig.h; sourceTree = ""; }; 3A78D575251EB5BF002A25CF /* BranchJsonConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchJsonConfig.m; sourceTree = ""; }; 464EA3991ACB38EC000E4094 /* BNCEncodingUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCEncodingUtils.h; sourceTree = ""; }; @@ -328,7 +345,7 @@ 466D5A101B5991E3009DB845 /* BNCContentDiscoveryManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCContentDiscoveryManager.m; sourceTree = ""; }; 46DBB42F1B335A9B00642FC8 /* BranchDeepLinkingController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchDeepLinkingController.h; sourceTree = ""; }; 4AB16367239E3A2700D42931 /* DispatchToIsolationQueueTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DispatchToIsolationQueueTests.m; sourceTree = ""; }; - 4D16837B2098C901008819E3 /* BranchSetIdentityTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchSetIdentityTests.m; sourceTree = ""; }; + 4D16837B2098C901008819E3 /* BranchSetIdentityRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchSetIdentityRequestTests.m; sourceTree = ""; }; 4D16837D2098C901008819E3 /* BNCServerRequestQueueOldTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCServerRequestQueueOldTests.m; sourceTree = ""; }; 4D16837E2098C901008819E3 /* BNCServerInterface.Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCServerInterface.Test.m; sourceTree = ""; }; 4D16837F2098C901008819E3 /* BranchOpenRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchOpenRequestTests.m; sourceTree = ""; }; @@ -341,8 +358,10 @@ 4D16838E2098C901008819E3 /* BNCEncodingUtils.Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCEncodingUtils.Test.m; sourceTree = ""; }; 4D16838F2098C901008819E3 /* BNCSystemObserverTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCSystemObserverTests.m; sourceTree = ""; }; 4D1683902098C901008819E3 /* BNCLog.Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCLog.Test.m; sourceTree = ""; }; + 4D1683912098C901008819E3 /* BranchShortUrlRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchShortUrlRequestTests.m; sourceTree = ""; }; 4D1683922098C901008819E3 /* BranchDelegate.Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchDelegate.Test.m; sourceTree = ""; }; 4D1683932098C901008819E3 /* BranchNetworkScenario.Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchNetworkScenario.Test.m; sourceTree = ""; }; + 4D1683942098C901008819E3 /* BranchShortUrlSyncRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchShortUrlSyncRequestTests.m; sourceTree = ""; }; 4D1683952098C901008819E3 /* BranchEvent.Test.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BranchEvent.Test.swift; sourceTree = ""; }; 4D1683962098C901008819E3 /* BranchUniversalObject.Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchUniversalObject.Test.m; sourceTree = ""; }; 4D1683972098C901008819E3 /* BNCApplication.Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCApplication.Test.m; sourceTree = ""; }; @@ -403,14 +422,18 @@ 5F32D7C2242AC338000DE539 /* BranchScene.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchScene.m; sourceTree = ""; }; 5F3801DF24DCC2E200E6FAFD /* BranchContentPathProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchContentPathProperties.h; sourceTree = ""; }; 5F3801E024DCC2E200E6FAFD /* BNCServerRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCServerRequest.m; sourceTree = ""; }; + 5F3801E124DCC2E300E6FAFD /* BranchCloseRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchCloseRequest.h; sourceTree = ""; }; 5F3801E424DCC2E300E6FAFD /* BranchInstallRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchInstallRequest.m; sourceTree = ""; }; + 5F3801E524DCC2E300E6FAFD /* BranchRegisterViewRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchRegisterViewRequest.m; sourceTree = ""; }; 5F3801E624DCC2E300E6FAFD /* BranchShortUrlSyncRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchShortUrlSyncRequest.m; sourceTree = ""; }; 5F3801E724DCC2E300E6FAFD /* BranchSpotlightUrlRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchSpotlightUrlRequest.h; sourceTree = ""; }; 5F3801E824DCC2E300E6FAFD /* BranchOpenRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchOpenRequest.m; sourceTree = ""; }; 5F3801EB24DCC2E400E6FAFD /* BNCServerInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCServerInterface.h; sourceTree = ""; }; 5F3801EC24DCC2E400E6FAFD /* BranchContentPathProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchContentPathProperties.m; sourceTree = ""; }; 5F3801EE24DCC2E400E6FAFD /* BranchLATDRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchLATDRequest.m; sourceTree = ""; }; + 5F3801EF24DCC2E400E6FAFD /* BranchCPIDRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchCPIDRequest.h; sourceTree = ""; }; 5F3801F024DCC2E400E6FAFD /* BNCServerResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCServerResponse.h; sourceTree = ""; }; + 5F3801F324DCC2E500E6FAFD /* BranchRegisterViewRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchRegisterViewRequest.h; sourceTree = ""; }; 5F3801F524DCC2E500E6FAFD /* BranchShortUrlRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchShortUrlRequest.h; sourceTree = ""; }; 5F3801F624DCC2E500E6FAFD /* BranchLATDRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchLATDRequest.h; sourceTree = ""; }; 5F3801F724DCC2E500E6FAFD /* BranchShortUrlSyncRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchShortUrlSyncRequest.h; sourceTree = ""; }; @@ -425,6 +448,8 @@ 5F38020224DCC2E600E6FAFD /* BNCNetworkService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCNetworkService.h; sourceTree = ""; }; 5F38020324DCC2E600E6FAFD /* BNCServerRequestQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCServerRequestQueue.m; sourceTree = ""; }; 5F38020424DCC2E600E6FAFD /* BranchContentDiscoveryManifest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchContentDiscoveryManifest.h; sourceTree = ""; }; + 5F38020524DCC2E700E6FAFD /* BranchCloseRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchCloseRequest.m; sourceTree = ""; }; + 5F38020624DCC2E700E6FAFD /* BranchCPIDRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchCPIDRequest.m; sourceTree = ""; }; 5F38020724DCC2E700E6FAFD /* BNCServerInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCServerInterface.m; sourceTree = ""; }; 5F38020824DCC2E700E6FAFD /* BNCServerRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCServerRequest.h; sourceTree = ""; }; 5F38020924DCC2E700E6FAFD /* BranchContentDiscoverer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchContentDiscoverer.h; sourceTree = ""; }; @@ -432,6 +457,7 @@ 5F38020C24DCC2E700E6FAFD /* BranchContentDiscoverer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchContentDiscoverer.m; sourceTree = ""; }; 5F3D6712232C589100454FF1 /* BranchLastAttributedTouchData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchLastAttributedTouchData.m; sourceTree = ""; }; 5F3D6713232C589100454FF1 /* BranchLastAttributedTouchData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchLastAttributedTouchData.h; sourceTree = ""; }; + 5F3D6717233061CB00454FF1 /* BranchCrossPlatformIDTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchCrossPlatformIDTests.m; sourceTree = ""; }; 5F3D6719233062FD00454FF1 /* BNCJsonLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCJsonLoader.h; sourceTree = ""; }; 5F3D671A233062FD00454FF1 /* BNCJsonLoader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCJsonLoader.m; sourceTree = ""; }; 5F4101F326851DC7003699AD /* BNCPasteboard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCPasteboard.h; sourceTree = ""; }; @@ -441,8 +467,6 @@ 5F437E3B237E03C00052064B /* BNCDeviceSystem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCDeviceSystem.h; sourceTree = ""; }; 5F437E3C237E03C00052064B /* BNCDeviceSystem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCDeviceSystem.m; sourceTree = ""; }; 5F437E3F237E1A560052064B /* BNCDeviceSystemTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCDeviceSystemTests.m; sourceTree = ""; }; - 5F5335C12A8D92C5006CF171 /* BNCRequestFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCRequestFactory.h; sourceTree = ""; }; - 5F5335C22A8D92C5006CF171 /* BNCRequestFactory.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCRequestFactory.m; sourceTree = ""; }; 5F67F48D228F535500067429 /* BNCEncodingUtilsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCEncodingUtilsTests.m; sourceTree = ""; }; 5F73FC7C23313F7A000EBD32 /* BNCJSONUtility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCJSONUtility.h; sourceTree = ""; }; 5F73FC7D23313F7A000EBD32 /* BNCJSONUtility.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCJSONUtility.m; sourceTree = ""; }; @@ -454,6 +478,8 @@ 5F8B7B3F21B5F5CD009CE0A6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5F8B7B4621B5F5F0009CE0A6 /* Branch_setBranchKeyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Branch_setBranchKeyTests.m; sourceTree = ""; }; 5F8BB66D278771890055D2DC /* BNCKeyChainTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCKeyChainTests.m; sourceTree = ""; }; + 5F8F3E60232AD7F3002D0418 /* BranchCrossPlatformID.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchCrossPlatformID.h; sourceTree = ""; }; + 5F8F3E61232AD7F3002D0418 /* BranchCrossPlatformID.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchCrossPlatformID.m; sourceTree = ""; }; 5F909B712332BEF600A774D2 /* BranchLastAttributedTouchDataTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchLastAttributedTouchDataTests.m; sourceTree = ""; }; 5F92B22F23834AFD00CA909B /* BNCReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCReachability.h; sourceTree = ""; }; 5F92B23023834AFD00CA909B /* BNCReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCReachability.m; sourceTree = ""; }; @@ -468,15 +494,24 @@ 5FB38C7E2521234F00E9A85A /* BNCAppGroupsData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCAppGroupsData.h; sourceTree = ""; }; 5FB38C7F2521234F00E9A85A /* BNCAppGroupsData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCAppGroupsData.m; sourceTree = ""; }; 5FB6CC12264F0C7C0020E478 /* BNCServerRequestQueueTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCServerRequestQueueTests.m; sourceTree = ""; }; - 5FC20E722A93D85F00D9E1C8 /* BNCRequestFactoryTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCRequestFactoryTests.m; sourceTree = ""; }; 5FC4CF7E24860C320001E701 /* latd.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = latd.json; sourceTree = ""; }; 5FC4CF7F24860C320001E701 /* latd_missing_window.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = latd_missing_window.json; sourceTree = ""; }; + 5FC4CF8024860C320001E701 /* cpid.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = cpid.json; sourceTree = ""; }; + 5FC4CF8124860C320001E701 /* cpid_missing_id.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = cpid_missing_id.json; sourceTree = ""; }; 5FC4CF8224860C320001E701 /* example.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = example.json; sourceTree = ""; }; 5FC4CF8324860C320001E701 /* latd_empty_data.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = latd_empty_data.json; sourceTree = ""; }; 5FC4CF8424860C320001E701 /* latd_missing_data.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = latd_missing_data.json; sourceTree = ""; }; + 5FC4CF8524860C320001E701 /* cpid_empty_prob.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = cpid_empty_prob.json; sourceTree = ""; }; + 5FC4CF8624860C320001E701 /* cpid_empty_dev_id.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = cpid_empty_dev_id.json; sourceTree = ""; }; + 5FC4CF8724860C320001E701 /* cpid_missing_past.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = cpid_missing_past.json; sourceTree = ""; }; + 5FC4CF8824860C320001E701 /* cpid_empty_id.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = cpid_empty_id.json; sourceTree = ""; }; + 5FC4CF8924860C320001E701 /* cpid_empty_past.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = cpid_empty_past.json; sourceTree = ""; }; + 5FC4CF8A24860C320001E701 /* cpid_missing_prob.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = cpid_missing_prob.json; sourceTree = ""; }; + 5FC4CF8B24860C320001E701 /* cpid_missing_dev_id.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = cpid_missing_dev_id.json; sourceTree = ""; }; 5FC7326622D81002006E6FBC /* BNCAppleReceipt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCAppleReceipt.h; sourceTree = ""; }; 5FC7326722D81002006E6FBC /* BNCAppleReceipt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCAppleReceipt.m; sourceTree = ""; }; 5FC7326F22DD1F93006E6FBC /* BNCAppleReceiptTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCAppleReceiptTests.m; sourceTree = ""; }; + 5FC7327622DE9A44006E6FBC /* BNCServerInterfaceTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCServerInterfaceTests.m; sourceTree = ""; }; 5FCF7EAC29DC96A7008D629E /* BNCURLFilterSkiplistUpgradeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCURLFilterSkiplistUpgradeTests.m; sourceTree = ""; }; 5FD1786D26DEE49C009696E3 /* BNCPasteboardTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCPasteboardTests.m; sourceTree = ""; }; 5FDB04EB24E4D23300F2F267 /* BNCSKAdNetwork.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCSKAdNetwork.h; sourceTree = ""; }; @@ -491,7 +526,6 @@ 5FE693F52405E91500E3AEE2 /* BNCCallbackMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCCallbackMap.h; sourceTree = ""; }; 5FE693F62405E91500E3AEE2 /* BNCCallbackMap.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCCallbackMap.m; sourceTree = ""; }; 5FE694372405FA2700E3AEE2 /* BNCCallbackMapTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCCallbackMapTests.m; sourceTree = ""; }; - 5FF7D2852A9549B40049158D /* AdServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdServices.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/AdServices.framework; sourceTree = DEVELOPER_DIR; }; 63E4C4861D25E16A00A45FD8 /* LogOutputViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogOutputViewController.h; sourceTree = ""; }; 63E4C4871D25E16A00A45FD8 /* LogOutputViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogOutputViewController.m; sourceTree = ""; }; 63E4C4891D25E17B00A45FD8 /* NavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationController.h; sourceTree = ""; }; @@ -521,7 +555,7 @@ 677F4CB41C1FB0FA0029F2B3 /* Branch-TestBed.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Branch-TestBed.entitlements"; sourceTree = ""; }; 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; }; - 713E79E4D7BF588897570949 /* Pods-Branch-SDK-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Branch-SDK-Tests.release.xcconfig"; path = "Target Support Files/Pods-Branch-SDK-Tests/Pods-Branch-SDK-Tests.release.xcconfig"; sourceTree = ""; }; + 6F8346B3671BEF4D5274161E /* libPods-Branch-SDK-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Branch-SDK-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 7B18DF471F1F00E200C25C84 /* BNCCrashlyticsWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCCrashlyticsWrapper.h; sourceTree = ""; }; 7B18DF481F1F00E200C25C84 /* BNCCrashlyticsWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCCrashlyticsWrapper.m; sourceTree = ""; }; 7D5882301CA1BEEA00FF6358 /* BNCDeviceInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCDeviceInfo.h; sourceTree = ""; }; @@ -532,6 +566,8 @@ 7E30BCF61A72FE7900AC7402 /* BNCLinkCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCLinkCache.m; sourceTree = ""; }; 7E6ACAF919E324120066913E /* BNCConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCConfig.h; sourceTree = ""; }; 7E6B3B511AA42D0E005F45BF /* Branch-SDK-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Branch-SDK-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8FB246ACB97F3D73F28A4536 /* Pods-Branch-SDK-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Branch-SDK-Tests.release.xcconfig"; path = "Target Support Files/Pods-Branch-SDK-Tests/Pods-Branch-SDK-Tests.release.xcconfig"; sourceTree = ""; }; + 90CAF8DC43EFE0F2055286FE /* Pods-Branch-SDK-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Branch-SDK-Tests.debug.xcconfig"; path = "Target Support Files/Pods-Branch-SDK-Tests/Pods-Branch-SDK-Tests.debug.xcconfig"; sourceTree = ""; }; 9A2B7DD31FEC3BAE00CD188B /* Branch+Validator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Branch+Validator.h"; sourceTree = ""; }; 9A2B7DD41FEC3BAE00CD188B /* Branch+Validator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Branch+Validator.m"; sourceTree = ""; }; C10A6DE029A97E440061A851 /* TestStoreKitConfig.storekit */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestStoreKitConfig.storekit; sourceTree = ""; }; @@ -545,7 +581,6 @@ C12320B42808DB90007771C0 /* BranchQRCodeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchQRCodeTests.m; sourceTree = ""; }; C12320B6280E2060007771C0 /* BranchQRCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchQRCode.h; sourceTree = ""; }; C12320B8280E2091007771C0 /* BranchQRCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchQRCode.m; sourceTree = ""; }; - C15CC9DD2ABCB549003CC339 /* BNCCurrencyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCCurrencyTests.m; sourceTree = ""; }; C1614D55285BC8A00098946B /* LinkPresentation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LinkPresentation.framework; path = System/Library/Frameworks/LinkPresentation.framework; sourceTree = SDKROOT; }; C1614D5A285BD4AF0098946B /* BranchPluginSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchPluginSupport.h; sourceTree = ""; }; C1614D5B285BD4AF0098946B /* BranchPluginSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchPluginSupport.m; sourceTree = ""; }; @@ -573,7 +608,6 @@ F1D3591E1ED4DCC500A93FD5 /* BNCDeepLinkViewControllerInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCDeepLinkViewControllerInstance.h; sourceTree = ""; }; F1D3591F1ED4DCC500A93FD5 /* BNCDeepLinkViewControllerInstance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCDeepLinkViewControllerInstance.m; sourceTree = ""; }; F1D4F9AC1F323F01002D13FF /* Branch-TestBed-UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Branch-TestBed-UITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - F2C896423B99BFA2E8B0E4D6 /* libPods-Branch-SDK-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Branch-SDK-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -584,7 +618,6 @@ 5F92B2362383644C00CA909B /* SystemConfiguration.framework in Frameworks */, 5F437E38237DE1320052064B /* CoreTelephony.framework in Frameworks */, 5F205D05231864E800C776D1 /* WebKit.framework in Frameworks */, - 5FF7D2862A9549B40049158D /* AdServices.framework in Frameworks */, 466B584F1B17775900A69EDE /* AdSupport.framework in Frameworks */, F1CF14111F4CC79F00BB2694 /* CoreSpotlight.framework in Frameworks */, 466B58521B17776500A69EDE /* Foundation.framework in Frameworks */, @@ -612,6 +645,7 @@ 670016661940F51400A9E103 /* CoreGraphics.framework in Frameworks */, 67F270891BA9FCFF002546A7 /* CoreSpotlight.framework in Frameworks */, 670016641940F51400A9E103 /* Foundation.framework in Frameworks */, + 4DDC52621DCC08E700CFB737 /* iAd.framework in Frameworks */, 466B58811B1778DB00A69EDE /* libBranch.a in Frameworks */, 670016681940F51400A9E103 /* UIKit.framework in Frameworks */, 5F42763325DB3694005B9BBC /* AdServices.framework in Frameworks */, @@ -624,7 +658,7 @@ files = ( 4DD056122177A65C009BD3DD /* libOCMock.a in Frameworks */, 4DD056142177A65C009BD3DD /* libOHHTTPStubs.a in Frameworks */, - CE09D25C88071212954A776D /* libPods-Branch-SDK-Tests.a in Frameworks */, + 6EF9E0CC67B914F9A632E6F2 /* libPods-Branch-SDK-Tests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -642,7 +676,6 @@ 4D16837A2098C901008819E3 /* Branch-SDK-Tests */ = { isa = PBXGroup; children = ( - E7A728BC2AA9A112009343B7 /* BNCAPIServerTest.m */, 5FC7326F22DD1F93006E6FBC /* BNCAppleReceiptTests.m */, 4D1683972098C901008819E3 /* BNCApplication.Test.m */, 4D7881FB209CF2D4002B750F /* BNCApplication+BNCTest.h */, @@ -665,7 +698,6 @@ 4D1683A02098C901008819E3 /* BNCPreferenceHelperTests.m */, 5F92B23323835FEB00CA909B /* BNCReachabilityTests.m */, C1CC888129BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m */, - 5FC20E722A93D85F00D9E1C8 /* BNCRequestFactoryTests.m */, 4D16837E2098C901008819E3 /* BNCServerInterface.Test.m */, 4D16837D2098C901008819E3 /* BNCServerRequestQueueOldTests.m */, 5FB6CC12264F0C7C0020E478 /* BNCServerRequestQueueTests.m */, @@ -675,10 +707,11 @@ 4D16838D2098C901008819E3 /* BNCTestCase.m */, 4D7881F9209CF2D4002B750F /* BNCTestCase.strings */, 4D7881FA209CF2D4002B750F /* BNCTestCase.Test.m */, - 5FCF7EAC29DC96A7008D629E /* BNCURLFilterSkiplistUpgradeTests.m */, 4D16838C2098C901008819E3 /* BNCURLFilterTests.m */, + 5FCF7EAC29DC96A7008D629E /* BNCURLFilterSkiplistUpgradeTests.m */, 5F205D022318641700C776D1 /* BNCUserAgentCollectorTests.m */, 4D1683812098C901008819E3 /* Branch-SDK-Tests-Bridging-Header.h */, + 5F3D6717233061CB00454FF1 /* BranchCrossPlatformIDTests.m */, 4D1683922098C901008819E3 /* BranchDelegate.Test.m */, 4D16839C2098C901008819E3 /* BranchEvent.Test.m */, 4D1683952098C901008819E3 /* BranchEvent.Test.swift */, @@ -689,16 +722,16 @@ C10F393927A0872800BF5D36 /* BranchPluginSupportTests.m */, C12320B42808DB90007771C0 /* BranchQRCodeTests.m */, 4D1683862098C901008819E3 /* BranchSDKFunctionalityTests.m */, - 4D16837B2098C901008819E3 /* BranchSetIdentityTests.m */, + 4D16837B2098C901008819E3 /* BranchSetIdentityRequestTests.m */, C10C61A9282481FB00761D7E /* BranchShareLinkTests.m */, + 4D1683912098C901008819E3 /* BranchShortUrlRequestTests.m */, + 4D1683942098C901008819E3 /* BranchShortUrlSyncRequestTests.m */, 4D1683962098C901008819E3 /* BranchUniversalObject.Test.m */, 4AB16367239E3A2700D42931 /* DispatchToIsolationQueueTests.m */, 4D16839F2098C901008819E3 /* Info.plist */, 5F892EC4236116CC0023AEC1 /* NSErrorBranchCategoryTests.m */, 4D16839E2098C901008819E3 /* NSString+Branch.Test.m */, E7A728BC2AA9A112009343B7 /* BNCAPIServerTest.m */, - C15CC9DD2ABCB549003CC339 /* BNCCurrencyTests.m */, - ); path = "Branch-SDK-Tests"; sourceTree = ""; @@ -720,9 +753,19 @@ path = "Branch-TestBed-UITests"; sourceTree = ""; }; + 4E9E42B169DC1CF6F46E29F7 /* Pods */ = { + isa = PBXGroup; + children = ( + 90CAF8DC43EFE0F2055286FE /* Pods-Branch-SDK-Tests.debug.xcconfig */, + 8FB246ACB97F3D73F28A4536 /* Pods-Branch-SDK-Tests.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; 5F8B7B3C21B5F5CD009CE0A6 /* Branch-SDK-Unhosted-Tests */ = { isa = PBXGroup; children = ( + 5FC7327622DE9A44006E6FBC /* BNCServerInterfaceTests.m */, 5F67F48D228F535500067429 /* BNCEncodingUtilsTests.m */, 5F8B7B4621B5F5F0009CE0A6 /* Branch_setBranchKeyTests.m */, 5F8B7B3F21B5F5CD009CE0A6 /* Info.plist */, @@ -735,9 +778,18 @@ children = ( 5FC4CF7E24860C320001E701 /* latd.json */, 5FC4CF7F24860C320001E701 /* latd_missing_window.json */, + 5FC4CF8024860C320001E701 /* cpid.json */, + 5FC4CF8124860C320001E701 /* cpid_missing_id.json */, 5FC4CF8224860C320001E701 /* example.json */, 5FC4CF8324860C320001E701 /* latd_empty_data.json */, 5FC4CF8424860C320001E701 /* latd_missing_data.json */, + 5FC4CF8524860C320001E701 /* cpid_empty_prob.json */, + 5FC4CF8624860C320001E701 /* cpid_empty_dev_id.json */, + 5FC4CF8724860C320001E701 /* cpid_missing_past.json */, + 5FC4CF8824860C320001E701 /* cpid_empty_id.json */, + 5FC4CF8924860C320001E701 /* cpid_empty_past.json */, + 5FC4CF8A24860C320001E701 /* cpid_missing_prob.json */, + 5FC4CF8B24860C320001E701 /* cpid_missing_dev_id.json */, ); path = cannedData; sourceTree = ""; @@ -756,7 +808,7 @@ 5FC4CF7D24860C320001E701 /* cannedData */, 670016621940F51400A9E103 /* Frameworks */, 670016611940F51400A9E103 /* Products */, - D7B9BBDAF01EEBE97D55F0AF /* Pods */, + 4E9E42B169DC1CF6F46E29F7 /* Pods */, ); sourceTree = ""; }; @@ -775,7 +827,6 @@ 670016621940F51400A9E103 /* Frameworks */ = { isa = PBXGroup; children = ( - 5FF7D2852A9549B40049158D /* AdServices.framework */, C1614D55285BC8A00098946B /* LinkPresentation.framework */, 5F42763225DB3694005B9BBC /* AdServices.framework */, 5FDB04EF24E4D27000F2F267 /* StoreKit.framework */, @@ -792,7 +843,7 @@ 670016631940F51400A9E103 /* Foundation.framework */, 670016651940F51400A9E103 /* CoreGraphics.framework */, 670016671940F51400A9E103 /* UIKit.framework */, - F2C896423B99BFA2E8B0E4D6 /* libPods-Branch-SDK-Tests.a */, + 6F8346B3671BEF4D5274161E /* libPods-Branch-SDK-Tests.a */, ); name = Frameworks; sourceTree = ""; @@ -848,12 +899,12 @@ E2B947491D15D73900F2270D /* BNCCallbacks.h */, 7E6ACAF919E324120066913E /* BNCConfig.h */, 4D3FA94A1DFF31EB00E2B6A9 /* BNCConfig.m */, + E7CBC3972AA9403100B2D0D9 /* BNCServerAPI.h */, + E7CBC3982AA9403100B2D0D9 /* BNCServerAPI.m */, 466D5A0F1B5991E3009DB845 /* BNCContentDiscoveryManager.h */, 466D5A101B5991E3009DB845 /* BNCContentDiscoveryManager.m */, 7B18DF471F1F00E200C25C84 /* BNCCrashlyticsWrapper.h */, 7B18DF481F1F00E200C25C84 /* BNCCrashlyticsWrapper.m */, - C17394622A8C2282006068F2 /* BNCCurrency.h */, - C17394632A8C228D006068F2 /* BNCCurrency.m */, F1D3591E1ED4DCC500A93FD5 /* BNCDeepLinkViewControllerInstance.h */, F1D3591F1ED4DCC500A93FD5 /* BNCDeepLinkViewControllerInstance.m */, 7D5882301CA1BEEA00FF6358 /* BNCDeviceInfo.h */, @@ -888,18 +939,12 @@ 5F4101F426851DC7003699AD /* BNCPasteboard.m */, 670016C11946309100A9E103 /* BNCPreferenceHelper.h */, 670016C21946309100A9E103 /* BNCPreferenceHelper.m */, - C173945E2A8AEDFB006068F2 /* BNCProductCategory.h */, - C173945F2A8AEE0E006068F2 /* BNCProductCategory.m */, C10C61AB28248E5A00761D7E /* BNCQRCodeCache.h */, C10C61AC28248E5A00761D7E /* BNCQRCodeCache.m */, 5F92B22F23834AFD00CA909B /* BNCReachability.h */, 5F92B23023834AFD00CA909B /* BNCReachability.m */, C1CC887D29BAA06600BDD2B5 /* BNCReferringURLUtility.h */, C1CC887E29BAA06600BDD2B5 /* BNCReferringURLUtility.m */, - 5F5335C12A8D92C5006CF171 /* BNCRequestFactory.h */, - 5F5335C22A8D92C5006CF171 /* BNCRequestFactory.m */, - E7CBC3972AA9403100B2D0D9 /* BNCServerAPI.h */, - E7CBC3982AA9403100B2D0D9 /* BNCServerAPI.m */, 5F3801EB24DCC2E400E6FAFD /* BNCServerInterface.h */, 5F38020724DCC2E700E6FAFD /* BNCServerInterface.m */, 5F38020824DCC2E700E6FAFD /* BNCServerRequest.h */, @@ -928,6 +973,8 @@ 9A2B7DD41FEC3BAE00CD188B /* Branch+Validator.m */, D258D2C41A794D64004A1C90 /* BranchActivityItemProvider.h */, D258D2C51A794D64004A1C90 /* BranchActivityItemProvider.m */, + 5F3801E124DCC2E300E6FAFD /* BranchCloseRequest.h */, + 5F38020524DCC2E700E6FAFD /* BranchCloseRequest.m */, 4665AF221B28935700184037 /* BranchConstants.h */, 4665AF251B28B9BB00184037 /* BranchConstants.m */, 5F38020924DCC2E700E6FAFD /* BranchContentDiscoverer.h */, @@ -936,6 +983,10 @@ 5F3801FB24DCC2E500E6FAFD /* BranchContentDiscoveryManifest.m */, 5F3801DF24DCC2E200E6FAFD /* BranchContentPathProperties.h */, 5F3801EC24DCC2E400E6FAFD /* BranchContentPathProperties.m */, + 5F3801EF24DCC2E400E6FAFD /* BranchCPIDRequest.h */, + 5F38020624DCC2E700E6FAFD /* BranchCPIDRequest.m */, + 5F8F3E60232AD7F3002D0418 /* BranchCrossPlatformID.h */, + 5F8F3E61232AD7F3002D0418 /* BranchCrossPlatformID.m */, 54391A131BA249FA0061CB0F /* BranchCSSearchableItemAttributeSet.h */, 54391A141BA249FA0061CB0F /* BranchCSSearchableItemAttributeSet.m */, 46DBB42F1B335A9B00642FC8 /* BranchDeepLinkingController.h */, @@ -961,6 +1012,8 @@ C1614D5B285BD4AF0098946B /* BranchPluginSupport.m */, C12320B6280E2060007771C0 /* BranchQRCode.h */, C12320B8280E2091007771C0 /* BranchQRCode.m */, + 5F3801F324DCC2E500E6FAFD /* BranchRegisterViewRequest.h */, + 5F3801E524DCC2E300E6FAFD /* BranchRegisterViewRequest.m */, 5F32D7C1242AC338000DE539 /* BranchScene.h */, 5F32D7C2242AC338000DE539 /* BranchScene.m */, 4DB567311E79F46000A8A324 /* BranchShareLink.h */, @@ -981,20 +1034,15 @@ 4DA577211E67B28700A43BDD /* NSString+Branch.m */, 4D9607F21FBF9472008AB3C2 /* UIViewController+Branch.h */, 4D9607F31FBF9473008AB3C2 /* UIViewController+Branch.m */, + C173945E2A8AEDFB006068F2 /* BNCProductCategory.h */, + C173945F2A8AEE0E006068F2 /* BNCProductCategory.m */, + C17394622A8C2282006068F2 /* BNCCurrency.h */, + C17394632A8C228D006068F2 /* BNCCurrency.m */, ); name = BranchSDK; path = ../BranchSDK; sourceTree = ""; }; - D7B9BBDAF01EEBE97D55F0AF /* Pods */ = { - isa = PBXGroup; - children = ( - 130D24DFC422D39DC8CB96CC /* Pods-Branch-SDK-Tests.debug.xcconfig */, - 713E79E4D7BF588897570949 /* Pods-Branch-SDK-Tests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -1008,6 +1056,7 @@ 5FB38C802521234F00E9A85A /* BNCAppGroupsData.h in Headers */, 9A2B7DD51FEC3BAF00CD188B /* Branch+Validator.h in Headers */, F185BAAA1F3D30D70056300C /* BNCSpotlightService.h in Headers */, + 5F38021024DCC2E800E6FAFD /* BranchCloseRequest.h in Headers */, 5FDB04ED24E4D23300F2F267 /* BNCSKAdNetwork.h in Headers */, E7CBC3992AA9403200B2D0D9 /* BNCServerAPI.h in Headers */, 4D955CCC2035021400FB8008 /* BNCURLFilter.h in Headers */, @@ -1039,6 +1088,8 @@ 5F38022424DCC2E800E6FAFD /* BranchShortUrlRequest.h in Headers */, 5F22AFC1240600BE00837CF5 /* BNCCallbackMap.m in Headers */, 4DCF4B031F438A8700AF9AAB /* BranchEvent.h in Headers */, + 5F8F3E62232AD7F3002D0418 /* BranchCrossPlatformID.h in Headers */, + 5F38022224DCC2E800E6FAFD /* BranchRegisterViewRequest.h in Headers */, 5F38023124DCC2E800E6FAFD /* BNCNetworkService.h in Headers */, 5F38021624DCC2E800E6FAFD /* BranchSpotlightUrlRequest.h in Headers */, 5F4101F526851DC7003699AD /* BNCPasteboard.h in Headers */, @@ -1070,9 +1121,9 @@ 5F92B23F238486E200CA909B /* BNCNetworkInterface.h in Headers */, 4DCAC8301F426F7C00405D1D /* NSMutableDictionary+Branch.h in Headers */, 4DCAC8311F426F7C00405D1D /* NSString+Branch.h in Headers */, + 5F38021E24DCC2E800E6FAFD /* BranchCPIDRequest.h in Headers */, 5F38021A24DCC2E800E6FAFD /* BNCServerInterface.h in Headers */, 5F38022D24DCC2E800E6FAFD /* BranchInstallRequest.h in Headers */, - 5F5335C32A8D92C5006CF171 /* BNCRequestFactory.h in Headers */, 5FE276AF2432705B00EA1BD2 /* BNCInitSessionResponse.h in Headers */, F1D359201ED4DCC500A93FD5 /* BNCDeepLinkViewControllerInstance.h in Headers */, 7B18DF491F1F00E200C25C84 /* BNCCrashlyticsWrapper.h in Headers */, @@ -1141,7 +1192,7 @@ isa = PBXNativeTarget; buildConfigurationList = 7E6B3B571AA42D0E005F45BF /* Build configuration list for PBXNativeTarget "Branch-SDK-Tests" */; buildPhases = ( - BF36CDEC6A8D1A1CF5E669A4 /* [CP] Check Pods Manifest.lock */, + 40DD88C9D6295C210BC1F5C7 /* [CP] Check Pods Manifest.lock */, 7E6B3B4D1AA42D0E005F45BF /* Sources */, 7E6B3B4E1AA42D0E005F45BF /* Frameworks */, 7E6B3B4F1AA42D0E005F45BF /* Resources */, @@ -1259,6 +1310,7 @@ 4DE235641FB12C2700D4E5A9 /* Main.storyboard in Resources */, 63E4C4901D25E1BC00A45FD8 /* LaunchScreen.storyboard in Resources */, 63E4C4921D25E1CA00A45FD8 /* Assets.xcassets in Resources */, + 677F4CB51C1FB1910029F2B3 /* Branch-TestBed.entitlements in Resources */, C10A6DE629A995590061A851 /* StoreKitTestCertificate.cer in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1268,9 +1320,18 @@ buildActionMask = 2147483647; files = ( 5FC4CF9124860C440001E701 /* latd_empty_data.json in Resources */, + 5FC4CF8F24860C440001E701 /* cpid_missing_id.json in Resources */, 5FC4CF8C24860C440001E701 /* latd.json in Resources */, + 5FC4CF9824860C440001E701 /* cpid_missing_prob.json in Resources */, 5FC4CF9024860C440001E701 /* example.json in Resources */, + 5FC4CF9724860C440001E701 /* cpid_empty_past.json in Resources */, + 5FC4CF9924860C440001E701 /* cpid_missing_dev_id.json in Resources */, + 5FC4CF9424860C440001E701 /* cpid_empty_dev_id.json in Resources */, + 5FC4CF8E24860C440001E701 /* cpid.json in Resources */, + 5FC4CF9524860C440001E701 /* cpid_missing_past.json in Resources */, 5FC4CF9224860C440001E701 /* latd_missing_data.json in Resources */, + 5FC4CF9624860C440001E701 /* cpid_empty_id.json in Resources */, + 5FC4CF9324860C440001E701 /* cpid_empty_prob.json in Resources */, 4D7881FD209CF2D4002B750F /* BNCTestCase.strings in Resources */, 5FC4CF8D24860C440001E701 /* latd_missing_window.json in Resources */, ); @@ -1303,7 +1364,7 @@ shellPath = /bin/sh; shellScript = "xcrun simctl terminate booted io.branch.sdk.Branch-TestBed\nxcrun simctl uninstall booted io.branch.sdk.Branch-TestBed\n"; }; - BF36CDEC6A8D1A1CF5E669A4 /* [CP] Check Pods Manifest.lock */ = { + 40DD88C9D6295C210BC1F5C7 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1339,6 +1400,7 @@ 5F38020F24DCC2E800E6FAFD /* BNCServerRequest.m in Sources */, 5FC7326922D81002006E6FBC /* BNCAppleReceipt.m in Sources */, 7D58823A1CA1DF2700FF6358 /* BNCDeviceInfo.m in Sources */, + 5F8F3E63232AD7F3002D0418 /* BranchCrossPlatformID.m in Sources */, 5FE276B02432705B00EA1BD2 /* BNCInitSessionResponse.m in Sources */, 5F38021524DCC2E800E6FAFD /* BranchShortUrlSyncRequest.m in Sources */, 5F38023224DCC2E800E6FAFD /* BNCServerRequestQueue.m in Sources */, @@ -1364,20 +1426,22 @@ 5F38021724DCC2E800E6FAFD /* BranchOpenRequest.m in Sources */, 4D59B5222006979C00F89FD5 /* BNCKeyChain.m in Sources */, F1D359211ED4DCC500A93FD5 /* BNCDeepLinkViewControllerInstance.m in Sources */, - 5FF7D2842A9549970049158D /* BNCRequestFactory.m in Sources */, 466B585F1B17779C00A69EDE /* BNCSystemObserver.m in Sources */, 4DB567341E79F46000A8A324 /* BranchShareLink.m in Sources */, C10C61AE28248E5A00761D7E /* BNCQRCodeCache.m in Sources */, 5FB38C812521234F00E9A85A /* BNCAppGroupsData.m in Sources */, 5F38023624DCC2E800E6FAFD /* BNCServerInterface.m in Sources */, 5F38022B24DCC2E800E6FAFD /* BNCServerResponse.m in Sources */, + 5F38023424DCC2E800E6FAFD /* BranchCloseRequest.m in Sources */, C1614D5D285BD4AF0098946B /* BranchPluginSupport.m in Sources */, 4D3FA94B1DFF31EB00E2B6A9 /* BNCConfig.m in Sources */, + 5F38021424DCC2E800E6FAFD /* BranchRegisterViewRequest.m in Sources */, F185BAAB1F3D30D70056300C /* BNCSpotlightService.m in Sources */, 4665AF261B28B9BB00184037 /* BranchConstants.m in Sources */, 5F38023A24DCC2E800E6FAFD /* BranchShortUrlRequest.m in Sources */, 5F38021B24DCC2E800E6FAFD /* BranchContentPathProperties.m in Sources */, 5F32D7C4242AC339000DE539 /* BranchScene.m in Sources */, + 5F38023524DCC2E800E6FAFD /* BranchCPIDRequest.m in Sources */, C17394642A8C228D006068F2 /* BNCCurrency.m in Sources */, 4DCF4AFB1F4388F600AF9AAB /* BranchEvent.m in Sources */, C17394602A8AEE0E006068F2 /* BNCProductCategory.m in Sources */, @@ -1412,6 +1476,7 @@ 5F67F48E228F535500067429 /* BNCEncodingUtilsTests.m in Sources */, 5F8B7B4721B5F5F0009CE0A6 /* Branch_setBranchKeyTests.m in Sources */, 5F3D671C233062FD00454FF1 /* BNCJsonLoader.m in Sources */, + 5FC7327722DE9A44006E6FBC /* BNCServerInterfaceTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1440,13 +1505,12 @@ 5F909B5E23314CE900A774D2 /* BNCJSONUtilityTests.m in Sources */, 5F909B722332BEF600A774D2 /* BranchLastAttributedTouchDataTests.m in Sources */, 4D7881FE209CF2D4002B750F /* BNCTestCase.Test.m in Sources */, - 5FC20E732A93D85F00D9E1C8 /* BNCRequestFactoryTests.m in Sources */, 4D1683B02098C902008819E3 /* BranchSDKFunctionalityTests.m in Sources */, 5FA9112F29BC662000F3D35C /* BNCNetworkInterfaceTests.m in Sources */, + 5F3D6718233061CB00454FF1 /* BranchCrossPlatformIDTests.m in Sources */, 5FD1786E26DEE49D009696E3 /* BNCPasteboardTests.m in Sources */, 5F92B242238752A500CA909B /* BNCDeviceInfoTests.m in Sources */, 4D1683C62098C902008819E3 /* BranchEvent.Test.m in Sources */, - C15CC9DE2ABCB549003CC339 /* BNCCurrencyTests.m in Sources */, C10F393A27A0872800BF5D36 /* BranchPluginSupportTests.m in Sources */, 5F83B9ED2433BAAA0054A022 /* BNCServerInterface.Test.m in Sources */, 5F205D0823186AF700C776D1 /* BNCUserAgentCollectorTests.m in Sources */, @@ -1454,12 +1518,14 @@ E7A728BD2AA9A112009343B7 /* BNCAPIServerTest.m in Sources */, 4D1683C12098C902008819E3 /* BNCApplication.Test.m in Sources */, 4D1683B92098C902008819E3 /* BNCSystemObserverTests.m in Sources */, + 4D1683BE2098C902008819E3 /* BranchShortUrlSyncRequestTests.m in Sources */, 4D1683CA2098C902008819E3 /* BNCPreferenceHelperTests.m in Sources */, 4AB16368239E3A2700D42931 /* DispatchToIsolationQueueTests.m in Sources */, 5F8BB66E278771890055D2DC /* BNCKeyChainTests.m in Sources */, C1CC888229BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m in Sources */, 5FE694382405FA2700E3AEE2 /* BNCCallbackMapTests.m in Sources */, 5FDB04F424E6156800F2F267 /* BNCSKAdNetworkTests.m in Sources */, + 4D1683BB2098C902008819E3 /* BranchShortUrlRequestTests.m in Sources */, 5FB6CC13264F0C7C0020E478 /* BNCServerRequestQueueTests.m in Sources */, 4D1683BA2098C902008819E3 /* BNCLog.Test.m in Sources */, 4D1683AE2098C902008819E3 /* BNCLinkDataTests.m in Sources */, @@ -1474,7 +1540,7 @@ 5F892EC5236116CD0023AEC1 /* NSErrorBranchCategoryTests.m in Sources */, 4D1683AA2098C902008819E3 /* BranchOpenRequestTests.m in Sources */, 4D1683A82098C902008819E3 /* BNCServerRequestQueueOldTests.m in Sources */, - 4D1683A62098C902008819E3 /* BranchSetIdentityTests.m in Sources */, + 4D1683A62098C902008819E3 /* BranchSetIdentityRequestTests.m in Sources */, 4D1683BC2098C902008819E3 /* BranchDelegate.Test.m in Sources */, 4D1683B62098C902008819E3 /* BNCURLFilterTests.m in Sources */, C10C61AA282481FB00761D7E /* BranchShareLinkTests.m in Sources */, @@ -1794,7 +1860,7 @@ }; 7E6B3B581AA42D0E005F45BF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 130D24DFC422D39DC8CB96CC /* Pods-Branch-SDK-Tests.debug.xcconfig */; + baseConfigurationReference = 90CAF8DC43EFE0F2055286FE /* Pods-Branch-SDK-Tests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_WARN_UNREACHABLE_CODE = YES; @@ -1820,7 +1886,7 @@ }; 7E6B3B591AA42D0E005F45BF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 713E79E4D7BF588897570949 /* Pods-Branch-SDK-Tests.release.xcconfig */; + baseConfigurationReference = 8FB246ACB97F3D73F28A4536 /* Pods-Branch-SDK-Tests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_WARN_UNREACHABLE_CODE = YES; diff --git a/Branch-TestBed/cannedData/cpid.json b/Branch-TestBed/cannedData/cpid.json new file mode 100644 index 000000000..f6190ab4c --- /dev/null +++ b/Branch-TestBed/cannedData/cpid.json @@ -0,0 +1,20 @@ +{ + "user_data": { + "cross_platform_id": "273e4c5da13b978ee2f78f8997abd972959c184aaffb8cad716721a00a08d32b", + "developer_identity": "test@branch.io", + "past_cross_platform_ids": [ + "a0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20", + "z0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20" + ], + "prob_cross_platform_ids": [ + { + "id": "88ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.95 + }, + { + "id": "08ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.91 + } + ] + } +} diff --git a/Branch-TestBed/cannedData/cpid_empty_dev_id.json b/Branch-TestBed/cannedData/cpid_empty_dev_id.json new file mode 100644 index 000000000..74bc3ffbe --- /dev/null +++ b/Branch-TestBed/cannedData/cpid_empty_dev_id.json @@ -0,0 +1,20 @@ +{ + "user_data": { + "cross_platform_id": "273e4c5da13b978ee2f78f8997abd972959c184aaffb8cad716721a00a08d32b", + "developer_identity": "", + "past_cross_platform_ids": [ + "a0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20", + "z0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20" + ], + "prob_cross_platform_ids": [ + { + "id": "88ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.95 + }, + { + "id": "08ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.91 + } + ] + } +} diff --git a/Branch-TestBed/cannedData/cpid_empty_id.json b/Branch-TestBed/cannedData/cpid_empty_id.json new file mode 100644 index 000000000..26c8e8bcc --- /dev/null +++ b/Branch-TestBed/cannedData/cpid_empty_id.json @@ -0,0 +1,20 @@ +{ + "user_data": { + "cross_platform_id": "", + "developer_identity": "test@branch.io", + "past_cross_platform_ids": [ + "a0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20", + "z0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20" + ], + "prob_cross_platform_ids": [ + { + "id": "88ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.95 + }, + { + "id": "08ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.91 + } + ] + } +} diff --git a/Branch-TestBed/cannedData/cpid_empty_past.json b/Branch-TestBed/cannedData/cpid_empty_past.json new file mode 100644 index 000000000..c28561223 --- /dev/null +++ b/Branch-TestBed/cannedData/cpid_empty_past.json @@ -0,0 +1,17 @@ +{ + "user_data": { + "cross_platform_id": "273e4c5da13b978ee2f78f8997abd972959c184aaffb8cad716721a00a08d32b", + "developer_identity": "test@branch.io", + "past_cross_platform_ids": [ ], + "prob_cross_platform_ids": [ + { + "id": "88ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.95 + }, + { + "id": "08ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.91 + } + ] + } +} diff --git a/Branch-TestBed/cannedData/cpid_empty_prob.json b/Branch-TestBed/cannedData/cpid_empty_prob.json new file mode 100644 index 000000000..7cf595679 --- /dev/null +++ b/Branch-TestBed/cannedData/cpid_empty_prob.json @@ -0,0 +1,11 @@ +{ + "user_data": { + "developer_identity": "test@branch.io", + "cross_platform_id": "273e4c5da13b978ee2f78f8997abd972959c184aaffb8cad716721a00a08d32b", + "past_cross_platform_ids": [ + "a0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20", + "z0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20" + ], + "prob_cross_platform_ids": [ ] + } +} diff --git a/Branch-TestBed/cannedData/cpid_missing_dev_id.json b/Branch-TestBed/cannedData/cpid_missing_dev_id.json new file mode 100644 index 000000000..749763585 --- /dev/null +++ b/Branch-TestBed/cannedData/cpid_missing_dev_id.json @@ -0,0 +1,19 @@ +{ + "user_data": { + "cross_platform_id": "273e4c5da13b978ee2f78f8997abd972959c184aaffb8cad716721a00a08d32b", + "past_cross_platform_ids": [ + "a0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20", + "z0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20" + ], + "prob_cross_platform_ids": [ + { + "id": "88ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.95 + }, + { + "id": "08ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.91 + } + ] + } +} diff --git a/Branch-TestBed/cannedData/cpid_missing_id.json b/Branch-TestBed/cannedData/cpid_missing_id.json new file mode 100644 index 000000000..f20297036 --- /dev/null +++ b/Branch-TestBed/cannedData/cpid_missing_id.json @@ -0,0 +1,14 @@ +{ + "user_data": { + "developer_identity": "test@branch.io", + "past_cross_platform_ids": [ + "a0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20" + ], + "prob_cross_platform_ids": [ + { + "id": "88ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.95 + } + ] + } +} diff --git a/Branch-TestBed/cannedData/cpid_missing_past.json b/Branch-TestBed/cannedData/cpid_missing_past.json new file mode 100644 index 000000000..c9f77ff11 --- /dev/null +++ b/Branch-TestBed/cannedData/cpid_missing_past.json @@ -0,0 +1,16 @@ +{ + "user_data": { + "developer_identity": "test@branch.io", + "cross_platform_id": "273e4c5da13b978ee2f78f8997abd972959c184aaffb8cad716721a00a08d32b", + "prob_cross_platform_ids": [ + { + "id": "88ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.95 + }, + { + "id": "08ce973fead4b23bca482725a7ac8d6e5198f0d2c70ec3c511472633c645de42", + "probability": 0.91 + } + ] + } +} diff --git a/Branch-TestBed/cannedData/cpid_missing_prob.json b/Branch-TestBed/cannedData/cpid_missing_prob.json new file mode 100644 index 000000000..5a8ab5b6b --- /dev/null +++ b/Branch-TestBed/cannedData/cpid_missing_prob.json @@ -0,0 +1,10 @@ +{ + "user_data": { + "developer_identity": "test@branch.io", + "cross_platform_id": "273e4c5da13b978ee2f78f8997abd972959c184aaffb8cad716721a00a08d32b", + "past_cross_platform_ids": [ + "a0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20", + "z0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20" + ] + } +} diff --git a/BranchSDK.podspec b/BranchSDK.podspec index 555f13065..13817fef4 100644 --- a/BranchSDK.podspec +++ b/BranchSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "BranchSDK" - s.version = "3.0.0" + s.version = "2.2.1" s.summary = "Create an HTTP URL for any piece of content in your app" s.description = <<-DESC - Want the highest possible conversions on your sharing feature? @@ -18,7 +18,6 @@ Use the Branch SDK (branch.io) to create and power the links that point back to s.ios.deployment_target = '12.0' s.tvos.deployment_target = '12.0' - s.resources = ["BranchSDK/*.{xcprivacy}"] s.ios.source_files = "BranchSDK/*.{h,m}" s.tvos.source_files = "BranchSDK/*.{h,m}" diff --git a/BranchSDK.xcodeproj/project.pbxproj b/BranchSDK.xcodeproj/project.pbxproj index 6c2392513..d22b3d804 100644 --- a/BranchSDK.xcodeproj/project.pbxproj +++ b/BranchSDK.xcodeproj/project.pbxproj @@ -64,6 +64,7 @@ 5F2210C82894A34000C5B190 /* NSString+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22102A2894A33E00C5B190 /* NSString+Branch.m */; }; 5F2210C92894A34000C5B190 /* BNCReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22102B2894A33E00C5B190 /* BNCReachability.h */; }; 5F2210CA2894A34000C5B190 /* BranchInstallRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22102C2894A33E00C5B190 /* BranchInstallRequest.m */; }; + 5F2210CC2894A34000C5B190 /* BranchCPIDRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22102E2894A33E00C5B190 /* BranchCPIDRequest.h */; }; 5F2210CD2894A34000C5B190 /* BNCDeviceInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22102F2894A33E00C5B190 /* BNCDeviceInfo.h */; }; 5F2210CF2894A34000C5B190 /* BranchJsonConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210312894A33E00C5B190 /* BranchJsonConfig.m */; }; 5F2210D02894A34000C5B190 /* BNCSKAdNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210322894A33E00C5B190 /* BNCSKAdNetwork.h */; }; @@ -88,11 +89,14 @@ 5F2210E42894A34000C5B190 /* BNCDeviceSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210462894A33E00C5B190 /* BNCDeviceSystem.m */; }; 5F2210E62894A34000C5B190 /* BNCServerResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210482894A33E00C5B190 /* BNCServerResponse.m */; }; 5F2210E72894A34000C5B190 /* BranchInstallRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210492894A33E00C5B190 /* BranchInstallRequest.h */; }; + 5F2210E82894A34000C5B190 /* BranchCrossPlatformID.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22104A2894A33E00C5B190 /* BranchCrossPlatformID.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F2210EA2894A34000C5B190 /* BNCThreads.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22104C2894A33F00C5B190 /* BNCThreads.h */; }; 5F2210EB2894A34000C5B190 /* BNCNetworkService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22104D2894A33F00C5B190 /* BNCNetworkService.h */; }; 5F2210EC2894A34000C5B190 /* BNCLinkCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22104E2894A33F00C5B190 /* BNCLinkCache.m */; }; 5F2210ED2894A34000C5B190 /* BranchLinkProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22104F2894A33F00C5B190 /* BranchLinkProperties.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5F2210EE2894A34000C5B190 /* BranchCloseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210502894A33F00C5B190 /* BranchCloseRequest.m */; }; 5F2210EF2894A34000C5B190 /* BranchOpenRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210512894A33F00C5B190 /* BranchOpenRequest.h */; }; + 5F2210F02894A34000C5B190 /* BranchRegisterViewRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210522894A33F00C5B190 /* BranchRegisterViewRequest.h */; }; 5F2210F12894A34000C5B190 /* BNCLinkData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210532894A33F00C5B190 /* BNCLinkData.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F2210F22894A34000C5B190 /* BranchPluginSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210542894A33F00C5B190 /* BranchPluginSupport.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F2210F32894A34000C5B190 /* BNCLinkCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210552894A33F00C5B190 /* BNCLinkCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -111,6 +115,7 @@ 5F2211022894A34000C5B190 /* BNCAppleReceipt.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210642894A33F00C5B190 /* BNCAppleReceipt.m */; }; 5F2211042894A34000C5B190 /* BNCServerResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210662894A33F00C5B190 /* BNCServerResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F2211052894A34000C5B190 /* BranchContentDiscoveryManifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210672894A33F00C5B190 /* BranchContentDiscoveryManifest.h */; }; + 5F2211062894A34000C5B190 /* BranchCPIDRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210682894A33F00C5B190 /* BranchCPIDRequest.m */; }; 5F2211072894A34000C5B190 /* BranchDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210692894A33F00C5B190 /* BranchDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F22110A2894A34000C5B190 /* BranchShortUrlRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22106C2894A33F00C5B190 /* BranchShortUrlRequest.h */; }; 5F22110B2894A34000C5B190 /* BNCServerInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22106D2894A33F00C5B190 /* BNCServerInterface.m */; }; @@ -120,6 +125,7 @@ 5F2211102894A34000C5B190 /* BNCLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210722894A33F00C5B190 /* BNCLog.m */; }; 5F2211112894A34000C5B190 /* BNCContentDiscoveryManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210732894A33F00C5B190 /* BNCContentDiscoveryManager.h */; }; 5F2211122894A34000C5B190 /* BNCInitSessionResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210742894A33F00C5B190 /* BNCInitSessionResponse.m */; }; + 5F2211132894A34000C5B190 /* BranchCloseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210752894A33F00C5B190 /* BranchCloseRequest.h */; }; 5F2211142894A34000C5B190 /* BranchConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210762894A33F00C5B190 /* BranchConstants.h */; }; 5F2211152894A34000C5B190 /* BranchPluginSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210772894A33F00C5B190 /* BranchPluginSupport.m */; }; 5F2211162894A34000C5B190 /* BNCInitSessionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210782894A33F00C5B190 /* BNCInitSessionResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -144,6 +150,7 @@ 5F22112C2894A34000C5B190 /* BNCJSONUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22108E2894A34000C5B190 /* BNCJSONUtility.m */; }; 5F22112D2894A34000C5B190 /* BNCServerInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22108F2894A34000C5B190 /* BNCServerInterface.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F22112E2894A34000C5B190 /* BranchSpotlightUrlRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210902894A34000C5B190 /* BranchSpotlightUrlRequest.h */; }; + 5F22112F2894A34000C5B190 /* BranchRegisterViewRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210912894A34000C5B190 /* BranchRegisterViewRequest.m */; }; 5F2211302894A34000C5B190 /* Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210922894A34000C5B190 /* Branch.m */; }; 5F2211312894A34000C5B190 /* BNCKeyChain.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210932894A34000C5B190 /* BNCKeyChain.m */; }; 5F2211322894A34000C5B190 /* BranchUniversalObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210942894A34000C5B190 /* BranchUniversalObject.m */; }; @@ -184,6 +191,7 @@ 5F22115C2894A34000C5B190 /* BNCSpotlightService.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210BE2894A34000C5B190 /* BNCSpotlightService.h */; }; 5F22115D2894A34000C5B190 /* BranchActivityItemProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210BF2894A34000C5B190 /* BranchActivityItemProvider.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F22115E2894A34000C5B190 /* BNCPasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210C02894A34000C5B190 /* BNCPasteboard.m */; }; + 5F22115F2894A34000C5B190 /* BranchCrossPlatformID.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210C12894A34000C5B190 /* BranchCrossPlatformID.m */; }; 5F2211612894A34000C5B190 /* BNCUserAgentCollector.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210C32894A34000C5B190 /* BNCUserAgentCollector.m */; }; 5F2211622894A34100C5B190 /* BranchShareLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210C42894A34000C5B190 /* BranchShareLink.m */; }; 5F2211722894A9C000C5B190 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F2211712894A9C000C5B190 /* AppDelegate.swift */; }; @@ -195,12 +203,6 @@ 5F2211892894A9C100C5B190 /* TestHostTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F2211882894A9C100C5B190 /* TestHostTests.swift */; }; 5F2211932894A9C100C5B190 /* TestHostUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F2211922894A9C100C5B190 /* TestHostUITests.swift */; }; 5F2211952894A9C100C5B190 /* TestHostUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F2211942894A9C100C5B190 /* TestHostUITestsLaunchTests.swift */; }; - 5F5139962AC21F6E004A3BA4 /* BNCRequestFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F5139942AC21F6E004A3BA4 /* BNCRequestFactory.h */; }; - 5F5139972AC21F6E004A3BA4 /* BNCRequestFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F5139942AC21F6E004A3BA4 /* BNCRequestFactory.h */; }; - 5F5139982AC21F6E004A3BA4 /* BNCRequestFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F5139942AC21F6E004A3BA4 /* BNCRequestFactory.h */; }; - 5F5139992AC21F6E004A3BA4 /* BNCRequestFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5139952AC21F6E004A3BA4 /* BNCRequestFactory.m */; }; - 5F51399A2AC21F6E004A3BA4 /* BNCRequestFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5139952AC21F6E004A3BA4 /* BNCRequestFactory.m */; }; - 5F51399B2AC21F6E004A3BA4 /* BNCRequestFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5139952AC21F6E004A3BA4 /* BNCRequestFactory.m */; }; 5F6DD2482894AEBD00AE9FB0 /* BranchSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F22101D2894A0DB00C5B190 /* BranchSDK.framework */; }; 5F6DD24C2894AF5E00AE9FB0 /* NSURLSession+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F6DD24A2894AF5E00AE9FB0 /* NSURLSession+Branch.m */; }; 5F73EBFA28ECE65400608601 /* BranchSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F73EBF428ECE65400608601 /* BranchSDK.framework */; }; @@ -241,7 +243,10 @@ 5F7903BF28B59147003144CD /* BNCURLFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210A72894A34000C5B190 /* BNCURLFilter.h */; }; 5F7903C128B59147003144CD /* Branch.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210B82894A34000C5B190 /* Branch.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F7903C228B59147003144CD /* Branch+Validator.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22107E2894A33F00C5B190 /* Branch+Validator.h */; }; + 5F7903C428B59147003144CD /* BranchCloseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210752894A33F00C5B190 /* BranchCloseRequest.h */; }; 5F7903C528B59147003144CD /* BranchConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210762894A33F00C5B190 /* BranchConstants.h */; }; + 5F7903C928B59147003144CD /* BranchCPIDRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22102E2894A33E00C5B190 /* BranchCPIDRequest.h */; }; + 5F7903CA28B59147003144CD /* BranchCrossPlatformID.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22104A2894A33E00C5B190 /* BranchCrossPlatformID.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F7903CC28B59147003144CD /* BranchDeepLinkingController.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210AB2894A34000C5B190 /* BranchDeepLinkingController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F7903CD28B59147003144CD /* BranchDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210692894A33F00C5B190 /* BranchDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F7903CE28B59147003144CD /* BranchEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22107D2894A33F00C5B190 /* BranchEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -253,6 +258,7 @@ 5F7903D528B59148003144CD /* BranchOpenRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210512894A33F00C5B190 /* BranchOpenRequest.h */; }; 5F7903D628B59148003144CD /* BranchPluginSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210542894A33F00C5B190 /* BranchPluginSupport.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F7903D728B59148003144CD /* BranchQRCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210982894A34000C5B190 /* BranchQRCode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5F7903D828B59148003144CD /* BranchRegisterViewRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210522894A33F00C5B190 /* BranchRegisterViewRequest.h */; }; 5F7903D928B59148003144CD /* BranchScene.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210612894A33F00C5B190 /* BranchScene.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5F7903DC28B59148003144CD /* BranchShortUrlRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22106C2894A33F00C5B190 /* BranchShortUrlRequest.h */; }; 5F7903DD28B59148003144CD /* BranchShortUrlSyncRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210272894A33E00C5B190 /* BranchShortUrlSyncRequest.h */; }; @@ -295,7 +301,10 @@ 5F79040D28B5C93E003144CD /* BNCURLFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210292894A33E00C5B190 /* BNCURLFilter.m */; }; 5F79040F28B5C93E003144CD /* Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210922894A34000C5B190 /* Branch.m */; }; 5F79041028B5C93E003144CD /* Branch+Validator.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210962894A34000C5B190 /* Branch+Validator.m */; }; + 5F79041228B5C93E003144CD /* BranchCloseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210502894A33F00C5B190 /* BranchCloseRequest.m */; }; 5F79041328B5C93E003144CD /* BranchConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210362894A33E00C5B190 /* BranchConstants.m */; }; + 5F79041728B5C93E003144CD /* BranchCPIDRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210682894A33F00C5B190 /* BranchCPIDRequest.m */; }; + 5F79041828B5C93E003144CD /* BranchCrossPlatformID.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210C12894A34000C5B190 /* BranchCrossPlatformID.m */; }; 5F79041A28B5C93E003144CD /* BranchDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22105D2894A33F00C5B190 /* BranchDelegate.m */; }; 5F79041B28B5C93E003144CD /* BranchEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210432894A33E00C5B190 /* BranchEvent.m */; }; 5F79041C28B5C93E003144CD /* BranchInstallRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22102C2894A33E00C5B190 /* BranchInstallRequest.m */; }; @@ -306,6 +315,7 @@ 5F79042228B5C93F003144CD /* BranchOpenRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210342894A33E00C5B190 /* BranchOpenRequest.m */; }; 5F79042328B5C93F003144CD /* BranchPluginSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210772894A33F00C5B190 /* BranchPluginSupport.m */; }; 5F79042428B5C93F003144CD /* BranchQRCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22108A2894A33F00C5B190 /* BranchQRCode.m */; }; + 5F79042528B5C93F003144CD /* BranchRegisterViewRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210912894A34000C5B190 /* BranchRegisterViewRequest.m */; }; 5F79042628B5C93F003144CD /* BranchScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210572894A33F00C5B190 /* BranchScene.m */; }; 5F79042928B5C93F003144CD /* BranchShortUrlRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210792894A33F00C5B190 /* BranchShortUrlRequest.m */; }; 5F79042A28B5C93F003144CD /* BranchShortUrlSyncRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210332894A33E00C5B190 /* BranchShortUrlSyncRequest.m */; }; @@ -315,9 +325,6 @@ 5F79042F28B5C93F003144CD /* NSMutableDictionary+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210352894A33E00C5B190 /* NSMutableDictionary+Branch.m */; }; 5F79043028B5C93F003144CD /* NSString+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22102A2894A33E00C5B190 /* NSString+Branch.m */; }; 5F79043128B5C93F003144CD /* UIViewController+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210412894A33E00C5B190 /* UIViewController+Branch.m */; }; - 5FC446652ACCB97000FF1C87 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */; }; - 5FC446662ACCB97100FF1C87 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */; }; - 5FC446672ACCB97200FF1C87 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */; }; 5FF2AFE028E7C22400393216 /* BranchSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FF2AFDF28E7C22100393216 /* BranchSDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF2AFE128E7C22400393216 /* BranchSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FF2AFDF28E7C22100393216 /* BranchSDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF9DDFB28EE78A700D62DE1 /* BNCAppGroupsData.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210A32894A34000C5B190 /* BNCAppGroupsData.m */; }; @@ -357,10 +364,13 @@ 5FF9DE5028EE78A800D62DE1 /* Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210922894A34000C5B190 /* Branch.m */; }; 5FF9DE5228EE78A800D62DE1 /* Branch+Validator.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210962894A34000C5B190 /* Branch+Validator.m */; }; 5FF9DE5428EE78A800D62DE1 /* BranchActivityItemProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22109E2894A34000C5B190 /* BranchActivityItemProvider.m */; }; + 5FF9DE5628EE78A800D62DE1 /* BranchCloseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210502894A33F00C5B190 /* BranchCloseRequest.m */; }; 5FF9DE5828EE78A800D62DE1 /* BranchConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210362894A33E00C5B190 /* BranchConstants.m */; }; 5FF9DE5A28EE78A800D62DE1 /* BranchContentDiscoverer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210712894A33F00C5B190 /* BranchContentDiscoverer.m */; }; 5FF9DE5C28EE78A800D62DE1 /* BranchContentDiscoveryManifest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210892894A33F00C5B190 /* BranchContentDiscoveryManifest.m */; }; 5FF9DE5E28EE78A800D62DE1 /* BranchContentPathProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22109F2894A34000C5B190 /* BranchContentPathProperties.m */; }; + 5FF9DE6028EE78A800D62DE1 /* BranchCPIDRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210682894A33F00C5B190 /* BranchCPIDRequest.m */; }; + 5FF9DE6228EE78A800D62DE1 /* BranchCrossPlatformID.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210C12894A34000C5B190 /* BranchCrossPlatformID.m */; }; 5FF9DE6428EE78A800D62DE1 /* BranchCSSearchableItemAttributeSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22103A2894A33E00C5B190 /* BranchCSSearchableItemAttributeSet.m */; }; 5FF9DE6728EE78A800D62DE1 /* BranchDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22105D2894A33F00C5B190 /* BranchDelegate.m */; }; 5FF9DE6928EE78A800D62DE1 /* BranchEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210432894A33E00C5B190 /* BranchEvent.m */; }; @@ -372,6 +382,7 @@ 5FF9DE7728EE78A800D62DE1 /* BranchOpenRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210342894A33E00C5B190 /* BranchOpenRequest.m */; }; 5FF9DE7928EE78A800D62DE1 /* BranchPluginSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210772894A33F00C5B190 /* BranchPluginSupport.m */; }; 5FF9DE7B28EE78A800D62DE1 /* BranchQRCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22108A2894A33F00C5B190 /* BranchQRCode.m */; }; + 5FF9DE7D28EE78A800D62DE1 /* BranchRegisterViewRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210912894A34000C5B190 /* BranchRegisterViewRequest.m */; }; 5FF9DE7F28EE78A800D62DE1 /* BranchScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210572894A33F00C5B190 /* BranchScene.m */; }; 5FF9DE8328EE78A800D62DE1 /* BranchShareLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210C42894A34000C5B190 /* BranchShareLink.m */; }; 5FF9DE8528EE78A800D62DE1 /* BranchShortUrlRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210792894A33F00C5B190 /* BranchShortUrlRequest.m */; }; @@ -422,10 +433,13 @@ 5FF9DEC328EE797400D62DE1 /* Branch.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210B82894A34000C5B190 /* Branch.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF9DEC428EE797400D62DE1 /* Branch+Validator.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22107E2894A33F00C5B190 /* Branch+Validator.h */; }; 5FF9DEC528EE797400D62DE1 /* BranchActivityItemProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210BF2894A34000C5B190 /* BranchActivityItemProvider.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5FF9DEC628EE797400D62DE1 /* BranchCloseRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210752894A33F00C5B190 /* BranchCloseRequest.h */; }; 5FF9DEC728EE797400D62DE1 /* BranchConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210762894A33F00C5B190 /* BranchConstants.h */; }; 5FF9DEC828EE797400D62DE1 /* BranchContentDiscoverer.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210702894A33F00C5B190 /* BranchContentDiscoverer.h */; }; 5FF9DEC928EE797400D62DE1 /* BranchContentDiscoveryManifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210672894A33F00C5B190 /* BranchContentDiscoveryManifest.h */; }; 5FF9DECA28EE797400D62DE1 /* BranchContentPathProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210802894A33F00C5B190 /* BranchContentPathProperties.h */; }; + 5FF9DECB28EE797400D62DE1 /* BranchCPIDRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22102E2894A33E00C5B190 /* BranchCPIDRequest.h */; }; + 5FF9DECC28EE797400D62DE1 /* BranchCrossPlatformID.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22104A2894A33E00C5B190 /* BranchCrossPlatformID.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF9DECD28EE797400D62DE1 /* BranchCSSearchableItemAttributeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210442894A33E00C5B190 /* BranchCSSearchableItemAttributeSet.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF9DECE28EE797400D62DE1 /* BranchDeepLinkingController.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210AB2894A34000C5B190 /* BranchDeepLinkingController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF9DECF28EE797400D62DE1 /* BranchDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210692894A33F00C5B190 /* BranchDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -438,6 +452,7 @@ 5FF9DED728EE797400D62DE1 /* BranchOpenRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210512894A33F00C5B190 /* BranchOpenRequest.h */; }; 5FF9DED828EE797400D62DE1 /* BranchPluginSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210542894A33F00C5B190 /* BranchPluginSupport.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF9DED928EE797400D62DE1 /* BranchQRCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210982894A34000C5B190 /* BranchQRCode.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5FF9DEDA28EE797400D62DE1 /* BranchRegisterViewRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210522894A33F00C5B190 /* BranchRegisterViewRequest.h */; }; 5FF9DEDB28EE797400D62DE1 /* BranchScene.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210612894A33F00C5B190 /* BranchScene.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF9DEDD28EE797400D62DE1 /* BranchShareLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2210822894A33F00C5B190 /* BranchShareLink.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF9DEDE28EE797400D62DE1 /* BranchShortUrlRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F22106C2894A33F00C5B190 /* BranchShortUrlRequest.h */; }; @@ -482,9 +497,9 @@ E7653F052A9E737700C7C040 /* BNCServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = E7653F042A9E737700C7C040 /* BNCServerAPI.m */; }; E7653F062A9E737700C7C040 /* BNCServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = E7653F042A9E737700C7C040 /* BNCServerAPI.m */; }; E7653F072A9E737700C7C040 /* BNCServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = E7653F042A9E737700C7C040 /* BNCServerAPI.m */; }; - E7653F092A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; }; - E7653F0A2A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; }; - E7653F0B2A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; }; + E7653F092A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E7653F0A2A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E7653F0B2A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -535,6 +550,7 @@ 5F22102A2894A33E00C5B190 /* NSString+Branch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Branch.m"; sourceTree = ""; }; 5F22102B2894A33E00C5B190 /* BNCReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCReachability.h; sourceTree = ""; }; 5F22102C2894A33E00C5B190 /* BranchInstallRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchInstallRequest.m; sourceTree = ""; }; + 5F22102E2894A33E00C5B190 /* BranchCPIDRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchCPIDRequest.h; sourceTree = ""; }; 5F22102F2894A33E00C5B190 /* BNCDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCDeviceInfo.h; sourceTree = ""; }; 5F2210312894A33E00C5B190 /* BranchJsonConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchJsonConfig.m; sourceTree = ""; }; 5F2210322894A33E00C5B190 /* BNCSKAdNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCSKAdNetwork.h; sourceTree = ""; }; @@ -559,11 +575,14 @@ 5F2210462894A33E00C5B190 /* BNCDeviceSystem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCDeviceSystem.m; sourceTree = ""; }; 5F2210482894A33E00C5B190 /* BNCServerResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCServerResponse.m; sourceTree = ""; }; 5F2210492894A33E00C5B190 /* BranchInstallRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchInstallRequest.h; sourceTree = ""; }; + 5F22104A2894A33E00C5B190 /* BranchCrossPlatformID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchCrossPlatformID.h; sourceTree = ""; }; 5F22104C2894A33F00C5B190 /* BNCThreads.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCThreads.h; sourceTree = ""; }; 5F22104D2894A33F00C5B190 /* BNCNetworkService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCNetworkService.h; sourceTree = ""; }; 5F22104E2894A33F00C5B190 /* BNCLinkCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCLinkCache.m; sourceTree = ""; }; 5F22104F2894A33F00C5B190 /* BranchLinkProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchLinkProperties.h; sourceTree = ""; }; + 5F2210502894A33F00C5B190 /* BranchCloseRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchCloseRequest.m; sourceTree = ""; }; 5F2210512894A33F00C5B190 /* BranchOpenRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchOpenRequest.h; sourceTree = ""; }; + 5F2210522894A33F00C5B190 /* BranchRegisterViewRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchRegisterViewRequest.h; sourceTree = ""; }; 5F2210532894A33F00C5B190 /* BNCLinkData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCLinkData.h; sourceTree = ""; }; 5F2210542894A33F00C5B190 /* BranchPluginSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchPluginSupport.h; sourceTree = ""; }; 5F2210552894A33F00C5B190 /* BNCLinkCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCLinkCache.h; sourceTree = ""; }; @@ -582,6 +601,7 @@ 5F2210642894A33F00C5B190 /* BNCAppleReceipt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCAppleReceipt.m; sourceTree = ""; }; 5F2210662894A33F00C5B190 /* BNCServerResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCServerResponse.h; sourceTree = ""; }; 5F2210672894A33F00C5B190 /* BranchContentDiscoveryManifest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchContentDiscoveryManifest.h; sourceTree = ""; }; + 5F2210682894A33F00C5B190 /* BranchCPIDRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchCPIDRequest.m; sourceTree = ""; }; 5F2210692894A33F00C5B190 /* BranchDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchDelegate.h; sourceTree = ""; }; 5F22106C2894A33F00C5B190 /* BranchShortUrlRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchShortUrlRequest.h; sourceTree = ""; }; 5F22106D2894A33F00C5B190 /* BNCServerInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCServerInterface.m; sourceTree = ""; }; @@ -591,6 +611,7 @@ 5F2210722894A33F00C5B190 /* BNCLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCLog.m; sourceTree = ""; }; 5F2210732894A33F00C5B190 /* BNCContentDiscoveryManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCContentDiscoveryManager.h; sourceTree = ""; }; 5F2210742894A33F00C5B190 /* BNCInitSessionResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCInitSessionResponse.m; sourceTree = ""; }; + 5F2210752894A33F00C5B190 /* BranchCloseRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchCloseRequest.h; sourceTree = ""; }; 5F2210762894A33F00C5B190 /* BranchConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchConstants.h; sourceTree = ""; }; 5F2210772894A33F00C5B190 /* BranchPluginSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchPluginSupport.m; sourceTree = ""; }; 5F2210782894A33F00C5B190 /* BNCInitSessionResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCInitSessionResponse.h; sourceTree = ""; }; @@ -615,6 +636,7 @@ 5F22108E2894A34000C5B190 /* BNCJSONUtility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCJSONUtility.m; sourceTree = ""; }; 5F22108F2894A34000C5B190 /* BNCServerInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCServerInterface.h; sourceTree = ""; }; 5F2210902894A34000C5B190 /* BranchSpotlightUrlRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchSpotlightUrlRequest.h; sourceTree = ""; }; + 5F2210912894A34000C5B190 /* BranchRegisterViewRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchRegisterViewRequest.m; sourceTree = ""; }; 5F2210922894A34000C5B190 /* Branch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Branch.m; sourceTree = ""; }; 5F2210932894A34000C5B190 /* BNCKeyChain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCKeyChain.m; sourceTree = ""; }; 5F2210942894A34000C5B190 /* BranchUniversalObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchUniversalObject.m; sourceTree = ""; }; @@ -655,6 +677,7 @@ 5F2210BE2894A34000C5B190 /* BNCSpotlightService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCSpotlightService.h; sourceTree = ""; }; 5F2210BF2894A34000C5B190 /* BranchActivityItemProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchActivityItemProvider.h; sourceTree = ""; }; 5F2210C02894A34000C5B190 /* BNCPasteboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCPasteboard.m; sourceTree = ""; }; + 5F2210C12894A34000C5B190 /* BranchCrossPlatformID.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchCrossPlatformID.m; sourceTree = ""; }; 5F2210C32894A34000C5B190 /* BNCUserAgentCollector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCUserAgentCollector.m; sourceTree = ""; }; 5F2210C42894A34000C5B190 /* BranchShareLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchShareLink.m; sourceTree = ""; }; 5F22116F2894A9C000C5B190 /* TestHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestHost.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -670,8 +693,6 @@ 5F22118E2894A9C100C5B190 /* TestHostUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestHostUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 5F2211922894A9C100C5B190 /* TestHostUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestHostUITests.swift; sourceTree = ""; }; 5F2211942894A9C100C5B190 /* TestHostUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestHostUITestsLaunchTests.swift; sourceTree = ""; }; - 5F5139942AC21F6E004A3BA4 /* BNCRequestFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BNCRequestFactory.h; sourceTree = ""; }; - 5F5139952AC21F6E004A3BA4 /* BNCRequestFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BNCRequestFactory.m; sourceTree = ""; }; 5F6DD2492894AF5E00AE9FB0 /* TestHost-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TestHost-Bridging-Header.h"; sourceTree = ""; }; 5F6DD24A2894AF5E00AE9FB0 /* NSURLSession+Branch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURLSession+Branch.m"; sourceTree = ""; }; 5F6DD24B2894AF5E00AE9FB0 /* NSURLSession+Branch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURLSession+Branch.h"; sourceTree = ""; }; @@ -680,7 +701,6 @@ 5F73EC0128EDEAC200608601 /* build_static_xcframework.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_static_xcframework.sh; sourceTree = ""; }; 5F73EC0228EDEAC200608601 /* build_xcframework_noidfa.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_xcframework_noidfa.sh; sourceTree = ""; }; 5F79038C28B5765D003144CD /* BranchSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BranchSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 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 = ""; }; @@ -775,6 +795,12 @@ 5F22101F2894A0DB00C5B190 /* BranchSDK */ = { isa = PBXGroup; children = ( + E761E92029E61DA000E55C98 /* BNCEventUtils.h */, + E761E91F29E61DA000E55C98 /* BNCEventUtils.m */, + C1B63C7C29D2380000D1136D /* BNCReferringURLUtility.h */, + C1B63C7A29D2380000D1136D /* BNCReferringURLUtility.m */, + C1B63C7B29D2380000D1136D /* BNCUrlQueryParameter.h */, + C1B63C7929D2380000D1136D /* BNCUrlQueryParameter.m */, 5F2210882894A33F00C5B190 /* BNCAppGroupsData.h */, 5F2210A32894A34000C5B190 /* BNCAppGroupsData.m */, 5F22103B2894A33E00C5B190 /* BNCAppleReceipt.h */, @@ -800,8 +826,8 @@ 5F2210462894A33E00C5B190 /* BNCDeviceSystem.m */, 5F2210B22894A34000C5B190 /* BNCEncodingUtils.h */, 5F22108C2894A33F00C5B190 /* BNCEncodingUtils.m */, - E761E92029E61DA000E55C98 /* BNCEventUtils.h */, - E761E91F29E61DA000E55C98 /* BNCEventUtils.m */, + C1CDEF322A95718C0098524F /* BNCProductCategory.h */, + C1CDEF312A95718C0098524F /* BNCProductCategory.m */, 5F2210632894A33F00C5B190 /* BNCFieldDefines.h */, 5F2210782894A33F00C5B190 /* BNCInitSessionResponse.h */, 5F2210742894A33F00C5B190 /* BNCInitSessionResponse.m */, @@ -826,18 +852,10 @@ 5F2210C02894A34000C5B190 /* BNCPasteboard.m */, 5F2210402894A33E00C5B190 /* BNCPreferenceHelper.h */, 5F2210A12894A34000C5B190 /* BNCPreferenceHelper.m */, - C1CDEF322A95718C0098524F /* BNCProductCategory.h */, - C1CDEF312A95718C0098524F /* BNCProductCategory.m */, 5F22108B2894A33F00C5B190 /* BNCQRCodeCache.h */, 5F2210B72894A34000C5B190 /* BNCQRCodeCache.m */, 5F22102B2894A33E00C5B190 /* BNCReachability.h */, 5F22103C2894A33E00C5B190 /* BNCReachability.m */, - C1B63C7C29D2380000D1136D /* BNCReferringURLUtility.h */, - C1B63C7A29D2380000D1136D /* BNCReferringURLUtility.m */, - 5F5139942AC21F6E004A3BA4 /* BNCRequestFactory.h */, - 5F5139952AC21F6E004A3BA4 /* BNCRequestFactory.m */, - E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */, - E7653F042A9E737700C7C040 /* BNCServerAPI.m */, 5F22108F2894A34000C5B190 /* BNCServerInterface.h */, 5F22106D2894A33F00C5B190 /* BNCServerInterface.m */, 5F22109D2894A34000C5B190 /* BNCServerRequest.h */, @@ -856,8 +874,6 @@ 5F2210AD2894A34000C5B190 /* BNCThreads.m */, 5F2210A72894A34000C5B190 /* BNCURLFilter.h */, 5F2210292894A33E00C5B190 /* BNCURLFilter.m */, - C1B63C7B29D2380000D1136D /* BNCUrlQueryParameter.h */, - C1B63C7929D2380000D1136D /* BNCUrlQueryParameter.m */, 5F2210812894A33F00C5B190 /* BNCUserAgentCollector.h */, 5F2210C32894A34000C5B190 /* BNCUserAgentCollector.m */, 5F2210B82894A34000C5B190 /* Branch.h */, @@ -866,6 +882,8 @@ 5F2210962894A34000C5B190 /* Branch+Validator.m */, 5F2210BF2894A34000C5B190 /* BranchActivityItemProvider.h */, 5F22109E2894A34000C5B190 /* BranchActivityItemProvider.m */, + 5F2210752894A33F00C5B190 /* BranchCloseRequest.h */, + 5F2210502894A33F00C5B190 /* BranchCloseRequest.m */, 5F2210762894A33F00C5B190 /* BranchConstants.h */, 5F2210362894A33E00C5B190 /* BranchConstants.m */, 5F2210702894A33F00C5B190 /* BranchContentDiscoverer.h */, @@ -874,6 +892,10 @@ 5F2210892894A33F00C5B190 /* BranchContentDiscoveryManifest.m */, 5F2210802894A33F00C5B190 /* BranchContentPathProperties.h */, 5F22109F2894A34000C5B190 /* BranchContentPathProperties.m */, + 5F22102E2894A33E00C5B190 /* BranchCPIDRequest.h */, + 5F2210682894A33F00C5B190 /* BranchCPIDRequest.m */, + 5F22104A2894A33E00C5B190 /* BranchCrossPlatformID.h */, + 5F2210C12894A34000C5B190 /* BranchCrossPlatformID.m */, 5F2210442894A33E00C5B190 /* BranchCSSearchableItemAttributeSet.h */, 5F22103A2894A33E00C5B190 /* BranchCSSearchableItemAttributeSet.m */, 5F2210AB2894A34000C5B190 /* BranchDeepLinkingController.h */, @@ -895,10 +917,14 @@ 5F2210342894A33E00C5B190 /* BranchOpenRequest.m */, 5F1B240729148CBD003BEEC7 /* BranchPasteControl.h */, 5F1B240829148CBD003BEEC7 /* BranchPasteControl.m */, + E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */, + E7653F042A9E737700C7C040 /* BNCServerAPI.m */, 5F2210542894A33F00C5B190 /* BranchPluginSupport.h */, 5F2210772894A33F00C5B190 /* BranchPluginSupport.m */, 5F2210982894A34000C5B190 /* BranchQRCode.h */, 5F22108A2894A33F00C5B190 /* BranchQRCode.m */, + 5F2210522894A33F00C5B190 /* BranchRegisterViewRequest.h */, + 5F2210912894A34000C5B190 /* BranchRegisterViewRequest.m */, 5F2210612894A33F00C5B190 /* BranchScene.h */, 5F2210572894A33F00C5B190 /* BranchScene.m */, 5F2210822894A33F00C5B190 /* BranchShareLink.h */, @@ -973,7 +999,6 @@ children = ( 5FF2AFDF28E7C22100393216 /* BranchSDK.h */, 5FF2AFDE28E7C22100393216 /* module.modulemap */, - 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */, ); path = Framework; sourceTree = ""; @@ -999,6 +1024,7 @@ 5F2211042894A34000C5B190 /* BNCServerResponse.h in Headers */, 5F2211562894A34000C5B190 /* Branch.h in Headers */, 5F22115D2894A34000C5B190 /* BranchActivityItemProvider.h in Headers */, + 5F2210E82894A34000C5B190 /* BranchCrossPlatformID.h in Headers */, 5F2210E22894A34000C5B190 /* BranchCSSearchableItemAttributeSet.h in Headers */, 5F2211492894A34000C5B190 /* BranchDeepLinkingController.h in Headers */, 5F2211072894A34000C5B190 /* BranchDelegate.h in Headers */, @@ -1020,10 +1046,12 @@ 5F2211372894A34000C5B190 /* NSMutableDictionary+Branch.h in Headers */, 5F2210C52894A34000C5B190 /* BranchShortUrlSyncRequest.h in Headers */, 5F22111D2894A34000C5B190 /* BNCPartnerParameters.h in Headers */, + 5F2210CC2894A34000C5B190 /* BranchCPIDRequest.h in Headers */, 5F2211452894A34000C5B190 /* BNCURLFilter.h in Headers */, 5F2211142894A34000C5B190 /* BranchConstants.h in Headers */, 5F22110E2894A34000C5B190 /* BranchContentDiscoverer.h in Headers */, 5F2211052894A34000C5B190 /* BranchContentDiscoveryManifest.h in Headers */, + 5F2211132894A34000C5B190 /* BranchCloseRequest.h in Headers */, 5F2211482894A34000C5B190 /* BNCNetworkInterface.h in Headers */, 5F2210D02894A34000C5B190 /* BNCSKAdNetwork.h in Headers */, 5F22110C2894A34000C5B190 /* BNCCrashlyticsWrapper.h in Headers */, @@ -1042,7 +1070,7 @@ 5F2211112894A34000C5B190 /* BNCContentDiscoveryManager.h in Headers */, 5F2211012894A34000C5B190 /* BNCFieldDefines.h in Headers */, 5F2210F42894A34000C5B190 /* BNCCallbackMap.h in Headers */, - 5F5139962AC21F6E004A3BA4 /* BNCRequestFactory.h in Headers */, + 5F2210F02894A34000C5B190 /* BranchRegisterViewRequest.h in Headers */, 5F2210C92894A34000C5B190 /* BNCReachability.h in Headers */, 5F22111E2894A34000C5B190 /* BranchContentPathProperties.h in Headers */, 5F22115A2894A34000C5B190 /* NSError+Branch.h in Headers */, @@ -1112,11 +1140,14 @@ 5FF9DEC328EE797400D62DE1 /* Branch.h in Headers */, 5FF9DEC428EE797400D62DE1 /* Branch+Validator.h in Headers */, 5FF9DEC528EE797400D62DE1 /* BranchActivityItemProvider.h in Headers */, + 5FF9DEC628EE797400D62DE1 /* BranchCloseRequest.h in Headers */, 5FF9DEC728EE797400D62DE1 /* BranchConstants.h in Headers */, 5FF9DEC828EE797400D62DE1 /* BranchContentDiscoverer.h in Headers */, 5FF9DEC928EE797400D62DE1 /* BranchContentDiscoveryManifest.h in Headers */, C1BE797E2A9E704600E15EDF /* BNCCurrency.h in Headers */, 5FF9DECA28EE797400D62DE1 /* BranchContentPathProperties.h in Headers */, + 5FF9DECB28EE797400D62DE1 /* BranchCPIDRequest.h in Headers */, + 5FF9DECC28EE797400D62DE1 /* BranchCrossPlatformID.h in Headers */, 5FF9DECD28EE797400D62DE1 /* BranchCSSearchableItemAttributeSet.h in Headers */, 5FF9DECE28EE797400D62DE1 /* BranchDeepLinkingController.h in Headers */, 5FF9DECF28EE797400D62DE1 /* BranchDelegate.h in Headers */, @@ -1124,12 +1155,12 @@ 5FF9DED128EE797400D62DE1 /* BranchInstallRequest.h in Headers */, 5FF9DED228EE797400D62DE1 /* BranchJsonConfig.h in Headers */, 5FF9DED328EE797400D62DE1 /* BranchLastAttributedTouchData.h in Headers */, - 5F5139972AC21F6E004A3BA4 /* BNCRequestFactory.h in Headers */, 5FF9DED428EE797400D62DE1 /* BranchLATDRequest.h in Headers */, 5FF9DED528EE797400D62DE1 /* BranchLinkProperties.h in Headers */, 5FF9DED728EE797400D62DE1 /* BranchOpenRequest.h in Headers */, 5FF9DED828EE797400D62DE1 /* BranchPluginSupport.h in Headers */, 5FF9DED928EE797400D62DE1 /* BranchQRCode.h in Headers */, + 5FF9DEDA28EE797400D62DE1 /* BranchRegisterViewRequest.h in Headers */, 5FF9DEDB28EE797400D62DE1 /* BranchScene.h in Headers */, 5FF9DEE728EE7A7F00D62DE1 /* BranchSDK.h in Headers */, 5FF9DEDD28EE797400D62DE1 /* BranchShareLink.h in Headers */, @@ -1159,6 +1190,7 @@ 5F7903CC28B59147003144CD /* BranchDeepLinkingController.h in Headers */, 5F7903CD28B59147003144CD /* BranchDelegate.h in Headers */, C1BE797F2A9E704700E15EDF /* BNCCurrency.h in Headers */, + 5F7903CA28B59147003144CD /* BranchCrossPlatformID.h in Headers */, 5F7903C128B59147003144CD /* Branch.h in Headers */, 5F7903B828B59147003144CD /* BNCServerResponse.h in Headers */, 5F7903B728B59147003144CD /* BNCServerRequestQueue.h in Headers */, @@ -1194,18 +1226,20 @@ 5F7903B128B59146003144CD /* BNCPasteboard.h in Headers */, 5F7903B328B59146003144CD /* BNCQRCodeCache.h in Headers */, 5F7903B428B59147003144CD /* BNCReachability.h in Headers */, - 5F5139982AC21F6E004A3BA4 /* BNCRequestFactory.h in Headers */, 5F7903B928B59147003144CD /* BNCSKAdNetwork.h in Headers */, 5F7903BB28B59147003144CD /* BNCSystemObserver.h in Headers */, 5F7903BD28B59147003144CD /* BNCThreads.h in Headers */, 5F7903BF28B59147003144CD /* BNCURLFilter.h in Headers */, C1BE79832A9E708900E15EDF /* BNCProductCategory.h in Headers */, 5F7903C228B59147003144CD /* Branch+Validator.h in Headers */, + 5F7903C428B59147003144CD /* BranchCloseRequest.h in Headers */, 5F7903C528B59147003144CD /* BranchConstants.h in Headers */, + 5F7903C928B59147003144CD /* BranchCPIDRequest.h in Headers */, 5F7903CF28B59147003144CD /* BranchInstallRequest.h in Headers */, 5F7903D028B59147003144CD /* BranchJsonConfig.h in Headers */, 5F7903D228B59148003144CD /* BranchLATDRequest.h in Headers */, 5F7903D528B59148003144CD /* BranchOpenRequest.h in Headers */, + 5F7903D828B59148003144CD /* BranchRegisterViewRequest.h in Headers */, 5F7903DC28B59148003144CD /* BranchShortUrlRequest.h in Headers */, 5F7903DD28B59148003144CD /* BranchShortUrlSyncRequest.h in Headers */, 5F7903DE28B59148003144CD /* BranchSpotlightUrlRequest.h in Headers */, @@ -1406,7 +1440,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5FC446652ACCB97000FF1C87 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1438,7 +1471,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5FC446662ACCB97100FF1C87 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1446,7 +1478,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5FC446672ACCB97200FF1C87 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1548,7 +1579,6 @@ 5F2210DC2894A34000C5B190 /* BNCSpotlightService.m in Sources */, 5F2210CF2894A34000C5B190 /* BranchJsonConfig.m in Sources */, 5F2210F52894A34000C5B190 /* BranchScene.m in Sources */, - 5F5139992AC21F6E004A3BA4 /* BNCRequestFactory.m in Sources */, 5F22112A2894A34000C5B190 /* BNCEncodingUtils.m in Sources */, 5F22112C2894A34000C5B190 /* BNCJSONUtility.m in Sources */, 5F2210D52894A34000C5B190 /* BNCDeepLinkViewControllerInstance.m in Sources */, @@ -1560,11 +1590,13 @@ 5F1B240B29148CBD003BEEC7 /* BranchPasteControl.m in Sources */, 5F2211382894A34000C5B190 /* BNCCrashlyticsWrapper.m in Sources */, 5F22110B2894A34000C5B190 /* BNCServerInterface.m in Sources */, + 5F2211062894A34000C5B190 /* BranchCPIDRequest.m in Sources */, 5F2210E62894A34000C5B190 /* BNCServerResponse.m in Sources */, 5F22114C2894A34000C5B190 /* NSError+Branch.m in Sources */, 5F2210DA2894A34000C5B190 /* BNCReachability.m in Sources */, 5F2211622894A34100C5B190 /* BranchShareLink.m in Sources */, 5F2210E02894A34000C5B190 /* BranchLATDRequest.m in Sources */, + 5F2210EE2894A34000C5B190 /* BranchCloseRequest.m in Sources */, 5F2210EC2894A34000C5B190 /* BNCLinkCache.m in Sources */, 5F2210CA2894A34000C5B190 /* BranchInstallRequest.m in Sources */, 5F2211302894A34000C5B190 /* Branch.m in Sources */, @@ -1581,6 +1613,7 @@ 5F2211392894A34000C5B190 /* BNCApplication.m in Sources */, 5F22113D2894A34000C5B190 /* BranchContentPathProperties.m in Sources */, 5F2211172894A34000C5B190 /* BranchShortUrlRequest.m in Sources */, + 5F22112F2894A34000C5B190 /* BranchRegisterViewRequest.m in Sources */, 5F2211522894A34000C5B190 /* BNCPartnerParameters.m in Sources */, 5F2211312894A34000C5B190 /* BNCKeyChain.m in Sources */, C1CDEF332A95718C0098524F /* BNCProductCategory.m in Sources */, @@ -1597,6 +1630,7 @@ 5F2210E12894A34000C5B190 /* BranchEvent.m in Sources */, 5F22114B2894A34000C5B190 /* BNCThreads.m in Sources */, 5F2211342894A34000C5B190 /* Branch+Validator.m in Sources */, + 5F22115F2894A34000C5B190 /* BranchCrossPlatformID.m in Sources */, 5F22112B2894A34000C5B190 /* BranchLinkProperties.m in Sources */, 5F2210D42894A34000C5B190 /* BranchConstants.m in Sources */, 5F2211612894A34000C5B190 /* BNCUserAgentCollector.m in Sources */, @@ -1653,7 +1687,6 @@ 5FF9DE1628EE78A700D62DE1 /* BNCEncodingUtils.m in Sources */, 5FF9DE1B28EE78A700D62DE1 /* BNCInitSessionResponse.m in Sources */, 5FF9DE1D28EE78A700D62DE1 /* BNCJSONUtility.m in Sources */, - 5F51399A2AC21F6E004A3BA4 /* BNCRequestFactory.m in Sources */, 5FF9DE1F28EE78A700D62DE1 /* BNCKeyChain.m in Sources */, 5FF9DE2128EE78A700D62DE1 /* BNCLinkCache.m in Sources */, 5FF9DE2328EE78A700D62DE1 /* BNCLinkData.m in Sources */, @@ -1680,10 +1713,13 @@ 5FF9DE5028EE78A800D62DE1 /* Branch.m in Sources */, 5FF9DE5228EE78A800D62DE1 /* Branch+Validator.m in Sources */, 5FF9DE5428EE78A800D62DE1 /* BranchActivityItemProvider.m in Sources */, + 5FF9DE5628EE78A800D62DE1 /* BranchCloseRequest.m in Sources */, 5FF9DE5828EE78A800D62DE1 /* BranchConstants.m in Sources */, 5FF9DE5A28EE78A800D62DE1 /* BranchContentDiscoverer.m in Sources */, 5FF9DE5C28EE78A800D62DE1 /* BranchContentDiscoveryManifest.m in Sources */, 5FF9DE5E28EE78A800D62DE1 /* BranchContentPathProperties.m in Sources */, + 5FF9DE6028EE78A800D62DE1 /* BranchCPIDRequest.m in Sources */, + 5FF9DE6228EE78A800D62DE1 /* BranchCrossPlatformID.m in Sources */, C1BE79842A9E708F00E15EDF /* BNCProductCategory.m in Sources */, 5FF9DE6428EE78A800D62DE1 /* BranchCSSearchableItemAttributeSet.m in Sources */, 5FF9DE6728EE78A800D62DE1 /* BranchDelegate.m in Sources */, @@ -1697,6 +1733,7 @@ 5FF9DE7728EE78A800D62DE1 /* BranchOpenRequest.m in Sources */, 5FF9DE7928EE78A800D62DE1 /* BranchPluginSupport.m in Sources */, 5FF9DE7B28EE78A800D62DE1 /* BranchQRCode.m in Sources */, + 5FF9DE7D28EE78A800D62DE1 /* BranchRegisterViewRequest.m in Sources */, 5FF9DE7F28EE78A800D62DE1 /* BranchScene.m in Sources */, 5FF9DE8328EE78A800D62DE1 /* BranchShareLink.m in Sources */, 5FF9DE8528EE78A800D62DE1 /* BranchShortUrlRequest.m in Sources */, @@ -1746,8 +1783,10 @@ 5F79040D28B5C93E003144CD /* BNCURLFilter.m in Sources */, 5F79040F28B5C93E003144CD /* Branch.m in Sources */, 5F79041028B5C93E003144CD /* Branch+Validator.m in Sources */, + 5F79041228B5C93E003144CD /* BranchCloseRequest.m in Sources */, 5F79041328B5C93E003144CD /* BranchConstants.m in Sources */, - 5F51399B2AC21F6E004A3BA4 /* BNCRequestFactory.m in Sources */, + 5F79041728B5C93E003144CD /* BranchCPIDRequest.m in Sources */, + 5F79041828B5C93E003144CD /* BranchCrossPlatformID.m in Sources */, 5F79041A28B5C93E003144CD /* BranchDelegate.m in Sources */, 5F79041B28B5C93E003144CD /* BranchEvent.m in Sources */, 5F79041C28B5C93E003144CD /* BranchInstallRequest.m in Sources */, @@ -1758,6 +1797,7 @@ 5F79042228B5C93F003144CD /* BranchOpenRequest.m in Sources */, 5F79042328B5C93F003144CD /* BranchPluginSupport.m in Sources */, 5F79042428B5C93F003144CD /* BranchQRCode.m in Sources */, + 5F79042528B5C93F003144CD /* BranchRegisterViewRequest.m in Sources */, 5F79042628B5C93F003144CD /* BranchScene.m in Sources */, 5F79042928B5C93F003144CD /* BranchShortUrlRequest.m in Sources */, 5F79042A28B5C93F003144CD /* BranchShortUrlSyncRequest.m in Sources */, @@ -1947,13 +1987,13 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1978,13 +2018,13 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2000,7 +2040,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -2010,7 +2050,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -2179,14 +2219,14 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_MODULE_NAME = BranchSDK; PRODUCT_NAME = BranchSDK; @@ -2214,14 +2254,14 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_MODULE_NAME = BranchSDK; PRODUCT_NAME = BranchSDK; @@ -2248,13 +2288,12 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_NAME = BranchSDK; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2262,7 +2301,7 @@ SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 12.0; + TVOS_DEPLOYMENT_TARGET = 11.0; }; name = Debug; }; @@ -2279,13 +2318,12 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 2.2.1; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_NAME = BranchSDK; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2293,7 +2331,7 @@ SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 12.0; + TVOS_DEPLOYMENT_TARGET = 11.0; }; name = Release; }; @@ -2302,7 +2340,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -2312,7 +2350,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -2322,7 +2360,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -2332,7 +2370,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -2342,7 +2380,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -2352,7 +2390,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; diff --git a/BranchSDK/BNCConfig.h b/BranchSDK/BNCConfig.h index b7eabea85..f0273d658 100644 --- a/BranchSDK/BNCConfig.h +++ b/BranchSDK/BNCConfig.h @@ -13,11 +13,14 @@ #endif -FOUNDATION_EXPORT NSString * _Nonnull const BNC_SDK_VERSION; -FOUNDATION_EXPORT NSString * _Nonnull const BNC_LINK_URL; -FOUNDATION_EXPORT NSString * _Nonnull const BNC_CDN_URL; +FOUNDATION_EXPORT NSString*_Nonnull const BNC_SDK_VERSION; +FOUNDATION_EXPORT NSString*_Nonnull const BNC_API_BASE_URL; +FOUNDATION_EXPORT NSString*_Nonnull const BNC_API_VERSION; +FOUNDATION_EXPORT NSString*_Nonnull const BNC_LINK_URL; +FOUNDATION_EXPORT NSString* _Nonnull const BNC_CDN_URL; -FOUNDATION_EXPORT NSString * _Nonnull const BNC_API_URL; -FOUNDATION_EXPORT NSString * _Nonnull const BNC_SAFETRACK_API_URL; -FOUNDATION_EXPORT NSString * _Nonnull const BNC_EU_API_URL; -FOUNDATION_EXPORT NSString * _Nonnull const BNC_SAFETRACK_EU_API_URL; +FOUNDATION_EXPORT NSString* _Nonnull const BNC_API_URL; +FOUNDATION_EXPORT NSString* _Nonnull const BNC_SAFETRACK_API_URL; +FOUNDATION_EXPORT NSString* _Nonnull const BNC_EU_API_URL; +FOUNDATION_EXPORT NSString* _Nonnull const BNC_SAFETRACK_EU_API_URL; +FOUNDATION_EXPORT NSString* _Nonnull const BNC_API_VERSION_3; diff --git a/BranchSDK/BNCConfig.m b/BranchSDK/BNCConfig.m index ba11b7d30..4c53fb623 100644 --- a/BranchSDK/BNCConfig.m +++ b/BranchSDK/BNCConfig.m @@ -8,11 +8,15 @@ #include "BNCConfig.h" -NSString * const BNC_SDK_VERSION = @"3.0.0"; -NSString * const BNC_LINK_URL = @"https://bnc.lt"; -NSString * const BNC_CDN_URL = @"https://cdn.branch.io"; +NSString * const BNC_API_BASE_URL = @"https://api2.branch.io"; +NSString * const BNC_API_VERSION = @"v1"; +NSString * const BNC_LINK_URL = @"https://bnc.lt"; +NSString * const BNC_SDK_VERSION = @"2.2.1"; +NSString * const BNC_CDN_URL = @"https://cdn.branch.io"; -NSString * const BNC_API_URL = @"https://api3.branch.io"; -NSString * const BNC_SAFETRACK_API_URL = @"https://api-safetrack.branch.io"; -NSString * const BNC_EU_API_URL = @"https://api3-eu.branch.io"; -NSString * const BNC_SAFETRACK_EU_API_URL = @"https://api-safetrack-eu.branch.io"; +NSString* const BNC_API_URL = @"https://api3.branch.io"; +NSString* const BNC_SAFETRACK_API_URL = @"https://api-safetrack.branch.io"; +NSString* const BNC_EU_API_URL = @"https://api3-eu.branch.io"; +NSString* const BNC_SAFETRACK_EU_API_URL = @"https://api-safetrack-eu.branch.io"; + +NSString* const BNC_API_VERSION_3 = @"v3"; diff --git a/BranchSDK/BNCDeviceInfo.h b/BranchSDK/BNCDeviceInfo.h index c7a1dd238..4b9fb4662 100644 --- a/BranchSDK/BNCDeviceInfo.h +++ b/BranchSDK/BNCDeviceInfo.h @@ -20,6 +20,8 @@ - (void)registerPluginName:(NSString *)name version:(NSString *)version; +- (NSDictionary *) v2dictionary; + /* Thread safety is the callee's responsibility! @@ -37,6 +39,7 @@ @property (nonatomic, copy, readwrite) NSString *vendorId; @property (nonatomic, copy, readwrite) NSString *optedInStatus; @property (nonatomic, assign, readwrite) BOOL isFirstOptIn; +@property (nonatomic, assign, readwrite) BOOL isAdTrackingEnabled; - (NSString *)localIPAddress; - (NSString *)connectionType; diff --git a/BranchSDK/BNCDeviceInfo.m b/BranchSDK/BNCDeviceInfo.m index abd311e3a..0ff6b3897 100644 --- a/BranchSDK/BNCDeviceInfo.m +++ b/BranchSDK/BNCDeviceInfo.m @@ -127,6 +127,7 @@ - (void)checkAdvertisingIdentifier { self.isFirstOptIn = NO; } + self.isAdTrackingEnabled = [BNCSystemObserver adTrackingEnabled]; self.advertiserId = [BNCSystemObserver advertiserIdentifier]; BOOL ignoreIdfa = [BNCPreferenceHelper sharedInstance].isDebug; @@ -147,4 +148,62 @@ - (void)checkAdvertisingIdentifier { } } +- (NSDictionary *)v2dictionary { + NSMutableDictionary *dictionary = [NSMutableDictionary new]; + @synchronized (self) { + [self checkAdvertisingIdentifier]; + + BOOL disableAdNetworkCallouts = [BNCPreferenceHelper sharedInstance].disableAdNetworkCallouts; + if (disableAdNetworkCallouts) { + dictionary[@"disable_ad_network_callouts"] = [NSNumber numberWithBool:disableAdNetworkCallouts]; + } + + if ([BNCPreferenceHelper sharedInstance].isDebug) { + dictionary[@"unidentified_device"] = @(YES); + } else { + [dictionary bnc_safeSetObject:self.vendorId forKey:@"idfv"]; + [dictionary bnc_safeSetObject:self.advertiserId forKey:@"idfa"]; + } + [dictionary bnc_safeSetObject:[self anonId] forKey:@"anon_id"]; + [dictionary bnc_safeSetObject:[self localIPAddress] forKey:@"local_ip"]; + + [dictionary bnc_safeSetObject:[self optedInStatus] forKey:@"opted_in_status"]; + if (!self.isAdTrackingEnabled) { + dictionary[@"limit_ad_tracking"] = @(YES); + } + + if ([BNCPreferenceHelper sharedInstance].limitFacebookTracking) { + dictionary[@"limit_facebook_tracking"] = @(YES); + } + [dictionary bnc_safeSetObject:self.brandName forKey:@"brand"]; + [dictionary bnc_safeSetObject:self.modelName forKey:@"model"]; + [dictionary bnc_safeSetObject:self.osName forKey:@"os"]; + [dictionary bnc_safeSetObject:self.osVersion forKey:@"os_version"]; + [dictionary bnc_safeSetObject:self.osBuildVersion forKey:@"build"]; + [dictionary bnc_safeSetObject:self.environment forKey:@"environment"]; + [dictionary bnc_safeSetObject:self.cpuType forKey:@"cpu_type"]; + [dictionary bnc_safeSetObject:self.screenScale forKey:@"screen_dpi"]; + [dictionary bnc_safeSetObject:self.screenHeight forKey:@"screen_height"]; + [dictionary bnc_safeSetObject:self.screenWidth forKey:@"screen_width"]; + [dictionary bnc_safeSetObject:self.locale forKey:@"locale"]; + [dictionary bnc_safeSetObject:self.country forKey:@"country"]; + [dictionary bnc_safeSetObject:self.language forKey:@"language"]; + [dictionary bnc_safeSetObject:[self connectionType] forKey:@"connection_type"]; + [dictionary bnc_safeSetObject:[self userAgentString] forKey:@"user_agent"]; + + [dictionary bnc_safeSetObject:[BNCPreferenceHelper sharedInstance].userIdentity forKey:@"developer_identity"]; + + [dictionary bnc_safeSetObject:[BNCPreferenceHelper sharedInstance].randomizedDeviceToken forKey:@"randomized_device_token"]; + + [dictionary bnc_safeSetObject:self.applicationVersion forKey:@"app_version"]; + + [dictionary bnc_safeSetObject:self.pluginName forKey:@"plugin_name"]; + [dictionary bnc_safeSetObject:self.pluginVersion forKey:@"plugin_version"]; + dictionary[@"sdk_version"] = BNC_SDK_VERSION; + dictionary[@"sdk"] = @"ios"; + } + + return dictionary; +} + @end diff --git a/BranchSDK/BNCNetworkInterface.m b/BranchSDK/BNCNetworkInterface.m index 7f384660c..ea004512d 100644 --- a/BranchSDK/BNCNetworkInterface.m +++ b/BranchSDK/BNCNetworkInterface.m @@ -65,6 +65,9 @@ - (NSString*) description { continue; } + // TODO: Check ifdata too. + // struct if_data *ifdata = interface->ifa_data; + const struct sockaddr_in *addr = (const struct sockaddr_in*)interface->ifa_addr; if (!addr) continue; diff --git a/BranchSDK/BNCPreferenceHelper.h b/BranchSDK/BNCPreferenceHelper.h index 8f771db42..03d7c3c7a 100644 --- a/BranchSDK/BNCPreferenceHelper.h +++ b/BranchSDK/BNCPreferenceHelper.h @@ -61,6 +61,8 @@ NSURL* /* _Nonnull */ BNCURLForBranchDirectory(void); @property (assign, nonatomic) NSInteger savedURLPatternListVersion; @property (assign, nonatomic) BOOL dropURLOpen; +@property (assign, nonatomic) BOOL sendCloseRequests; + @property (assign, nonatomic) BOOL trackingDisabled; @property (copy, nonatomic) NSString *referrerGBRAID; @@ -73,12 +75,18 @@ NSURL* /* _Nonnull */ BNCURLForBranchDirectory(void); @property (strong, nonatomic) NSDate *firstAppLaunchTime; @property (assign, nonatomic) BOOL invokeRegisterApp; +@property (assign, nonatomic) BOOL useEUServers; + - (void) clearTrackingInformation; + (BNCPreferenceHelper *)sharedInstance; -- (void)setBranchAPIURL:(NSString*)branchAPIURL; -- (void)setPatternListURL:(NSString*)cdnURL; +- (NSString *)getAPIBaseURL; +- (NSString *)getAPIURL:(NSString *)endpoint; +- (NSString *)getEndpointFromURL:(NSString *)url; + +- (void) setBranchAPIURL:(NSString*)branchAPIURL; +- (void) setPatternListURL:(NSString*)cdnURL; - (void)setRequestMetadataKey:(NSString *)key value:(NSObject *)value; - (NSMutableDictionary *)requestMetadataDictionary; diff --git a/BranchSDK/BNCPreferenceHelper.m b/BranchSDK/BNCPreferenceHelper.m index f67a01b02..0573f03a5 100644 --- a/BranchSDK/BNCPreferenceHelper.m +++ b/BranchSDK/BNCPreferenceHelper.m @@ -111,7 +111,8 @@ @implementation BNCPreferenceHelper highestConversionValueSent = _highestConversionValueSent, referringURLQueryParameters = _referringURLQueryParameters, anonID = _anonID, - patternListURL = _patternListURL; + patternListURL = _patternListURL, + useEUServers = _useEUServers; + (BNCPreferenceHelper *)sharedInstance { static BNCPreferenceHelper *preferenceHelper; @@ -149,48 +150,61 @@ - (void) dealloc { #pragma mark - API methods -- (void)setBranchAPIURL:(NSString*)branchAPIURL_ { +- (void) setBranchAPIURL:(NSString*)branchAPIURL_ { @synchronized (self) { _branchAPIURL = [branchAPIURL_ copy]; [self writeObjectToDefaults:BRANCH_PREFS_KEY_API_URL value:_branchAPIURL]; } } -// TODO: This method is not used with the Tracking domain change. See SDK-2118 -- (NSString *)branchAPIURL { +- (NSString*) branchAPIURL { @synchronized (self) { if (!_branchAPIURL) { _branchAPIURL = [self readStringFromDefaults:BRANCH_PREFS_KEY_API_URL]; } - - // return the default URL in the event there's nothing in storage if (_branchAPIURL == nil || [_branchAPIURL isEqualToString:@""]) { - _branchAPIURL = [BNC_API_URL copy]; + _branchAPIURL = [BNC_API_BASE_URL copy]; [self writeObjectToDefaults:BRANCH_PREFS_KEY_API_URL value:_branchAPIURL]; } - return _branchAPIURL; } } -- (void)setPatternListURL:(NSString*)url { +- (NSString *)getAPIBaseURL { + @synchronized (self) { + return [NSString stringWithFormat:@"%@/%@/", self.branchAPIURL, BNC_API_VERSION]; + } +} + +- (NSString *)getAPIURL:(NSString *) endpoint { + return [[self getAPIBaseURL] stringByAppendingString:endpoint]; +} + +- (NSString *)getEndpointFromURL:(NSString *)url { + NSString *APIBase = self.branchAPIURL; + if ([url hasPrefix:APIBase]) { + NSUInteger index = APIBase.length; + return [url substringFromIndex:index]; + } + return @""; +} + +- (void) setPatternListURL:(NSString*)url { @synchronized (self) { _patternListURL = url; [self writeObjectToDefaults:BRANCH_PREFS_KEY_PATTERN_LIST_URL value:url]; } } -- (NSString *)patternListURL { +- (NSString*) patternListURL { @synchronized (self) { if (!_patternListURL) { _patternListURL = [self readStringFromDefaults:BRANCH_PREFS_KEY_PATTERN_LIST_URL]; } - - // When no custom URL is found, return the default if (_patternListURL == nil || [_patternListURL isEqualToString:@""]) { _patternListURL = BNC_CDN_URL; + [self writeObjectToDefaults:BRANCH_PREFS_KEY_PATTERN_LIST_URL value:_patternListURL]; } - return _patternListURL; } } @@ -384,7 +398,6 @@ - (NSString *)initialReferrer { - (void)setInitialReferrer:(NSString *)initialReferrer { [self writeObjectToDefaults:BRANCH_REQUEST_KEY_INITIAL_REFERRER value:initialReferrer]; } - - (NSString *)sessionParams { @synchronized (self) { if (!_sessionParams) { @@ -650,6 +663,22 @@ - (void) setTrackingDisabled:(BOOL)disabled { } } +- (BOOL)sendCloseRequests { + @synchronized(self) { + NSNumber *b = (id) [self readObjectFromDefaults:@"sendCloseRequests"]; + if ([b isKindOfClass:NSNumber.class]) return [b boolValue]; + + // by default, we do not send close events + return NO; + } +} + +- (void)setSendCloseRequests:(BOOL)disabled { + @synchronized(self) { + [self writeObjectToDefaults:@"sendCloseRequests" value:@(disabled)]; + } +} + - (void)setReferringURLQueryParameters:(NSMutableDictionary *)parameters { @synchronized(self) { _referringURLQueryParameters = parameters; @@ -776,6 +805,23 @@ - (void) setInvokeRegisterApp:(BOOL)invoke { } } +- (BOOL) useEUServers { + @synchronized(self) { + NSNumber *b = (id) [self readObjectFromDefaults:BRANCH_PREFS_KEY_USE_EU_SERVERS]; + if ([b isKindOfClass:NSNumber.class]) + return [b boolValue]; + return false; + } +} + +- (void)setUseEUServers:(BOOL)useEUServers { + @synchronized(self) { + NSNumber *b = [NSNumber numberWithBool:useEUServers]; + [self writeObjectToDefaults:BRANCH_PREFS_KEY_USE_EU_SERVERS value:b]; + + } +} + - (void) clearTrackingInformation { @synchronized(self) { /* diff --git a/BranchSDK/BNCServerAPI.h b/BranchSDK/BNCServerAPI.h index 6fc218e65..992026fcb 100644 --- a/BranchSDK/BNCServerAPI.h +++ b/BranchSDK/BNCServerAPI.h @@ -17,22 +17,22 @@ NS_ASSUME_NONNULL_BEGIN + (BNCServerAPI *)sharedInstance; -- (NSString *)installServiceURL; -- (NSString *)openServiceURL; -- (NSString *)standardEventServiceURL; -- (NSString *)customEventServiceURL; -- (NSString *)linkServiceURL; -- (NSString *)qrcodeServiceURL; -- (NSString *)latdServiceURL; -- (NSString *)validationServiceURL; - -@property (nonatomic, assign, readwrite) BOOL useTrackingDomain; -@property (nonatomic, assign, readwrite) BOOL useEUServers; - -// Enable tracking domains based on IDFA authorization. YES by default -// Used to enable unit tests without regard for ATT authorization status -@property (nonatomic, assign, readwrite) BOOL automaticallyEnableTrackingDomain; +// retrieves appropriate service URL +- (NSURL *)installServiceURL; +- (NSURL *)openServiceURL; +- (NSURL *)eventServiceURL; +- (NSURL *)linkServiceURL; +// initially set when IDFA is allowed +- (BOOL)useTrackingDomain; + +// TODO : Add a config or public API to expose this to clients +// Enable/Disable EU domains +- (void)setUseEUServers:(BOOL)useEUServers; + +- (BOOL)useEUServers; + +- (NSString *) getBaseURLWithVersion; @end NS_ASSUME_NONNULL_END diff --git a/BranchSDK/BNCServerAPI.m b/BranchSDK/BNCServerAPI.m index 2e9bc5c2a..917cafa3d 100644 --- a/BranchSDK/BNCServerAPI.m +++ b/BranchSDK/BNCServerAPI.m @@ -6,6 +6,7 @@ // #import "BNCServerAPI.h" +#import "BNCPreferenceHelper.h" #import "BNCSystemObserver.h" #import "BNCConfig.h" #import "BranchConstants.h" @@ -23,87 +24,53 @@ + (BNCServerAPI *)sharedInstance { return serverAPI; } -- (instancetype)init { - self = [super init]; - if (self) { - self.useTrackingDomain = NO; - self.useEUServers = NO; - self.automaticallyEnableTrackingDomain = YES; - } - return self; -} - -- (NSString *)installServiceURL{ - return [[self getBaseURL] stringByAppendingString: @"/v1/install"]; -} - -- (NSString *)openServiceURL { - return [[self getBaseURL] stringByAppendingString: @"/v1/open"]; -} - -- (NSString *)standardEventServiceURL{ - return [[self getBaseURL] stringByAppendingString: @"/v2/event/standard"]; -} - -- (NSString *)customEventServiceURL{ - return [[self getBaseURL] stringByAppendingString: @"/v2/event/custom"]; +- (NSURL *)installServiceURL{ + return [NSURL URLWithString: [[self getBaseURLWithVersion] stringByAppendingString: BRANCH_REQUEST_ENDPOINT_INSTALL]]; } -- (NSString *)linkServiceURL { - return [[self getBaseURLForLinkingEndpoints] stringByAppendingString: @"/v1/url"]; +- (NSURL *)openServiceURL { + return [NSURL URLWithString: [[self getBaseURLWithVersion] stringByAppendingString: BRANCH_REQUEST_ENDPOINT_OPEN]]; } -- (NSString *)qrcodeServiceURL { - return [[self getBaseURLForLinkingEndpoints] stringByAppendingString: @"/v1/qr-code"]; +- (NSURL *)eventServiceURL{ + return [NSURL URLWithString: [[self getBaseURLWithVersion] stringByAppendingString: BRANCH_REQUEST_ENDPOINT_USER_COMPLETED_ACTION]]; } -// LATD endpoint is not a data collection endpoint and will be treated like linking endpoints -- (NSString *)latdServiceURL { - return [[self getBaseURLForLinkingEndpoints] stringByAppendingString: @"/v1/cpid/latd"]; +- (NSURL *)linkServiceURL { + return [NSURL URLWithString: [[self getBaseURLWithVersion] stringByAppendingString: BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL]]; } -- (NSString *)validationServiceURL { - return [[self getBaseURLForLinkingEndpoints] stringByAppendingString: @"/v1/app-link-settings"]; -} - -// Currently we switch to tracking domains if we detect IDFA, indicating that Ad Tracking is enabled -- (BOOL)optedIntoIDFA { +- (BOOL)useTrackingDomain { NSString* optedInStatus = [BNCSystemObserver attOptedInStatus]; + if ([optedInStatus isEqualToString:@"authorized"]){ return TRUE; } return FALSE; } -// Linking endpoints are not used for Ads tracking -- (NSString *)getBaseURLForLinkingEndpoints { - NSString * urlString; - if (self.useEUServers){ - urlString = BNC_EU_API_URL; - } else { - urlString = BNC_API_URL; - } - - return urlString; +- (void)setUseEUServers:(BOOL)useEUServers { + [[BNCPreferenceHelper sharedInstance] setUseEUServers: useEUServers]; } -- (NSString *)getBaseURL { - if (self.automaticallyEnableTrackingDomain) { - self.useTrackingDomain = [self optedIntoIDFA]; - } - +- (BOOL)useEUServers { + return [[BNCPreferenceHelper sharedInstance] useEUServers]; +} + +- (NSString *) getBaseURLWithVersion { NSString * urlString; - if (self.useTrackingDomain && self.useEUServers){ + if ([self useTrackingDomain] && [ self useEUServers]){ urlString = BNC_SAFETRACK_EU_API_URL; - } else if (self.useTrackingDomain) { + } else if ([self useTrackingDomain]) { urlString = BNC_SAFETRACK_API_URL; - } else if (self.useEUServers){ + } else if ([self useEUServers]){ urlString = BNC_EU_API_URL; } else { urlString = BNC_API_URL; } + urlString = [urlString stringByAppendingFormat:@"/%@/", BNC_API_VERSION_3]; return urlString; } diff --git a/BranchSDK/BNCServerInterface.m b/BranchSDK/BNCServerInterface.m index ec652d406..e500ececa 100644 --- a/BranchSDK/BNCServerInterface.m +++ b/BranchSDK/BNCServerInterface.m @@ -11,16 +11,18 @@ #import "BNCEncodingUtils.h" #import "NSError+Branch.h" #import "BranchConstants.h" +#import "BNCDeviceInfo.h" #import "NSMutableDictionary+Branch.h" #import "BNCLog.h" #import "Branch.h" +#import "NSString+Branch.h" +#import "BNCApplication.h" #import "BNCSKAdNetwork.h" #import "BNCReferringURLUtility.h" @interface BNCServerInterface () @property (copy, nonatomic) NSString *requestEndpoint; @property (strong, nonatomic) id networkService; - @end @implementation BNCServerInterface @@ -40,11 +42,18 @@ - (void) dealloc { #pragma mark - GET methods -- (void)getRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)key callback:(BNCServerCallback)callback { +- (void)getRequest:(NSDictionary *)params + url:(NSString *)url + key:(NSString *)key + callback:(BNCServerCallback)callback { [self getRequest:params url:url key:key retryNumber:0 callback:callback]; } -- (void)getRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)key retryNumber:(NSInteger)retryNumber callback:(BNCServerCallback)callback { +- (void)getRequest:(NSDictionary *)params + url:(NSString *)url + key:(NSString *)key + retryNumber:(NSInteger)retryNumber + callback:(BNCServerCallback)callback { NSURLRequest *request = [self prepareGetRequest:params url:url key:key retryNumber:retryNumber]; [self genericHTTPRequest:request retryNumber:retryNumber callback:callback @@ -55,27 +64,96 @@ - (void)getRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)ke #pragma mark - POST methods -- (void)postRequest:(NSDictionary *)post url:(NSString *)url key:(NSString *)key callback:(BNCServerCallback)callback { +- (void)postRequest:(NSDictionary *)post + url:(NSString *)url + key:(NSString *)key + callback:(BNCServerCallback)callback { [self postRequest:post url:url retryNumber:0 key:key callback:callback]; } -- (void)postRequest:(NSDictionary *)post url:(NSString *)url retryNumber:(NSInteger)retryNumber key:(NSString *)key callback:(BNCServerCallback)callback { +- (BOOL)isV2APIURL:(NSString *)urlstring { + return [self isV2APIURL:urlstring baseURL:[self.preferenceHelper branchAPIURL]]; +} + +- (BOOL)isV2APIURL:(NSString *)urlstring baseURL:(NSString *)baseURL { + BOOL found = NO; + if (urlstring && baseURL) { + NSString *matchString = [NSString stringWithFormat:@"%@/v2/", baseURL]; + NSRange range = [urlstring rangeOfString:matchString]; + found = (range.location != NSNotFound); + } + return found; +} + +// workaround for new V1 APIs that expects different format +- (BOOL)isNewV1API:(NSString *)urlstring { + NSArray *newV1Apis = @[ BRANCH_REQUEST_ENDPOINT_CPID, BRANCH_REQUEST_ENDPOINT_LATD ]; + for (NSString *tmp in newV1Apis) { + NSRange range = [urlstring rangeOfString:tmp]; + BOOL found = (range.location != NSNotFound); + if (found) { + return YES; + } + } + return NO; +} + +// SDK-635 Follow up ticket to redesign this. The payload format should be the responsibility of the network request class. +- (NSMutableDictionary *)buildExtendedParametersForURL:(NSString *)url withPostDictionary:(NSDictionary *)post { + NSMutableDictionary *extendedParams = nil; - // TODO: confirm it's ok to send full URL instead of with the domain trimmed off - self.requestEndpoint = url; - NSURLRequest *request = [self preparePostRequest:post url:url key:key retryNumber:retryNumber]; + // v2 endpoints expect a user data section + if ([self isV2APIURL:url]) { + extendedParams = [NSMutableDictionary new]; + if (post) { + [extendedParams addEntriesFromDictionary:post]; + } + NSDictionary *d = [[BNCDeviceInfo getInstance] v2dictionary]; + if (d.count) { + extendedParams[@"user_data"] = d; + } + + // cpid and latd endpoints expect a v2 format, except with possible customization + } else if ([self isNewV1API:url]) { + extendedParams = [NSMutableDictionary new]; + + NSMutableDictionary *tmp = [NSMutableDictionary dictionaryWithDictionary: [[BNCDeviceInfo getInstance] v2dictionary]]; + if (tmp.count) { + extendedParams[@"user_data"] = tmp; + [tmp addEntriesFromDictionary:post]; + } + + } else { + extendedParams = [self updateDeviceInfoToParams:post]; + } + return extendedParams; +} + +- (void)postRequest:(NSDictionary *)post + url:(NSString *)url + retryNumber:(NSInteger)retryNumber + key:(NSString *)key + callback:(BNCServerCallback)callback { + + // Instrumentation metrics + self.requestEndpoint = [self.preferenceHelper getEndpointFromURL:url]; + + NSMutableDictionary *extendedParams = [self buildExtendedParametersForURL:url withPostDictionary:post]; + NSURLRequest *request = [self preparePostRequest:extendedParams url:url key:key retryNumber:retryNumber]; [self genericHTTPRequest:request retryNumber:retryNumber callback:callback retryHandler:^ NSURLRequest *(NSInteger lastRetryNumber) { - return [self preparePostRequest:post url:url key:key retryNumber:lastRetryNumber+1]; + return [self preparePostRequest:extendedParams url:url key:key retryNumber:lastRetryNumber+1]; }]; } -// Only used by BranchShortUrlSyncRequest -- (BNCServerResponse *)postRequestSynchronous:(NSDictionary *)post url:(NSString *)url key:(NSString *)key { - NSURLRequest *request = [self preparePostRequest:post url:url key:key retryNumber:0]; +- (BNCServerResponse *)postRequestSynchronous:(NSDictionary *)post + url:(NSString *)url + key:(NSString *)key { + NSDictionary *extendedParams = [self updateDeviceInfoToParams:post]; + NSURLRequest *request = [self preparePostRequest:extendedParams url:url key:key retryNumber:0]; return [self genericHTTPRequestSynchronous:request]; } @@ -88,7 +166,10 @@ - (void)genericHTTPRequest:(NSURLRequest *)request callback:(BNCServerCallback)c }]; } -- (void)genericHTTPRequest:(NSURLRequest *)request retryNumber:(NSInteger)retryNumber callback:(BNCServerCallback)callback retryHandler:(NSURLRequest *(^)(NSInteger))retryHandler { +- (void)genericHTTPRequest:(NSURLRequest *)request + retryNumber:(NSInteger)retryNumber + callback:(BNCServerCallback)callback + retryHandler:(NSURLRequest *(^)(NSInteger))retryHandler { void (^completionHandler)(idoperation) = ^void (idoperation) { @@ -213,7 +294,7 @@ - (BOOL)isLinkingRelatedRequest:(NSString *)endpoint { return NO; } -- (NSError *)verifyNetworkOperation:(id)operation { +- (NSError*) verifyNetworkOperation:(id)operation { if (!operation) { NSString *message = @"A network operation instance is expected to be returned by the" @@ -274,31 +355,60 @@ - (BNCServerResponse *)genericHTTPRequestSynchronous:(NSURLRequest *)request { #pragma mark - Internals -- (NSURLRequest *)prepareGetRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)key retryNumber:(NSInteger)retryNumber { +- (NSURLRequest *)prepareGetRequest:(NSDictionary *)params + url:(NSString *)url + key:(NSString *)key + retryNumber:(NSInteger)retryNumber { - NSDictionary *tmp = [self addRetryCount:retryNumber toJSON:params]; - NSString *requestUrlString = [NSString stringWithFormat:@"%@%@", url, [BNCEncodingUtils encodeDictionaryToQueryString:tmp]]; + NSDictionary *preparedParams = + [self prepareParamDict:params key:key retryNumber:retryNumber requestType:@"GET"]; + NSString *requestUrlString = + [NSString stringWithFormat:@"%@%@", url, [BNCEncodingUtils encodeDictionaryToQueryString:preparedParams]]; BNCLogDebug([NSString stringWithFormat:@"URL: %@", requestUrlString]); - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:requestUrlString] - cachePolicy:NSURLRequestReloadIgnoringLocalCacheData - timeoutInterval:self.preferenceHelper.timeout]; + NSMutableURLRequest *request = + [NSMutableURLRequest requestWithURL:[NSURL URLWithString:requestUrlString] + cachePolicy:NSURLRequestReloadIgnoringLocalCacheData + timeoutInterval:self.preferenceHelper.timeout]; [request setHTTPMethod:@"GET"]; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; return request; } -- (NSURLRequest *)preparePostRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)key retryNumber:(NSInteger)retryNumber { - - NSDictionary *tmp = [self addRetryCount:retryNumber toJSON:params]; +- (NSURLRequest *)preparePostRequest:(NSDictionary *)params + url:(NSString *)url + key:(NSString *)key + retryNumber:(NSInteger)retryNumber { - NSData *postData = [BNCEncodingUtils encodeDictionaryToJsonData:tmp]; + NSMutableDictionary *preparedParams = + [self prepareParamDict:params key:key retryNumber:retryNumber requestType:@"POST"]; + if ([self isV2APIURL:url]) { + preparedParams[@"sdk"] = nil; + } + if (Branch.trackingDisabled) { + preparedParams[@"tracking_disabled"] = (__bridge NSNumber*) kCFBooleanTrue; + preparedParams[@"local_ip"] = nil; + preparedParams[@"lastest_update_time"] = nil; + preparedParams[@"previous_update_time"] = nil; + preparedParams[@"latest_install_time"] = nil; + preparedParams[@"first_install_time"] = nil; + preparedParams[@"ios_vendor_id"] = nil; + preparedParams[@"hardware_id"] = nil; + preparedParams[@"hardware_id_type"] = nil; + preparedParams[@"is_hardware_id_real"] = nil; + preparedParams[@"randomized_device_token"] = nil; + preparedParams[@"randomized_bundle_token"] = nil; + preparedParams[@"identity"] = nil; + preparedParams[@"update"] = nil; + preparedParams[@"anon_id"] = nil; + } + NSData *postData = [BNCEncodingUtils encodeDictionaryToJsonData:preparedParams]; NSString *postLength = [NSString stringWithFormat:@"%lu", (unsigned long)[postData length]]; BNCLogDebug([NSString stringWithFormat:@"URL: %@.\n", url]); BNCLogDebug([NSString stringWithFormat:@"Body: %@\nJSON: %@.", - params, + preparedParams, [[NSString alloc] initWithData:postData encoding:NSUTF8StringEncoding]] ); @@ -314,10 +424,62 @@ - (NSURLRequest *)preparePostRequest:(NSDictionary *)params url:(NSString *)url return request; } -- (BNCServerResponse *)processServerResponse:(NSURLResponse *)response data:(NSData *)data error:(NSError *)error { +- (NSMutableDictionary *)prepareParamDict:(NSDictionary *)params + key:(NSString *)key + retryNumber:(NSInteger)retryNumber + requestType:(NSString *)reqType { + + NSMutableDictionary *fullParamDict = [[NSMutableDictionary alloc] init]; + [fullParamDict bnc_safeAddEntriesFromDictionary:params]; + fullParamDict[@"sdk"] = [NSString stringWithFormat:@"ios%@", BNC_SDK_VERSION]; + + if ([[[NSBundle mainBundle] executablePath] containsString:@".appex/"]) { + fullParamDict[@"ios_extension"] = @(1); + } + fullParamDict[@"retryNumber"] = @(retryNumber); + fullParamDict[@"branch_key"] = key; + + NSMutableDictionary *metadata = [[NSMutableDictionary alloc] init]; + [metadata bnc_safeAddEntriesFromDictionary:self.preferenceHelper.requestMetadataDictionary]; + [metadata bnc_safeAddEntriesFromDictionary:fullParamDict[BRANCH_REQUEST_KEY_STATE]]; + + if(([self.requestEndpoint containsString:@"/v1/open"]) || ([self.requestEndpoint containsString:@"/v1/install"]) || ([self.requestEndpoint containsString:@"/v2/event"])){ + [metadata bnc_safeSetObject:[NSString stringWithFormat:@"%f", [BNCSKAdNetwork sharedInstance].maxTimeSinceInstall] forKey:BRANCH_REQUEST_METADATA_KEY_SCANTIME_WINDOW]; + } + + if (metadata.count) { + fullParamDict[BRANCH_REQUEST_KEY_STATE] = metadata; + } + // we only send instrumentation info in the POST body request + if ([reqType isEqualToString:@"POST"]) { + NSDictionary *instrumentationDictionary = self.preferenceHelper.instrumentationParameters; + if (instrumentationDictionary) { + fullParamDict[BRANCH_REQUEST_KEY_INSTRUMENTATION] = instrumentationDictionary; + } + } + + BNCReferringURLUtility *utility = [BNCReferringURLUtility new]; + NSDictionary *urlQueryParams = [utility referringURLQueryParamsForEndpoint:self.requestEndpoint]; + [fullParamDict bnc_safeAddEntriesFromDictionary:urlQueryParams]; + + if ([self.requestEndpoint containsString:@"/v1/open"] || [self.requestEndpoint containsString:@"/v1/install"]) { + [fullParamDict bnc_safeSetObject:[BNCPreferenceHelper sharedInstance].userIdentity forKey:@"identity"]; + } + + return fullParamDict; +} + +- (BNCServerResponse *)processServerResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *)error { BNCServerResponse *serverResponse = [[BNCServerResponse alloc] init]; NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; NSString *requestId = httpResponse.allHeaderFields[@"X-Branch-Request-Id"]; + + NSString *sendCloseRequests = httpResponse.allHeaderFields[@"X-Branch-Send-Close-Request"]; + if (sendCloseRequests != nil) { + [[BNCPreferenceHelper sharedInstance] setSendCloseRequests:sendCloseRequests.boolValue]; + } if (!error) { serverResponse.statusCode = @([httpResponse statusCode]); @@ -334,7 +496,7 @@ - (BNCServerResponse *)processServerResponse:(NSURLResponse *)response data:(NSD return serverResponse; } -- (void)collectInstrumentationMetricsWithOperation:(id)operation { +- (void) collectInstrumentationMetricsWithOperation:(id)operation { // multiplying by negative because startTime happened in the past NSTimeInterval elapsedTime = [operation.startDate timeIntervalSinceNow] * -1000.0; NSString *lastRoundTripTime = [[NSNumber numberWithDouble:floor(elapsedTime)] stringValue]; @@ -343,16 +505,97 @@ - (void)collectInstrumentationMetricsWithOperation:(id 0) { - tmp[@"retryNumber"] = @(count); + if ([now compare:maxDate] == NSOrderedDescending) { + return NO; } else { - tmp[@"retryNumber"] = @(0); + return YES; + } +} + +- (NSMutableDictionary*)updateDeviceInfoToParams:(NSDictionary *)params { + NSMutableDictionary *extendedParams=[[NSMutableDictionary alloc] init]; + [extendedParams addEntriesFromDictionary:params]; + [self updateDeviceInfoToMutableDictionary:extendedParams]; + return extendedParams; +} + +- (void)safeSetValue:(NSObject *)value forKey:(NSString *)key onDict:(NSMutableDictionary *)dict { + if (value) { + dict[key] = value; } - return tmp; } @end diff --git a/BranchSDK/BNCServerRequestQueue.h b/BranchSDK/BNCServerRequestQueue.h index 62f468426..ff391d4e1 100755 --- a/BranchSDK/BNCServerRequestQueue.h +++ b/BranchSDK/BNCServerRequestQueue.h @@ -23,6 +23,7 @@ - (BOOL)containsInstallOrOpen; - (BOOL)removeInstallOrOpen; +- (BOOL)containsClose; - (BranchOpenRequest *)moveInstallOrOpenToFront:(NSInteger)networkCount; - (void)persistEventually; diff --git a/BranchSDK/BNCServerRequestQueue.m b/BranchSDK/BNCServerRequestQueue.m index dea5a88f7..17b3eb299 100755 --- a/BranchSDK/BNCServerRequestQueue.m +++ b/BranchSDK/BNCServerRequestQueue.m @@ -9,6 +9,7 @@ #import "BNCServerRequestQueue.h" #import "BNCPreferenceHelper.h" +#import "BranchCloseRequest.h" // Analytics requests #import "BranchInstallRequest.h" @@ -214,6 +215,18 @@ - (BranchOpenRequest *)moveInstallOrOpenToFront:(NSInteger)networkCount { } } +- (BOOL)containsClose { + @synchronized (self) { + for (NSUInteger i = 0; i < self.queue.count; i++) { + BNCServerRequest *req = [self.queue objectAtIndex:i]; + if ([req isKindOfClass:[BranchCloseRequest class]]) { + return YES; + } + } + return NO; + } +} + #pragma mark - Private Methods - (void)persistEventually { @@ -293,9 +306,13 @@ - (NSData *)oldArchiveQueue:(NSArray *)queue { NSMutableArray *archivedRequests = [NSMutableArray new]; for (BNCServerRequest *request in queue) { - // archive every request - NSData *encodedRequest = [self archiveObject:request]; - [archivedRequests addObject:encodedRequest]; + // only close requests were ignored + if (![BranchCloseRequest.class isEqual:request.class]) { + + // archive every request + NSData *encodedRequest = [self archiveObject:request]; + [archivedRequests addObject:encodedRequest]; + } } return [self archiveObject:archivedRequests]; } diff --git a/BranchSDK/BNCSystemObserver.h b/BranchSDK/BNCSystemObserver.h index 24899a6a4..4c2146414 100644 --- a/BranchSDK/BNCSystemObserver.h +++ b/BranchSDK/BNCSystemObserver.h @@ -28,6 +28,7 @@ + (NSNumber *)screenHeight; + (NSNumber *)screenScale; + (BOOL)isSimulator; ++ (BOOL)adTrackingEnabled; + (NSString *)advertiserIdentifier; + (NSString *)attOptedInStatus; + (NSString *)appleAttributionToken; diff --git a/BranchSDK/BNCSystemObserver.m b/BranchSDK/BNCSystemObserver.m index cc4944302..0a0ab24f5 100644 --- a/BranchSDK/BNCSystemObserver.m +++ b/BranchSDK/BNCSystemObserver.m @@ -122,6 +122,24 @@ + (NSString *)attOptedInStatus { return statusString; } +// this value is deprecated on iOS 14+ ++ (BOOL)adTrackingEnabled { + #ifdef BRANCH_EXCLUDE_IDFA_CODE + return NO; + + #else + Class ASIdentifierManagerClass = NSClassFromString(@"ASIdentifierManager"); + if (ASIdentifierManagerClass) { + SEL sharedManagerSelector = NSSelectorFromString(@"sharedManager"); + id sharedManager = ((id (*)(id, SEL))[ASIdentifierManagerClass methodForSelector:sharedManagerSelector])(ASIdentifierManagerClass, sharedManagerSelector); + SEL advertisingEnabledSelector = NSSelectorFromString(@"isAdvertisingTrackingEnabled"); + BOOL enabled = ((BOOL (*)(id, SEL))[sharedManager methodForSelector:advertisingEnabledSelector])(sharedManager, advertisingEnabledSelector); + return enabled; + } + return NO; + #endif +} + + (NSString *)defaultURIScheme { NSArray *urlTypes = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleURLTypes"]; diff --git a/BranchSDK/Branch+Validator.m b/BranchSDK/Branch+Validator.m index 5deca2670..2b974b643 100644 --- a/BranchSDK/Branch+Validator.m +++ b/BranchSDK/Branch+Validator.m @@ -11,7 +11,6 @@ #import "BranchConstants.h" #import "BNCApplication.h" #import "BNCEncodingUtils.h" -#import "BNCServerAPI.h" #import "UIViewController+Branch.h" void BNCForceBranchValidatorCategoryToLoad(void) { @@ -42,16 +41,19 @@ - (void)validateSDKIntegrationCore { - (void) startValidation { BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; - NSString *serverURL = [[BNCServerAPI sharedInstance] validationServiceURL]; - NSString *endpoint = [serverURL stringByAppendingPathComponent:preferenceHelper.lastRunBranchKey]; - - [[[BNCServerInterface alloc] init] getRequest:nil url:endpoint key:nil callback:^ (BNCServerResponse *response, NSError *error) { - if (error) { - [self showAlertWithTitle:@"Error" message:error.localizedDescription]; - } else { - [self validateIntegrationWithServerResponse:response]; - } - }]; + NSString *endpoint = + [BRANCH_REQUEST_ENDPOINT_APP_LINK_SETTINGS stringByAppendingPathComponent:preferenceHelper.lastRunBranchKey]; + [[[BNCServerInterface alloc] init] + getRequest:nil + url:[preferenceHelper getAPIURL:endpoint] + key:nil + callback:^ (BNCServerResponse *response, NSError *error) { + if (error) { + [self showAlertWithTitle:@"Error" message:error.localizedDescription]; + } else { + [self validateIntegrationWithServerResponse:response]; + } + }]; } - (void) validateIntegrationWithServerResponse:(BNCServerResponse*)response { diff --git a/BranchSDK/Branch.h b/BranchSDK/Branch.h index 820376a8d..e4324e5b3 100644 --- a/BranchSDK/Branch.h +++ b/BranchSDK/Branch.h @@ -16,6 +16,7 @@ // Public classes that should be in the umbrella header #import "BranchLinkProperties.h" #import "BranchUniversalObject.h" +#import "BranchCrossPlatformID.h" #import "BranchLastAttributedTouchData.h" #import "BranchDeepLinkingController.h" #import "BranchDelegate.h" @@ -255,6 +256,7 @@ extern NSString * __nonnull const BNCSpotlightFeature; + (BOOL)branchKeyIsSet; +/// TODO: Add documentation. @property (weak, nullable) NSObject* delegate; //@property (strong, nonatomic, nullable) BranchEvent *testEvent; @@ -568,13 +570,6 @@ extern NSString * __nonnull const BNCSpotlightFeature; */ - (void)enableLogging; -/** - Send requests to EU endpoints. - - This feature must also be enabled on the server side, otherwise the server will drop requests. Contact your account manager for details. - */ -- (void)useEUEndpoints; - /** setDebug is deprecated and all functionality has been disabled. @@ -924,6 +919,17 @@ extern NSString * __nonnull const BNCSpotlightFeature; #pragma mark - Query methods +/** + Branch includes SDK methods to allow retrieval of our Cross Platform ID (CPID) from the client. This results in an asynchronous call being made to Branch’s servers with CPID data returned when possible. + + This method should only be invoked after initSession completes, either within the callback or after a delay. + If it is invoked before, then we will silently initialize the SDK before the callback has been set, in order to carry out this method's required task. + As a result, you may experience issues where the initSession callback does not fire. Again, the solution to this issue is to only invoke this method after you have invoked initSession. + + @param completion callback with cross platform id data + */ +- (void)crossPlatformIdDataWithCompletion:(void(^) (BranchCrossPlatformID * _Nullable cpid))completion; + /** Branch includes SDK methods to allow retrieval of our last attributed touch data (LATD) from the client. This results in an asynchronous call being made to Branch's servers with LATD data returned when possible. Last attributed touch data contains the information associated with that user's last viewed impression or clicked link. diff --git a/BranchSDK/Branch.m b/BranchSDK/Branch.m index 24bcf7ef0..12bccd12b 100644 --- a/BranchSDK/Branch.m +++ b/BranchSDK/Branch.m @@ -18,6 +18,7 @@ #import "BNCServerRequestQueue.h" #import "BNCServerResponse.h" #import "BNCSystemObserver.h" +#import "BranchCloseRequest.h" #import "BranchConstants.h" #import "BranchInstallRequest.h" #import "BranchJsonConfig.h" @@ -419,10 +420,6 @@ - (void)enableLogging { BNCLogSetDisplayLevel(BNCLogLevelDebug); } -- (void)useEUEndpoints { - [BNCServerAPI sharedInstance].useEUServers = YES; -} - - (void)setDebug { NSLog(@"Branch setDebug is deprecated and all functionality has been disabled. " "If you wish to enable logging, please invoke enableLogging. " @@ -1122,6 +1119,13 @@ - (BranchLinkProperties *)getLatestReferringBranchLinkProperties { #pragma mark - Query methods +- (void)crossPlatformIdDataWithCompletion:(void(^) (BranchCrossPlatformID * _Nullable cpid))completion { + [self initSafetyCheck]; + dispatch_async(self.isolationQueue, ^(){ + [BranchCrossPlatformID requestCrossPlatformIdData:self.serverInterface key:self.class.branchKey completion:completion]; + }); +} + - (void)lastAttributedTouchDataWithAttributionWindow:(NSInteger)window completion:(void(^) (BranchLastAttributedTouchData * _Nullable latd, NSError * _Nullable error))completion { [self initSafetyCheck]; dispatch_async(self.isolationQueue, ^(){ @@ -1738,12 +1742,31 @@ - (void)applicationDidBecomeActive { - (void)applicationWillResignActive { if (!Branch.trackingDisabled) { + [self callClose]; [self.requestQueue persistImmediately]; [BranchOpenRequest setWaitNeededForOpenResponseLock]; BNCLogDebugSDK(@"Application resigned active."); } } +- (void)callClose { + if (self.initializationStatus != BNCInitStatusUninitialized) { + self.initializationStatus = BNCInitStatusUninitialized; + +#if !TARGET_OS_TV + BranchContentDiscoverer *contentDiscoverer = [BranchContentDiscoverer getInstance]; + if (contentDiscoverer) [contentDiscoverer stopDiscoveryTask]; +#endif + + BOOL sendCloseRequests = [[BNCPreferenceHelper sharedInstance] sendCloseRequests]; + if (sendCloseRequests && self.preferenceHelper.sessionID && ![self.requestQueue containsClose]) { + BranchCloseRequest *req = [[BranchCloseRequest alloc] init]; + [self.requestQueue enqueue:req]; + [self processNextQueueItem]; + } + } +} + #pragma mark - Queue management - (NSInteger) networkCount { @@ -2107,7 +2130,6 @@ - (void)handleInitSuccessAndCallCallback:(BOOL)callCallback sceneIdentifier:(NSS } } -// TODO: can we deprecate and remove this, it doesn't work well. // UI code, must run on main - (void)automaticallyDeeplinkWithReferringParams:(NSDictionary *)latestReferringParams { // Find any matched keys, then launch any controllers that match diff --git a/BranchSDK/BranchCPIDRequest.h b/BranchSDK/BranchCPIDRequest.h new file mode 100644 index 000000000..df76c49dd --- /dev/null +++ b/BranchSDK/BranchCPIDRequest.h @@ -0,0 +1,18 @@ +// +// BranchCPIDRequest.h +// Branch +// +// Created by Ernest Cho on 9/9/19. +// Copyright © 2019 Branch, Inc. All rights reserved. +// + +#import +#import "BNCServerRequest.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface BranchCPIDRequest : BNCServerRequest + +@end + +NS_ASSUME_NONNULL_END diff --git a/BranchSDK/BranchCPIDRequest.m b/BranchSDK/BranchCPIDRequest.m new file mode 100644 index 000000000..d6bc73f17 --- /dev/null +++ b/BranchSDK/BranchCPIDRequest.m @@ -0,0 +1,33 @@ +// +// BranchCPIDRequest.m +// Branch +// +// Created by Ernest Cho on 9/9/19. +// Copyright © 2019 Branch, Inc. All rights reserved. +// + +#import "BranchCPIDRequest.h" +#import "BNCPreferenceHelper.h" +#import "BranchConstants.h" + +@implementation BranchCPIDRequest + +- (NSString *)serverURL { + return [[BNCPreferenceHelper sharedInstance] getAPIURL:BRANCH_REQUEST_ENDPOINT_CPID]; +} + +// all required fields for this request is added by BNCServerInterface +- (NSMutableDictionary *)buildRequestParams { + NSMutableDictionary *params = [NSMutableDictionary new]; + return params; +} + +- (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { + NSDictionary *params = [self buildRequestParams]; + [serverInterface postRequest:params url:[self serverURL] key:key callback:callback]; +} + +// unused, callee handles parsing the json response +- (void)processResponse:(BNCServerResponse *)response error:(NSError *)error { } + +@end diff --git a/BranchSDK/BranchCloseRequest.h b/BranchSDK/BranchCloseRequest.h new file mode 100644 index 000000000..e4ca5252c --- /dev/null +++ b/BranchSDK/BranchCloseRequest.h @@ -0,0 +1,12 @@ +// +// BranchCloseRequest.h +// Branch-TestBed +// +// Created by Graham Mueller on 5/26/15. +// Copyright (c) 2015 Branch Metrics. All rights reserved. +// + +#import "BNCServerRequest.h" + +@interface BranchCloseRequest : BNCServerRequest +@end diff --git a/BranchSDK/BranchCloseRequest.m b/BranchSDK/BranchCloseRequest.m new file mode 100644 index 000000000..1d118aee8 --- /dev/null +++ b/BranchSDK/BranchCloseRequest.m @@ -0,0 +1,49 @@ +// +// BranchCloseRequest.m +// Branch-TestBed +// +// Created by Graham Mueller on 5/26/15. +// Copyright (c) 2015 Branch Metrics. All rights reserved. +// + +#import "BranchCloseRequest.h" +#import "BNCPreferenceHelper.h" +#import "BranchConstants.h" + +#if !TARGET_OS_TV +#import "BranchContentDiscoveryManifest.h" +#endif + +@implementation BranchCloseRequest + +- (void)makeRequest:(BNCServerInterface *)serverInterface + key:(NSString *)key + callback:(BNCServerCallback)callback { + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; + params[BRANCH_REQUEST_KEY_RANDOMIZED_BUNDLE_TOKEN] = preferenceHelper.randomizedBundleToken; + params[BRANCH_REQUEST_KEY_SESSION_ID] = preferenceHelper.sessionID; + params[BRANCH_REQUEST_KEY_RANDOMIZED_DEVICE_TOKEN] = preferenceHelper.randomizedDeviceToken; + NSDictionary *branchAnalyticsObj = [preferenceHelper getBranchAnalyticsData]; + if (branchAnalyticsObj && branchAnalyticsObj.count > 0) { +#if !TARGET_OS_TV + NSData *data = + [NSPropertyListSerialization + dataWithPropertyList:branchAnalyticsObj + format:NSPropertyListBinaryFormat_v1_0 + options:0 error:NULL]; + if ([data length] < (NSUInteger) [BranchContentDiscoveryManifest getInstance].maxPktSize) { + params[BRANCH_CONTENT_DISCOVER_KEY] = branchAnalyticsObj; + } +#endif + [preferenceHelper clearBranchAnalyticsData]; + } + [serverInterface postRequest:params url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_CLOSE] key:key callback:callback]; + +} + +- (void)processResponse:(BNCServerResponse *)response error:(NSError *)error { + // Nothing to see here +} + +@end diff --git a/BranchSDK/BranchConstants.h b/BranchSDK/BranchConstants.h index 013622446..fdd1e6049 100644 --- a/BranchSDK/BranchConstants.h +++ b/BranchSDK/BranchConstants.h @@ -38,6 +38,7 @@ extern NSString * const BRANCH_REQUEST_KEY_HARDWARE_ID; extern NSString * const BRANCH_REQUEST_KEY_HARDWARE_ID_TYPE; extern NSString * const BRANCH_REQUEST_KEY_IS_HARDWARE_ID_REAL; extern NSString * const BRANCH_REQUEST_KEY_IOS_VENDOR_ID; +extern NSString * const BRANCH_REQUEST_KEY_AD_TRACKING_ENABLED; extern NSString * const BRANCH_REQUEST_KEY_OPTED_IN_STATUS; extern NSString * const BRANCH_REQUEST_KEY_FIRST_OPT_IN; extern NSString * const BRANCH_REQUEST_KEY_DEBUG; @@ -86,9 +87,11 @@ extern NSString * const BRANCH_REQUEST_KEY_SCCID; extern NSString * const BRANCH_REQUEST_ENDPOINT_APP_LINK_SETTINGS; extern NSString * const BRANCH_REQUEST_ENDPOINT_USER_COMPLETED_ACTION; extern NSString * const BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL; +extern NSString * const BRANCH_REQUEST_ENDPOINT_CLOSE; extern NSString * const BRANCH_REQUEST_ENDPOINT_OPEN; extern NSString * const BRANCH_REQUEST_ENDPOINT_INSTALL; extern NSString * const BRANCH_REQUEST_ENDPOINT_REGISTER_VIEW; +extern NSString * const BRANCH_REQUEST_ENDPOINT_CPID; extern NSString * const BRANCH_REQUEST_ENDPOINT_LATD; extern NSString * const BRANCH_RESPONSE_KEY_RANDOMIZED_BUNDLE_TOKEN; diff --git a/BranchSDK/BranchConstants.m b/BranchSDK/BranchConstants.m index f4d12989d..3f56480a5 100644 --- a/BranchSDK/BranchConstants.m +++ b/BranchSDK/BranchConstants.m @@ -34,6 +34,7 @@ NSString * const BRANCH_REQUEST_KEY_HARDWARE_ID_TYPE = @"hardware_id_type"; NSString * const BRANCH_REQUEST_KEY_IS_HARDWARE_ID_REAL = @"is_hardware_id_real"; NSString * const BRANCH_REQUEST_KEY_IOS_VENDOR_ID = @"ios_vendor_id"; +NSString * const BRANCH_REQUEST_KEY_AD_TRACKING_ENABLED = @"ad_tracking_enabled"; NSString * const BRANCH_REQUEST_KEY_OPTED_IN_STATUS = @"opted_in_status"; NSString * const BRANCH_REQUEST_KEY_FIRST_OPT_IN = @"first_opt_in"; NSString * const BRANCH_REQUEST_KEY_DEBUG = @"debug"; @@ -81,9 +82,11 @@ NSString * const BRANCH_REQUEST_ENDPOINT_APP_LINK_SETTINGS = @"app-link-settings"; NSString * const BRANCH_REQUEST_ENDPOINT_USER_COMPLETED_ACTION = @"event"; NSString * const BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL = @"url"; +NSString * const BRANCH_REQUEST_ENDPOINT_CLOSE = @"close"; NSString * const BRANCH_REQUEST_ENDPOINT_OPEN = @"open"; NSString * const BRANCH_REQUEST_ENDPOINT_INSTALL = @"install"; NSString * const BRANCH_REQUEST_ENDPOINT_REGISTER_VIEW = @"register-view"; +NSString * const BRANCH_REQUEST_ENDPOINT_CPID = @"cpid"; NSString * const BRANCH_REQUEST_ENDPOINT_LATD = @"cpid/latd"; NSString * const BRANCH_RESPONSE_KEY_RANDOMIZED_BUNDLE_TOKEN = @"randomized_bundle_token"; diff --git a/BranchSDK/BranchCrossPlatformID.h b/BranchSDK/BranchCrossPlatformID.h new file mode 100644 index 000000000..23e274472 --- /dev/null +++ b/BranchSDK/BranchCrossPlatformID.h @@ -0,0 +1,36 @@ +// +// BranchCrossPlatformID.h +// Branch +// +// Created by Ernest Cho on 9/12/19. +// Copyright © 2019 Branch, Inc. All rights reserved. +// + +#import +#import "BNCServerInterface.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface BranchProbabilisticCrossPlatformID : NSObject + +@property (nonatomic, copy, readonly) NSString *crossPlatformID; +@property (nonatomic, copy, readonly) NSNumber *score; + ++ (nullable BranchProbabilisticCrossPlatformID *)buildFromJSON:(NSDictionary *)json; + +@end + +@interface BranchCrossPlatformID : NSObject + +@property (nonatomic, copy, readonly) NSString *crossPlatformID; +@property (nonatomic, copy, readonly) NSString *developerID; +@property (nonatomic, strong, readonly) NSArray *pastCrossPlatformIDs; +@property (nonatomic, strong, readonly) NSArray *probabiliticCrossPlatformIDs; + ++ (nullable BranchCrossPlatformID *)buildFromJSON:(NSDictionary *)json; + ++ (void)requestCrossPlatformIdData:(BNCServerInterface *)serverInterface key:(NSString *)key completion:(void(^) (BranchCrossPlatformID * _Nullable cpid))completion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/BranchSDK/BranchCrossPlatformID.m b/BranchSDK/BranchCrossPlatformID.m new file mode 100644 index 000000000..fed4dd0fb --- /dev/null +++ b/BranchSDK/BranchCrossPlatformID.m @@ -0,0 +1,82 @@ +// +// BranchCrossPlatformID.m +// Branch +// +// Created by Ernest Cho on 9/12/19. +// Copyright © 2019 Branch, Inc. All rights reserved. +// + +#import "BranchCrossPlatformID.h" +#import "BranchCPIDRequest.h" +#import "BNCLog.h" +#import "BNCJSONUtility.h" + +@implementation BranchProbabilisticCrossPlatformID + ++ (BranchProbabilisticCrossPlatformID *)buildFromJSON:(NSDictionary *)json { + BranchProbabilisticCrossPlatformID *pcpid = [BranchProbabilisticCrossPlatformID new]; + pcpid->_crossPlatformID = [BNCJSONUtility stringForKey:@"id" json:json]; + pcpid->_score = [BNCJSONUtility numberForKey:@"probability" json:json]; + + // only return obj if we found all the data we expected + if (pcpid.crossPlatformID && pcpid.score) { + return pcpid; + } + return nil; +} + +@end + +@implementation BranchCrossPlatformID + ++ (BranchCrossPlatformID *)buildFromJSON:(NSDictionary *)json { + NSDictionary *userData = [BNCJSONUtility dictionaryForKey:@"user_data" json:json]; + if (!userData) { + return nil; + } + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID new]; + cpid->_crossPlatformID = [BNCJSONUtility stringForKey:@"cross_platform_id" json:userData]; + cpid->_developerID = [BNCJSONUtility stringForKey:@"developer_identity" json:userData]; + cpid->_pastCrossPlatformIDs = [BNCJSONUtility stringArrayForKey:@"past_cross_platform_ids" json:userData]; + + // parse probability pairs + NSArray *tmp = [BNCJSONUtility arrayForKey:@"prob_cross_platform_ids" json:userData]; + if (tmp) { + NSMutableArray *pcpidArray = [NSMutableArray new]; + for (id dict in tmp) { + BranchProbabilisticCrossPlatformID *pcpid = [BranchProbabilisticCrossPlatformID buildFromJSON:dict]; + if (pcpid) { + [pcpidArray addObject:pcpid]; + } + } + cpid->_probabiliticCrossPlatformIDs = pcpidArray; + } + + // only return obj if we found all the data we expected. lists can be empty + if (cpid.crossPlatformID && cpid.pastCrossPlatformIDs && cpid.probabiliticCrossPlatformIDs) { + return cpid; + } + return nil; +} + ++ (void)requestCrossPlatformIdData:(BNCServerInterface *)serverInterface key:(NSString *)key completion:(void(^) (BranchCrossPlatformID * _Nullable cpid))completion { + BranchCPIDRequest *request = [BranchCPIDRequest new]; + [request makeRequest:serverInterface key:key callback:^(BNCServerResponse *response, NSError *error) { + + // error is logged by the network service, skip parsing on error + if (error) { + if (completion) { + completion(nil); + } + return; + } + + BranchCrossPlatformID *cpid = [BranchCrossPlatformID buildFromJSON:response.data]; + if (completion) { + completion(cpid); + } + }]; +} + +@end diff --git a/BranchSDK/BranchDelegate.h b/BranchSDK/BranchDelegate.h index 8fbf82b6b..5eb6da704 100644 --- a/BranchSDK/BranchDelegate.h +++ b/BranchSDK/BranchDelegate.h @@ -6,6 +6,8 @@ // Copyright © 2017 Branch Metrics. All rights reserved. // +// TODO: Add documentation + #if __has_feature(modules) @import Foundation; #else diff --git a/BranchSDK/BranchEvent.m b/BranchSDK/BranchEvent.m index a7c9703cf..7e20dd229 100644 --- a/BranchSDK/BranchEvent.m +++ b/BranchSDK/BranchEvent.m @@ -16,8 +16,6 @@ #import "BNCPartnerParameters.h" #import "BNCPreferenceHelper.h" #import "BNCEventUtils.h" -#import "BNCRequestFactory.h" -#import "BNCServerAPI.h" #pragma mark BranchStandardEvents @@ -75,11 +73,10 @@ - (instancetype) initWithServerURL:(NSURL*)serverURL - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { - - BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; - NSDictionary *json = [factory dataForEventWithEventDictionary:[self.eventDictionary mutableCopy]]; - - [serverInterface postRequest:json url:[self.serverURL absoluteString] key:key callback:callback]; + [serverInterface postRequest:self.eventDictionary + url:[self.serverURL absoluteString] + key:key + callback:callback]; } - (void)processResponse:(BNCServerResponse*)response error:(NSError*)error { @@ -305,11 +302,13 @@ - (void) logEvent { [self logEventWithCompletion:nil]; } -- (BranchEventRequest *)buildRequestWithEventDictionary:(NSDictionary *)eventDictionary { +- (BranchEventRequest *)buildRequestWithEventDictionary:(NSDictionary *)eventDictionary { + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + NSString *serverURL = ([self.class.standardEvents containsObject:self.eventName]) - ? [[BNCServerAPI sharedInstance] standardEventServiceURL] - : [[BNCServerAPI sharedInstance] customEventServiceURL]; + ? [NSString stringWithFormat:@"%@/%@", preferenceHelper.branchAPIURL, @"v2/event/standard"] + : [NSString stringWithFormat:@"%@/%@", preferenceHelper.branchAPIURL, @"v2/event/custom"]; BranchEventRequest *request = [[BranchEventRequest alloc] @@ -352,6 +351,19 @@ - (NSDictionary *)buildEventDictionary { eventDictionary[BRANCH_REQUEST_KEY_PARTNER_PARAMETERS] = partnerParameters; } + if (@available(iOS 16.1, macCatalyst 16.1, *)){ + if ([BNCPreferenceHelper sharedInstance].invokeRegisterApp) { + int currentWindow = [[BNCSKAdNetwork sharedInstance] calculateSKANWindowForTime:[NSDate date]]; + if (currentWindow == BranchSkanWindowFirst){ + eventDictionary[BRANCH_REQUEST_KEY_SKAN_POSTBACK_INDEX] = BRANCH_REQUEST_KEY_VALUE_POSTBACK_SEQUENCE_INDEX_0; + } else if (currentWindow == BranchSkanWindowSecond) { + eventDictionary[BRANCH_REQUEST_KEY_SKAN_POSTBACK_INDEX] = BRANCH_REQUEST_KEY_VALUE_POSTBACK_SEQUENCE_INDEX_1; + } else if (currentWindow == BranchSkanWindowThird) { + eventDictionary[BRANCH_REQUEST_KEY_SKAN_POSTBACK_INDEX] = BRANCH_REQUEST_KEY_VALUE_POSTBACK_SEQUENCE_INDEX_2; + } + } + } + return eventDictionary; } diff --git a/BranchSDK/BranchInstallRequest.m b/BranchSDK/BranchInstallRequest.m index 8bcc5dd13..f00ca9227 100644 --- a/BranchSDK/BranchInstallRequest.m +++ b/BranchSDK/BranchInstallRequest.m @@ -7,10 +7,15 @@ // #import "BranchInstallRequest.h" -#import "BNCServerAPI.h" +#import "BNCPreferenceHelper.h" +#import "BNCSystemObserver.h" #import "BranchConstants.h" - -#import "BNCRequestFactory.h" +#import "BNCEncodingUtils.h" +#import "BNCApplication.h" +#import "BNCAppleReceipt.h" +#import "BNCAppGroupsData.h" +#import "BNCPartnerParameters.h" +#import "BNCPasteboard.h" @implementation BranchInstallRequest @@ -19,10 +24,69 @@ - (id)initWithCallback:(callbackWithStatus)callback { } - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { - BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; - NSDictionary *params = [factory dataForInstall]; + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; + super.clearLocalURL = FALSE; + + [self safeSetValue:[BNCSystemObserver bundleIdentifier] forKey:BRANCH_REQUEST_KEY_BUNDLE_ID onDict:params]; + [self safeSetValue:[BNCSystemObserver teamIdentifier] forKey:BRANCH_REQUEST_KEY_TEAM_ID onDict:params]; + [self safeSetValue:[BNCSystemObserver applicationVersion] forKey:BRANCH_REQUEST_KEY_APP_VERSION onDict:params]; + [self safeSetValue:[BNCSystemObserver defaultURIScheme] forKey:BRANCH_REQUEST_KEY_URI_SCHEME onDict:params]; + [self safeSetValue:preferenceHelper.linkClickIdentifier forKey:BRANCH_REQUEST_KEY_LINK_IDENTIFIER onDict:params]; + [self safeSetValue:preferenceHelper.spotlightIdentifier forKey:BRANCH_REQUEST_KEY_SPOTLIGHT_IDENTIFIER onDict:params]; + [self safeSetValue:preferenceHelper.universalLinkUrl forKey:BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL onDict:params]; + [self safeSetValue:preferenceHelper.initialReferrer forKey:BRANCH_REQUEST_KEY_INITIAL_REFERRER onDict:params]; + [self safeSetValue:[[BNCAppleReceipt sharedInstance] installReceipt] forKey:BRANCH_REQUEST_KEY_APPLE_RECEIPT onDict:params]; + [self safeSetValue:[NSNumber numberWithBool:[[BNCAppleReceipt sharedInstance] isTestFlight]] forKey:BRANCH_REQUEST_KEY_APPLE_TESTFLIGHT onDict:params]; + + if ([[BNCAppGroupsData shared] loadAppClipData]) { + [self safeSetValue:[BNCAppGroupsData shared].bundleID forKey:BRANCH_REQUEST_KEY_APP_CLIP_BUNDLE_ID onDict:params]; + [self safeSetValue:BNCWireFormatFromDate([BNCAppGroupsData shared].installDate) forKey:BRANCH_REQUEST_KEY_LATEST_APP_CLIP_INSTALL_TIME onDict:params]; + [self safeSetValue:[BNCAppGroupsData shared].url forKey:BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL onDict:params]; + [self safeSetValue:[BNCAppGroupsData shared].branchToken forKey:BRANCH_REQUEST_KEY_APP_CLIP_RANDOMIZED_DEVICE_TOKEN onDict:params]; + [self safeSetValue:[BNCAppGroupsData shared].bundleToken forKey:BRANCH_REQUEST_KEY_APP_CLIP_RANDOMIZED_BUNDLE_TOKEN onDict:params]; + } + + NSDictionary *partnerParameters = [[BNCPartnerParameters shared] parameterJson]; + if (partnerParameters.count > 0) { + [self safeSetValue:partnerParameters forKey:BRANCH_REQUEST_KEY_PARTNER_PARAMETERS onDict:params]; + } + + params[BRANCH_REQUEST_KEY_DEBUG] = @(preferenceHelper.isDebug); + + if ([BNCPasteboard sharedInstance].checkOnInstall) { + NSURL *pasteboardURL = nil; + if (@available(iOS 16.0, macCatalyst 16.0, *)) { + NSString *localURLString = [[BNCPreferenceHelper sharedInstance] localUrl]; + if(localURLString){ + pasteboardURL = [[NSURL alloc] initWithString:localURLString]; + super.clearLocalURL = TRUE; + } else { + pasteboardURL = [[BNCPasteboard sharedInstance] checkForBranchLink]; + } + } else { + pasteboardURL = [[BNCPasteboard sharedInstance] checkForBranchLink]; + } + + if (pasteboardURL) { + [self safeSetValue:pasteboardURL.absoluteString forKey:BRANCH_REQUEST_KEY_LOCAL_URL onDict:params]; + } + } + + NSString *appleAttributionToken = [BNCSystemObserver appleAttributionToken]; + if (appleAttributionToken) { + preferenceHelper.appleAttributionTokenChecked = YES; + [self safeSetValue:appleAttributionToken forKey:BRANCH_REQUEST_KEY_APPLE_ATTRIBUTION_TOKEN onDict:params]; + } + + BNCApplication *application = [BNCApplication currentApplication]; + params[@"lastest_update_time"] = BNCWireFormatFromDate(application.currentBuildDate); + params[@"previous_update_time"] = BNCWireFormatFromDate(preferenceHelper.previousAppBuildDate); + params[@"latest_install_time"] = BNCWireFormatFromDate(application.currentInstallDate); + params[@"first_install_time"] = BNCWireFormatFromDate(application.firstInstallDate); + params[@"update"] = [self.class appUpdateState]; - [serverInterface postRequest:params url:[[BNCServerAPI sharedInstance] installServiceURL] key:key callback:callback]; + [serverInterface postRequest:params url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_INSTALL] key:key callback:callback]; } - (NSString *)getActionName { diff --git a/BranchSDK/BranchLATDRequest.m b/BranchSDK/BranchLATDRequest.m index 330cf3cf9..adc77f325 100644 --- a/BranchSDK/BranchLATDRequest.m +++ b/BranchSDK/BranchLATDRequest.m @@ -9,8 +9,6 @@ #import "BranchLATDRequest.h" #import "BNCPreferenceHelper.h" #import "BranchConstants.h" -#import "BNCServerAPI.h" -#import "BNCRequestFactory.h" @implementation BranchLATDRequest @@ -23,19 +21,18 @@ - (instancetype)init { } - (NSString *)serverURL { - return [[BNCServerAPI sharedInstance] latdServiceURL]; + return [[BNCPreferenceHelper sharedInstance] getAPIURL:BRANCH_REQUEST_ENDPOINT_LATD]; } -- (NSMutableDictionary *)dataDictionary { +- (NSMutableDictionary *)buildRequestParams { NSMutableDictionary *params = [NSMutableDictionary new]; [params setObject:@(self.attributionWindow) forKey:@"attribution_window"]; return params; } - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { - BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; - NSDictionary *json = [factory dataForLATDWithDataDictionary:[self dataDictionary]]; - [serverInterface postRequest:json url:[self serverURL] key:key callback:callback]; + NSDictionary *params = [self buildRequestParams]; + [serverInterface postRequest:params url:[self serverURL] key:key callback:callback]; } // unused, callee handles parsing the json response diff --git a/BranchSDK/BranchOpenRequest.h b/BranchSDK/BranchOpenRequest.h index 316ae3d42..305bf4ab3 100644 --- a/BranchSDK/BranchOpenRequest.h +++ b/BranchSDK/BranchOpenRequest.h @@ -12,6 +12,7 @@ @interface BranchOpenRequest : BNCServerRequest @property (nonatomic, copy) callbackWithStatus callback; +@property (assign, nonatomic) BOOL clearLocalURL; + (void) waitForOpenResponseLock; + (void) releaseOpenResponseLock; @@ -19,5 +20,6 @@ - (id)initWithCallback:(callbackWithStatus)callback; - (id)initWithCallback:(callbackWithStatus)callback isInstall:(BOOL)isInstall; ++ (NSNumber*) appUpdateState; @end diff --git a/BranchSDK/BranchOpenRequest.m b/BranchSDK/BranchOpenRequest.m index 2b2ec894c..cb13a2ec1 100644 --- a/BranchSDK/BranchOpenRequest.m +++ b/BranchSDK/BranchOpenRequest.m @@ -7,23 +7,23 @@ // #import "BranchOpenRequest.h" +#import "BNCSystemObserver.h" #import "BranchConstants.h" +#import "NSMutableDictionary+Branch.h" #import "BNCEncodingUtils.h" +#import "BNCCrashlyticsWrapper.h" #import "Branch.h" - -// used to save one timestamp... #import "BNCApplication.h" - -// used to call SKAN based on response +#import "BNCAppleReceipt.h" #import "BNCSKAdNetwork.h" - -// handle app clip data for installs. This shouldn't be here imho #import "BNCAppGroupsData.h" - +#import "BNCPartnerParameters.h" #import "BNCLog.h" -#import "BNCRequestFactory.h" -#import "BNCServerAPI.h" +#if !TARGET_OS_TV +#import "BranchContentDiscoveryManifest.h" +#import "BranchContentDiscoverer.h" +#endif @interface BranchOpenRequest () @property (assign, nonatomic) BOOL isInstall; @@ -46,15 +46,95 @@ - (id)initWithCallback:(callbackWithStatus)callback isInstall:(BOOL)isInstall { } - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { - BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; - NSDictionary *params = [factory dataForOpen]; + self.clearLocalURL = FALSE; + NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; + + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + if (preferenceHelper.randomizedDeviceToken) { + params[BRANCH_REQUEST_KEY_RANDOMIZED_DEVICE_TOKEN] = preferenceHelper.randomizedDeviceToken; + } + + params[BRANCH_REQUEST_KEY_RANDOMIZED_BUNDLE_TOKEN] = preferenceHelper.randomizedBundleToken; + params[BRANCH_REQUEST_KEY_DEBUG] = @(preferenceHelper.isDebug); + + [self safeSetValue:[BNCSystemObserver bundleIdentifier] forKey:BRANCH_REQUEST_KEY_BUNDLE_ID onDict:params]; + [self safeSetValue:[BNCSystemObserver teamIdentifier] forKey:BRANCH_REQUEST_KEY_TEAM_ID onDict:params]; + [self safeSetValue:[BNCSystemObserver applicationVersion] forKey:BRANCH_REQUEST_KEY_APP_VERSION onDict:params]; + [self safeSetValue:[BNCSystemObserver defaultURIScheme] forKey:BRANCH_REQUEST_KEY_URI_SCHEME onDict:params]; + [self safeSetValue:preferenceHelper.linkClickIdentifier forKey:BRANCH_REQUEST_KEY_LINK_IDENTIFIER onDict:params]; + [self safeSetValue:preferenceHelper.spotlightIdentifier forKey:BRANCH_REQUEST_KEY_SPOTLIGHT_IDENTIFIER onDict:params]; + [self safeSetValue:preferenceHelper.universalLinkUrl forKey:BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL onDict:params]; + [self safeSetValue:preferenceHelper.initialReferrer forKey:BRANCH_REQUEST_KEY_INITIAL_REFERRER onDict:params]; + [self safeSetValue:preferenceHelper.externalIntentURI forKey:BRANCH_REQUEST_KEY_EXTERNAL_INTENT_URI onDict:params]; + if (preferenceHelper.limitFacebookTracking) + params[@"limit_facebook_tracking"] = (__bridge NSNumber*) kCFBooleanTrue; + + [self safeSetValue:[NSNumber numberWithBool:[[BNCAppleReceipt sharedInstance] isTestFlight]] forKey:BRANCH_REQUEST_KEY_APPLE_TESTFLIGHT onDict:params]; + +#if !TARGET_OS_TV + NSMutableDictionary *cdDict = [[NSMutableDictionary alloc] init]; + BranchContentDiscoveryManifest *contentDiscoveryManifest = [BranchContentDiscoveryManifest getInstance]; + [cdDict bnc_safeSetObject:[contentDiscoveryManifest getManifestVersion] forKey:BRANCH_MANIFEST_VERSION_KEY]; + [cdDict bnc_safeSetObject:[BNCSystemObserver bundleIdentifier] forKey:BRANCH_BUNDLE_IDENTIFIER]; + [self safeSetValue:cdDict forKey:BRANCH_CONTENT_DISCOVER_KEY onDict:params]; +#endif + + if (!preferenceHelper.appleAttributionTokenChecked) { + NSString *appleAttributionToken = [BNCSystemObserver appleAttributionToken]; + if (appleAttributionToken) { + preferenceHelper.appleAttributionTokenChecked = YES; + [self safeSetValue:appleAttributionToken forKey:BRANCH_REQUEST_KEY_APPLE_ATTRIBUTION_TOKEN onDict:params]; + } + } + + NSDictionary *partnerParameters = [[BNCPartnerParameters shared] parameterJson]; + if (partnerParameters.count > 0) { + [self safeSetValue:partnerParameters forKey:BRANCH_REQUEST_KEY_PARTNER_PARAMETERS onDict:params]; + } + + if (@available(iOS 16.0, macCatalyst 16.0, *)) { + NSString *localURLString = [[BNCPreferenceHelper sharedInstance] localUrl]; + if(localURLString){ + NSURL *localURL = [[NSURL alloc] initWithString:localURLString]; + if (localURL) { + [self safeSetValue:localURL.absoluteString forKey:BRANCH_REQUEST_KEY_LOCAL_URL onDict:params]; + self.clearLocalURL = TRUE; + } + } + } + BNCApplication *application = [BNCApplication currentApplication]; + params[@"lastest_update_time"] = BNCWireFormatFromDate(application.currentBuildDate); + params[@"previous_update_time"] = BNCWireFormatFromDate(preferenceHelper.previousAppBuildDate); + params[@"latest_install_time"] = BNCWireFormatFromDate(application.currentInstallDate); + params[@"first_install_time"] = BNCWireFormatFromDate(application.firstInstallDate); + params[@"update"] = [self.class appUpdateState]; + + if (@available(iOS 16.1, macCatalyst 16.1, *)){ + if ([BNCPreferenceHelper sharedInstance].invokeRegisterApp) { + int currentWindow = [[BNCSKAdNetwork sharedInstance] calculateSKANWindowForTime:[NSDate date]]; + if (currentWindow == BranchSkanWindowFirst){ + params[BRANCH_REQUEST_KEY_SKAN_POSTBACK_INDEX] = BRANCH_REQUEST_KEY_VALUE_POSTBACK_SEQUENCE_INDEX_0; + } else if (currentWindow == BranchSkanWindowSecond) { + params[BRANCH_REQUEST_KEY_SKAN_POSTBACK_INDEX] = BRANCH_REQUEST_KEY_VALUE_POSTBACK_SEQUENCE_INDEX_1; + } else if (currentWindow == BranchSkanWindowThird) { + params[BRANCH_REQUEST_KEY_SKAN_POSTBACK_INDEX] = BRANCH_REQUEST_KEY_VALUE_POSTBACK_SEQUENCE_INDEX_2; + } + } + } + [serverInterface postRequest:params - url:[[BNCServerAPI sharedInstance] openServiceURL] + url:[preferenceHelper + getAPIURL:BRANCH_REQUEST_ENDPOINT_OPEN] key:key callback:callback]; } +// Always send 0 ++ (NSNumber *)appUpdateState { + return @(0); +} + - (void)processResponse:(BNCServerResponse *)response error:(NSError *)error { BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; if (error && preferenceHelper.dropURLOpen) { @@ -166,6 +246,7 @@ - (void)processResponse:(BNCServerResponse *)response error:(NSError *)error { preferenceHelper.externalIntentURI = nil; preferenceHelper.referringURL = referringURL; preferenceHelper.dropURLOpen = NO; + NSString *string = BNCStringFromWireFormat(data[BRANCH_RESPONSE_KEY_RANDOMIZED_BUNDLE_TOKEN]); if (!string) { @@ -177,7 +258,22 @@ - (void)processResponse:(BNCServerResponse *)response error:(NSError *)error { preferenceHelper.randomizedBundleToken = string; } + if (self.clearLocalURL) { + preferenceHelper.localUrl = nil; +#if !TARGET_OS_TV + UIPasteboard.generalPasteboard.URL = nil; +#endif + } + [BranchOpenRequest releaseOpenResponseLock]; + +#if !TARGET_OS_TV + BranchContentDiscoveryManifest *cdManifest = [BranchContentDiscoveryManifest getInstance]; + [cdManifest onBranchInitialised:data withUrl:referringURL]; + if ([cdManifest isCDEnabled]) { + [[BranchContentDiscoverer getInstance] startDiscoveryTaskWithManifest:cdManifest]; + } +#endif if (self.isInstall) { [[BNCAppGroupsData shared] saveAppClipData]; diff --git a/BranchSDK/BranchPluginSupport.h b/BranchSDK/BranchPluginSupport.h index d2f4cfe20..1ece5e656 100644 --- a/BranchSDK/BranchPluginSupport.h +++ b/BranchSDK/BranchPluginSupport.h @@ -13,7 +13,6 @@ NS_ASSUME_NONNULL_BEGIN @interface BranchPluginSupport : NSObject + (BranchPluginSupport *)instance; - /** Sets a custom base URL for all calls to the Branch API. @param url Base URL that the Branch API will use. @@ -21,7 +20,7 @@ Sets a custom base URL for all calls to the Branch API. + (void)setAPIUrl:(NSString *)url; /** -Sets a custom CDN base URL. +Sets a custom CDN base URL @param url Base URL for CDN endpoints. */ + (void)setCDNBaseUrl:(NSString *)url; diff --git a/BranchSDK/BranchPluginSupport.m b/BranchSDK/BranchPluginSupport.m index 36b710c8b..567d31985 100644 --- a/BranchSDK/BranchPluginSupport.m +++ b/BranchSDK/BranchPluginSupport.m @@ -54,22 +54,21 @@ + (BranchPluginSupport *)instance { #pragma mark - Server URL methods -// With the change to support Apple's tracking domain feature, this API no longer works. See SDK-2118 -// Overrides base API URL + (void)setAPIUrl:(NSString *)url { if([url hasPrefix:@"http://"] || [url hasPrefix:@"https://"] ){ [[BNCPreferenceHelper sharedInstance] setBranchAPIURL:url]; } else { - BNCLogWarning(@"Ignoring invalid custom API URL"); + BNCLogWarning([NSString stringWithFormat:@"Not setting url - %@. Its invalid.", url]); + [[BNCPreferenceHelper sharedInstance] setBranchAPIURL:BNC_API_BASE_URL]; } } -// Overrides base CDN URL + (void)setCDNBaseUrl:(NSString *)url { if([url hasPrefix:@"http://"] || [url hasPrefix:@"https://"] ){ [[BNCPreferenceHelper sharedInstance] setPatternListURL:url]; } else { - BNCLogWarning(@"Ignoring invalid custom CDN URL"); + BNCLogWarning([NSString stringWithFormat:@"Not setting url - %@. Its invalid.", url]); + [[BNCPreferenceHelper sharedInstance] setPatternListURL:BNC_CDN_URL]; } } diff --git a/BranchSDK/BranchQRCode.m b/BranchSDK/BranchQRCode.m index 6000e6a1a..2aad02ea9 100644 --- a/BranchSDK/BranchQRCode.m +++ b/BranchSDK/BranchQRCode.m @@ -14,7 +14,6 @@ #import "NSError+Branch.h" #import "UIViewController+Branch.h" #import "BNCLog.h" -#import "BNCServerAPI.h" @interface BranchQRCode() @property (nonatomic, copy, readwrite) NSString *buoTitle; @@ -126,7 +125,8 @@ - (void)callQRCodeAPI:(nullable NSDictionary *)params completion:(void(^)(NSData * _Nullable qrCode, NSError * _Nullable error))completion { NSError *error; - NSString *urlString = [[BNCServerAPI sharedInstance] qrcodeServiceURL]; + NSString *branchAPIURL = [BNC_API_BASE_URL copy]; + NSString *urlString = [NSString stringWithFormat: @"%@/v1/qr-code", branchAPIURL]; NSURL *url = [NSURL URLWithString: urlString]; NSURLSession *session = [NSURLSession sharedSession]; diff --git a/BranchSDK/BranchRegisterViewRequest.h b/BranchSDK/BranchRegisterViewRequest.h new file mode 100644 index 000000000..5b17d6014 --- /dev/null +++ b/BranchSDK/BranchRegisterViewRequest.h @@ -0,0 +1,16 @@ +// +// BranchRegisterViewRequest.h +// Branch-TestBed +// +// Created by Derrick Staten on 10/16/15. +// Copyright © 2015 Branch Metrics. All rights reserved. +// + +#import "BNCServerRequest.h" +#import "Branch.h" + +@interface BranchRegisterViewRequest : BNCServerRequest + +- (id)initWithParams:(NSDictionary *)params andCallback:(callbackWithParams)callback; + +@end diff --git a/BranchSDK/BranchRegisterViewRequest.m b/BranchSDK/BranchRegisterViewRequest.m new file mode 100644 index 000000000..5b1c29de1 --- /dev/null +++ b/BranchSDK/BranchRegisterViewRequest.m @@ -0,0 +1,84 @@ +// +// BranchRegisterViewRequest.m +// Branch-TestBed +// +// Created by Derrick Staten on 10/16/15. +// Copyright © 2015 Branch Metrics. All rights reserved. +// + +#import "BranchRegisterViewRequest.h" +#import "BNCPreferenceHelper.h" +#import "BranchConstants.h" +#import "BNCSystemObserver.h" + +@interface BranchRegisterViewRequest () + +@property (strong, nonatomic) NSDictionary *params; +@property (strong, nonatomic) callbackWithParams callback; + +@end + +@implementation BranchRegisterViewRequest + +- (id)initWithParams:(NSDictionary *)params andCallback:(callbackWithParams)callback { + if ((self = [super init])) { + _params = params; + if (!_params) { + _params = [[NSDictionary alloc] init]; + } + _callback = callback; + } + + return self; +} + +- (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { + NSMutableDictionary *data = [NSMutableDictionary dictionary]; + if (self.params) { + data[BRANCH_REQUEST_KEY_URL_DATA] = [self.params copy]; + } + + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + [self safeSetValue:preferenceHelper.randomizedDeviceToken forKey:BRANCH_REQUEST_KEY_RANDOMIZED_DEVICE_TOKEN onDict:data]; + [self safeSetValue:preferenceHelper.randomizedBundleToken forKey:BRANCH_REQUEST_KEY_RANDOMIZED_BUNDLE_TOKEN onDict:data]; + [self safeSetValue:preferenceHelper.sessionID forKey:BRANCH_REQUEST_KEY_SESSION_ID onDict:data]; + [self safeSetValue:@(preferenceHelper.isDebug) forKey:BRANCH_REQUEST_KEY_DEBUG onDict:data]; + [self safeSetValue:@([BNCSystemObserver isSimulator]) forKey:BRANCH_REQUEST_KEY_IS_SIMULATOR onDict:data]; + + [self safeSetValue:[BNCSystemObserver applicationVersion] forKey:BRANCH_REQUEST_KEY_APP_VERSION onDict:data]; + + [serverInterface postRequest:data url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_REGISTER_VIEW] key:key callback:callback]; +} + +- (void)processResponse:(BNCServerResponse *)response error:(NSError *)error { + if (error) { + if (self.callback) { + self.callback([[NSDictionary alloc] init], error); + } + return; + } + + if (self.callback) { + self.callback(response.data, error); + } +} + +#pragma mark - NSCoding methods + +- (id)initWithCoder:(NSCoder *)decoder { + if ((self = [super initWithCoder:decoder])) { + _params = [decoder decodeObjectOfClass:NSDictionary.class forKey:@"params"]; + } + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + [coder encodeObject:self.params forKey:@"params"]; +} + ++ (BOOL)supportsSecureCoding { + return YES; +} + +@end diff --git a/BranchSDK/BranchShortUrlRequest.m b/BranchSDK/BranchShortUrlRequest.m index 7ce0400f2..a597f9124 100644 --- a/BranchSDK/BranchShortUrlRequest.m +++ b/BranchSDK/BranchShortUrlRequest.m @@ -11,8 +11,6 @@ #import "BNCEncodingUtils.h" #import "BranchConstants.h" #import "BNCConfig.h" -#import "BNCRequestFactory.h" -#import "BNCServerAPI.h" @interface BranchShortUrlRequest () @@ -56,12 +54,18 @@ - (id)initWithTags:(NSArray *)tags alias:(NSString *)alias type:(BranchLinkType) - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { - - BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; - NSDictionary *json = [factory dataForShortURLWithLinkDataDictionary:[self.linkData.data mutableCopy] isSpotlightRequest:self.isSpotlightRequest]; + NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithDictionary:self.linkData.data]; + + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + if (!preferenceHelper.trackingDisabled) { + params[BRANCH_REQUEST_KEY_RANDOMIZED_DEVICE_TOKEN] = preferenceHelper.randomizedDeviceToken; + if (!_isSpotlightRequest) + params[BRANCH_REQUEST_KEY_RANDOMIZED_BUNDLE_TOKEN] = preferenceHelper.randomizedBundleToken; + params[BRANCH_REQUEST_KEY_SESSION_ID] = preferenceHelper.sessionID; + } - [serverInterface postRequest:json - url:[[BNCServerAPI sharedInstance] linkServiceURL] + [serverInterface postRequest:params + url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL] key:key callback:callback]; } diff --git a/BranchSDK/BranchShortUrlSyncRequest.m b/BranchSDK/BranchShortUrlSyncRequest.m index 2526af572..84939f4a1 100644 --- a/BranchSDK/BranchShortUrlSyncRequest.m +++ b/BranchSDK/BranchShortUrlSyncRequest.m @@ -12,8 +12,6 @@ #import "BranchConstants.h" #import "BNCConfig.h" #import "BNCLog.h" -#import "BNCRequestFactory.h" -#import "BNCServerAPI.h" @interface BranchShortUrlSyncRequest () @@ -52,11 +50,17 @@ - (id)initWithTags:(NSArray *)tags alias:(NSString *)alias type:(BranchLinkType) } - (BNCServerResponse *)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key { - BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; - NSDictionary *json = [factory dataForShortURLWithLinkDataDictionary:[self.linkData.data mutableCopy] isSpotlightRequest:NO]; + NSMutableDictionary *params = [[NSMutableDictionary alloc] initWithDictionary:self.linkData.data]; + + BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; + if (!preferenceHelper.trackingDisabled) { + params[BRANCH_REQUEST_KEY_RANDOMIZED_DEVICE_TOKEN] = preferenceHelper.randomizedDeviceToken; + params[BRANCH_REQUEST_KEY_RANDOMIZED_BUNDLE_TOKEN] = preferenceHelper.randomizedBundleToken; + params[BRANCH_REQUEST_KEY_SESSION_ID] = preferenceHelper.sessionID; + } - return [serverInterface postRequestSynchronous:json - url:[[BNCServerAPI sharedInstance] linkServiceURL] + return [serverInterface postRequestSynchronous:params + url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL] key:key]; } diff --git a/BranchSDK/BranchUniversalObject.m b/BranchSDK/BranchUniversalObject.m index fb771747b..0311b1237 100644 --- a/BranchSDK/BranchUniversalObject.m +++ b/BranchSDK/BranchUniversalObject.m @@ -519,6 +519,7 @@ - (void) removeFromSpotlightWithCallback:(void (^_Nullable)(NSError * _Nullable #pragma mark - Dictionary Methods - (NSDictionary *)getParamsForServerRequestWithAddedLinkProperties:(BranchLinkProperties *)linkProperties { + // TODO: Add warnings if controlParams contains non-control params NSMutableDictionary *temp = self.dictionary; [temp addEntriesFromDictionary:[linkProperties.controlParams copy]]; return temp; diff --git a/ChangeLog.md b/ChangeLog.md index 4d3aa4a2f..c3b4dc1dc 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,26 +1,5 @@ Branch iOS SDK Change Log -V.3.0.0 - -- Add a Privacy Manifest for the Branch SDK. App developers may need add an App level Privacy Manifest for data they collect and pass into the Branch SDK. - - Known Issue: When using cocoapods without the `use_frameworks!` option, the build can fail with a duplicate privacy manifest error. Workaround is to manually merge privacy manifests. -- Add support for a tracking domain. When Ads tracking is enabled, the SDK sends event calls to a tracking domain. -- iOS 12 is now the min version -- Xcode 15 is now the min version -- Fix short URL creation via a sharesheet when tracking is disabled -- Add macCatalyst checks -- SetIdentity and Logout are now handled device side -- Remove deprecated code and some data minimization - - Cross Platform ID - - Credits and Referrals - - Close requests - - Facebook App Links - - pre-iOS 14 tracking status. This is always `false` on recent iOS versions. - - Tune data upgrade check - - v1 Branch Events, all events are now v2 Branch Events - - pre-iOS 10 locale support - - Device carrier. This was used for fraud analysis, but is no longer available on new iOS versions. - V.2.2.1 Branch iOS SDK 2.2.1 adds parameter for current SKAN 4.0 Window in /v1/open and /v2/event requests. diff --git a/Framework/BranchSDK.h b/Framework/BranchSDK.h index bc23920bd..df72d63e2 100644 --- a/Framework/BranchSDK.h +++ b/Framework/BranchSDK.h @@ -25,6 +25,7 @@ FOUNDATION_EXPORT const unsigned char BranchSDKVersionString[]; #import #import +#import #import #import diff --git a/Gemfile b/Gemfile index 2e36ecb83..b5b6c319e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,6 @@ source 'https://rubygems.org' gem 'cocoapods', '~> 1.9' -gem 'activesupport', '~> 7.0', '<= 7.0.8' gem 'fastlane', '~> 2.69' gem 'pattern_patch', '~> 0.5' gem 'slather' diff --git a/Package.swift b/Package.swift index 95d907d84..6d66f9c42 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -13,15 +13,10 @@ let package = Package( name: "BranchSDK", targets: ["BranchSDK"]), ], - dependencies: [ - ], targets: [ .target( name: "BranchSDK", path: "BranchSDK", - resources: [ - .copy("PrivacyInfo.xcprivacy"), - ], publicHeadersPath: "", linkerSettings: [ .linkedFramework("CoreServices"),