diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m b/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m index 3740e9e8f..5f70fcb68 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCAPIServerTest.m @@ -13,109 +13,361 @@ #import "BranchConstants.h" @interface BNCAPIServerTest : XCTestCase -@property (nonatomic, strong, readwrite) BNCServerAPI *serverAPI; -@property (nonatomic, strong, readwrite) NSString *optedInStatus; + @end @implementation BNCAPIServerTest -- (void)setUp { - self.serverAPI = [BNCServerAPI sharedInstance]; - self.optedInStatus = [BNCSystemObserver attOptedInStatus]; +- (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)testGetBaseURLWithVersion { +- (void)testOpenServiceURL { + BNCServerAPI *serverAPI = [BNCServerAPI new]; + serverAPI.automaticallyEnableTrackingDomain = NO; - NSString *urlStr = [[BNCServerAPI sharedInstance] getBaseURLWithVersion]; - NSString *expectedUrlStr; + NSString *url = [serverAPI openServiceURL]; + NSString *expectedUrlStr = @"https://api3.branch.io/v1/open"; - 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]; - } + XCTAssertTrue([url isEqualToString:expectedUrlStr]); +} + +- (void)testStandardEventServiceURL { + BNCServerAPI *serverAPI = [BNCServerAPI new]; + serverAPI.automaticallyEnableTrackingDomain = NO; - XCTAssertTrue([urlStr isEqualToString:expectedUrlStr]); + NSString *url = [serverAPI standardEventServiceURL]; + NSString *expectedUrlStr = @"https://api3.branch.io/v2/event/standard"; - [self.serverAPI setUseEUServers:true]; - urlStr = [[BNCServerAPI sharedInstance] getBaseURLWithVersion]; + XCTAssertTrue([url isEqualToString:expectedUrlStr]); +} + +- (void)testCustomEventServiceURL { + BNCServerAPI *serverAPI = [BNCServerAPI new]; + serverAPI.automaticallyEnableTrackingDomain = NO; - 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]; - } + NSString *url = [serverAPI customEventServiceURL]; + NSString *expectedUrlStr = @"https://api3.branch.io/v2/event/custom"; - XCTAssertTrue([urlStr isEqualToString:expectedUrlStr]); - [self.serverAPI setUseEUServers:false]; + XCTAssertTrue([url isEqualToString:expectedUrlStr]); } -- (void)testInstallServiceURL { - NSURL *url; - NSString *expectedUrlStr; +- (void)testLinkServiceURL { + BNCServerAPI *serverAPI = [BNCServerAPI new]; + serverAPI.automaticallyEnableTrackingDomain = NO; - [self.serverAPI setUseEUServers:true]; - url = [[BNCServerAPI sharedInstance] installServiceURL]; + NSString *url = [serverAPI linkServiceURL]; + NSString *expectedUrlStr = @"https://api3.branch.io/v1/url"; + + XCTAssertTrue([url isEqualToString:expectedUrlStr]); +} + +- (void)testQRCodeServiceURL { + BNCServerAPI *serverAPI = [BNCServerAPI new]; + serverAPI.automaticallyEnableTrackingDomain = NO; - 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]; - } + NSString *url = [serverAPI qrcodeServiceURL]; + NSString *expectedUrlStr = @"https://api3.branch.io/v1/qr-code"; - XCTAssertTrue([url isEqual:[ NSURL URLWithString:expectedUrlStr]]); - [self.serverAPI setUseEUServers:false]; + XCTAssertTrue([url isEqualToString:expectedUrlStr]); } -- (void)testOpenServiceURL { - NSURL *url; - NSString *expectedUrlStr; +- (void)testLATDServiceURL { + BNCServerAPI *serverAPI = [BNCServerAPI new]; + serverAPI.automaticallyEnableTrackingDomain = NO; + + NSString *url = [serverAPI latdServiceURL]; + NSString *expectedUrlStr = @"https://api3.branch.io/v1/cpid/latd"; - [self.serverAPI setUseEUServers:true]; - url = [[BNCServerAPI sharedInstance] openServiceURL]; + XCTAssertTrue([url isEqualToString:expectedUrlStr]); +} + +- (void)testValidationServiceURL { + BNCServerAPI *serverAPI = [BNCServerAPI new]; + serverAPI.automaticallyEnableTrackingDomain = NO; - 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]; - } + NSString *url = [serverAPI validationServiceURL]; + NSString *expectedUrlPrefix= @"https://api3.branch.io/v1/app-link-settings"; - XCTAssertTrue([url isEqual:[ NSURL URLWithString:expectedUrlStr]]); - [self.serverAPI setUseEUServers:false]; + XCTAssertTrue([url hasPrefix:expectedUrlPrefix]); } -- (void)testEventServiceURL { - NSURL *url; - NSString *expectedUrlStr; +- (void)testInstallServiceURL_Tracking { + BNCServerAPI *serverAPI = [BNCServerAPI new]; + serverAPI.automaticallyEnableTrackingDomain = NO; + serverAPI.useTrackingDomain = YES; - [self.serverAPI setUseEUServers:true]; - url = [[BNCServerAPI sharedInstance] eventServiceURL]; + 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; - 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]; - } + NSString *url = [serverAPI openServiceURL]; + NSString *expectedUrlStr = @"https://api-safetrack.branch.io/v1/open"; - XCTAssertTrue([url isEqual:[ NSURL URLWithString:expectedUrlStr]]); - [self.serverAPI setUseEUServers:false]; + XCTAssertTrue([url isEqualToString:expectedUrlStr]); } -- (void)testLinkServiceURL { - NSURL *url; - NSString *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; - [self.serverAPI setUseEUServers:true]; - url = [[BNCServerAPI sharedInstance] linkServiceURL]; + NSString *url = [serverAPI customEventServiceURL]; + NSString *expectedUrlStr = @"https://api-safetrack.branch.io/v2/event/custom"; - 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 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"; + + 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"; + + 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"; + + XCTAssertTrue([url hasPrefix:expectedUrlPrefix]); +} + +- (void)testInstallServiceURL_EUTracking { + BNCServerAPI *serverAPI = [BNCServerAPI new]; + serverAPI.automaticallyEnableTrackingDomain = NO; + serverAPI.useEUServers = YES; + serverAPI.useTrackingDomain = YES; + + NSString *url = [serverAPI installServiceURL]; + NSString *expectedUrlStr = @"https://api-safetrack-eu.branch.io/v1/install"; + + 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"; + + XCTAssertTrue([url isEqualToString:expectedUrlStr]); +} + +- (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"; + + 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"; + + 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"; + + XCTAssertTrue([url isEqualToString:expectedUrlStr]); +} + +- (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"; + + 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"; + + 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"; - XCTAssertTrue([url isEqual:[ NSURL URLWithString:expectedUrlStr]]); - [self.serverAPI setUseEUServers:false]; + XCTAssertTrue([url hasPrefix:expectedUrlPrefix]); } @end diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m index 4660d2c43..faff0ef96 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCAppleReceiptTests.m @@ -25,7 +25,8 @@ - (void)tearDown { - (void)testReceiptOnSimulator { BNCAppleReceipt *receipt = [[BNCAppleReceipt alloc] init]; - XCTAssertNil([receipt installReceipt]); + // Appears the simulator can have a receipt + //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 e28563f13..fdbe51220 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCDeviceInfoTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCDeviceInfoTests.m @@ -82,11 +82,6 @@ - (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); @@ -192,16 +187,4 @@ - (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 a16b4e224..e1a12126e 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCPreferenceHelperTests.m @@ -52,6 +52,8 @@ - (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]); @@ -59,17 +61,7 @@ - (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; @@ -210,6 +202,7 @@ - (void)testURLSkipList { XCTAssert([filterDesc isEqualToString:valueDesc]); } +/* - (void)testSetAPIURL_Example { NSString *url = @"https://www.example.com/"; @@ -265,5 +258,6 @@ - (void)testSetCDNBaseURL_InvalidEmpty { XCTAssert(![urlStored isEqualToString:@""]); XCTAssert([urlStored isEqualToString:BNC_CDN_URL]); } + */ @end diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCRequestFactoryTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCRequestFactoryTests.m new file mode 100644 index 000000000..c7eb51a09 --- /dev/null +++ b/Branch-TestBed/Branch-SDK-Tests/BNCRequestFactoryTests.m @@ -0,0 +1,195 @@ +// +// BNCRequestFactoryTests.m +// Branch-SDK-Tests +// +// Created by Ernest Cho on 8/21/23. +// Copyright © 2023 Branch, Inc. All rights reserved. +// + +#import +#import "BNCRequestFactory.h" + +@interface BNCRequestFactoryTests : XCTestCase + +@end + +@implementation BNCRequestFactoryTests + +- (void)setUp { + +} + +- (void)tearDown { + +} + +- (void)testInitWithBranchKeyNil { + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:nil]; + NSDictionary *json = [factory dataForInstall]; + XCTAssertNotNil(json); + + // key is omitted when nil + XCTAssertNil([json objectForKey:@"branch_key"]); +} + +- (void)testInitWithBranchKeyEmpty { + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@""]; + NSDictionary *json = [factory dataForInstall]; + XCTAssertNotNil(json); + + // empty string is allowed + XCTAssertTrue([@"" isEqualToString:[json objectForKey:@"branch_key"]]); +} + +- (void)testInitWithBranchKey { + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForInstall]; + XCTAssertNotNil(json); + XCTAssertTrue([@"key_abcd" isEqualToString:[json objectForKey:@"branch_key"]]); +} + +- (void)testDataForInstall { + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForInstall]; + XCTAssertNotNil(json); + + XCTAssertTrue([@"key_abcd" isEqualToString:[json objectForKey:@"branch_key"]]); + XCTAssertNotNil([json objectForKey:@"sdk"]); + XCTAssertTrue([@"Apple" isEqualToString:[json objectForKey:@"brand"]]); + XCTAssertNotNil([json objectForKey:@"ios_vendor_id"]); + + // not present on installs + XCTAssertNil([json objectForKey:@"randomized_bundle_token"]); +} + +- (void)testDataForOpen { + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForOpen]; + XCTAssertNotNil(json); + + XCTAssertTrue([@"key_abcd" isEqualToString:[json objectForKey:@"branch_key"]]); + XCTAssertNotNil([json objectForKey:@"sdk"]); + XCTAssertTrue([@"Apple" isEqualToString:[json objectForKey:@"brand"]]); + XCTAssertNotNil([json objectForKey:@"ios_vendor_id"]); + + // Present only on opens. Assumes test runs after the host app completes an install. + // This is not a reliable assumption on test runners + //XCTAssertNotNil([json objectForKey:@"randomized_bundle_token"]); +} + +- (void)testDataForEvent { + NSDictionary *event = @{@"name": @"ADD_TO_CART"}; + + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForEventWithEventDictionary:[event mutableCopy]]; + XCTAssertNotNil(json); + + XCTAssertTrue([@"ADD_TO_CART" isEqualToString:[json objectForKey:@"name"]]); + + NSDictionary *userData = [json objectForKey:@"user_data"]; + XCTAssertNotNil(userData); + XCTAssertNotNil([userData objectForKey:@"idfv"]); +} + +- (void)testDataForEventWithContentItem { + NSDictionary *event = @{ + @"name": @"ADD_TO_CART", + @"content_items": @[ + @{ + @"$og_title": @"TestTitle", + @"$quantity": @(2), + @"$product_name": @"TestProduct", + @"$price": @(10) + } + ] + }; + + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForEventWithEventDictionary:[event mutableCopy]]; + XCTAssertNotNil(json); + + XCTAssertTrue([@"ADD_TO_CART" isEqualToString:[json objectForKey:@"name"]]); + + NSDictionary *contentItems = [json objectForKey:@"content_items"]; + XCTAssertNotNil(contentItems); + XCTAssertTrue(contentItems.count == 1); + + NSDictionary *userData = [json objectForKey:@"user_data"]; + XCTAssertNotNil(userData); + XCTAssertNotNil([userData objectForKey:@"idfv"]); +} + +- (void)testDataForEventWithTwoContentItem { + NSDictionary *event = @{ + @"name": @"ADD_TO_CART", + @"content_items": @[ + @{ + @"$og_title": @"TestTitle1", + @"$quantity": @(2), + @"$product_name": @"TestProduct1", + @"$price": @(10) + }, + @{ + @"$og_title": @"TestTitle2", + @"$quantity": @(3), + @"$product_name": @"TestProduct2", + @"$price": @(20) + } + ] + }; + + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForEventWithEventDictionary:[event mutableCopy]]; + XCTAssertNotNil(json); + + XCTAssertTrue([@"ADD_TO_CART" isEqualToString:[json objectForKey:@"name"]]); + + NSDictionary *contentItems = [json objectForKey:@"content_items"]; + XCTAssertNotNil(contentItems); + XCTAssertTrue(contentItems.count == 2); + + NSDictionary *userData = [json objectForKey:@"user_data"]; + XCTAssertNotNil(userData); + XCTAssertNotNil([userData objectForKey:@"idfv"]); +} + +- (void)testDataForEventEmpty { + NSDictionary *event = @{}; + + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForEventWithEventDictionary:[event mutableCopy]]; + XCTAssertNotNil(json); + + XCTAssertNil([json objectForKey:@"name"]); + + NSDictionary *userData = [json objectForKey:@"user_data"]; + XCTAssertNotNil(userData); + XCTAssertNotNil([userData objectForKey:@"idfv"]); +} + +- (void)testDataForEventNil { + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForEventWithEventDictionary:nil]; + XCTAssertNotNil(json); + + XCTAssertNil([json objectForKey:@"name"]); + + NSDictionary *userData = [json objectForKey:@"user_data"]; + XCTAssertNotNil(userData); + XCTAssertNotNil([userData objectForKey:@"idfv"]); +} + + +- (void)testDataForShortURL { + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForInstall]; + XCTAssertNotNil(json); +} + +- (void)testDataForLATD { + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:@"key_abcd"]; + NSDictionary *json = [factory dataForInstall]; + XCTAssertNotNil(json); +} + +@end diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCServerInterface.Test.m b/Branch-TestBed/Branch-SDK-Tests/BNCServerInterface.Test.m index 23436a4a2..c2b220f93 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCServerInterface.Test.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCServerInterface.Test.m @@ -347,52 +347,6 @@ - (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 ee736b062..9ca55fd3b 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueOldTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueOldTests.m @@ -9,7 +9,6 @@ #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 af286b38a..4d8664b82 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m @@ -9,7 +9,6 @@ #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 90c483959..2eb3cb282 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCSystemObserverTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCSystemObserverTests.m @@ -77,10 +77,6 @@ - (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 42dfa1af5..bc9c797f6 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCURLFilterTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCURLFilterTests.m @@ -32,16 +32,19 @@ - (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 == 6); + XCTAssertTrue(list.count > 0); [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 deleted file mode 100644 index 1c21afed9..000000000 --- a/Branch-TestBed/Branch-SDK-Tests/BranchCrossPlatformIDTests.m +++ /dev/null @@ -1,108 +0,0 @@ -// -// 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 7ea82607b..fa9ce3a57 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchEvent.Test.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchEvent.Test.m @@ -52,124 +52,6 @@ - (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 e38a25ef4..9b4cf8990 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchInstallRequestTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchInstallRequestTests.m @@ -31,84 +31,6 @@ - (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 f41a2fbae..b5059db9d 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchOpenRequestTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchOpenRequestTests.m @@ -32,153 +32,6 @@ - (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 858edb8ed..e48b545f3 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchSDKFunctionalityTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchSDKFunctionalityTests.m @@ -73,138 +73,6 @@ - (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/BranchSetIdentityTests.m similarity index 95% rename from Branch-TestBed/Branch-SDK-Tests/BranchSetIdentityRequestTests.m rename to Branch-TestBed/Branch-SDK-Tests/BranchSetIdentityTests.m index c6b156661..21516c288 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BranchSetIdentityRequestTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BranchSetIdentityTests.m @@ -14,10 +14,10 @@ static NSString * const IDENTITY_TEST_USER_ID = @"foo_id"; -@interface BranchSetIdentityRequestTests : BNCTestCase +@interface BranchSetIdentityTests : BNCTestCase @end -@implementation BranchSetIdentityRequestTests +@implementation BranchSetIdentityTests #pragma mark - setIdentity Tests - (void)testSetIdentityWithCallback { diff --git a/Branch-TestBed/Branch-SDK-Unhosted-Tests/BNCServerInterfaceTests.m b/Branch-TestBed/Branch-SDK-Unhosted-Tests/BNCServerInterfaceTests.m deleted file mode 100644 index b210a0b09..000000000 --- a/Branch-TestBed/Branch-SDK-Unhosted-Tests/BNCServerInterfaceTests.m +++ /dev/null @@ -1,67 +0,0 @@ -// -// 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 2fd876ee2..b9ca2c58f 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 /* BranchSetIdentityRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D16837B2098C901008819E3 /* BranchSetIdentityRequestTests.m */; }; + 4D1683A62098C902008819E3 /* BranchSetIdentityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D16837B2098C901008819E3 /* BranchSetIdentityTests.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,10 +44,8 @@ 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 */; }; @@ -100,7 +98,6 @@ 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 */; }; @@ -115,18 +112,14 @@ 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 */; }; @@ -141,8 +134,6 @@ 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 */; }; @@ -150,7 +141,6 @@ 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 */; }; @@ -160,6 +150,7 @@ 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 */; }; @@ -170,8 +161,6 @@ 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 */; }; @@ -187,24 +176,15 @@ 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 */; }; @@ -219,6 +199,8 @@ 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 */; }; @@ -229,9 +211,7 @@ 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 */; }; @@ -261,6 +241,7 @@ 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 */; }; @@ -335,6 +316,7 @@ 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 = ""; }; @@ -346,7 +328,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 /* BranchSetIdentityRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchSetIdentityRequestTests.m; sourceTree = ""; }; + 4D16837B2098C901008819E3 /* BranchSetIdentityTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchSetIdentityTests.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 = ""; }; @@ -359,10 +341,8 @@ 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 = ""; }; @@ -423,18 +403,14 @@ 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 = ""; }; @@ -449,8 +425,6 @@ 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 = ""; }; @@ -458,7 +432,6 @@ 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 = ""; }; @@ -468,6 +441,8 @@ 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 = ""; }; @@ -479,8 +454,6 @@ 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 = ""; }; @@ -495,24 +468,15 @@ 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 = ""; }; @@ -527,6 +491,7 @@ 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 = ""; }; @@ -556,7 +521,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; }; - 6F8346B3671BEF4D5274161E /* libPods-Branch-SDK-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Branch-SDK-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 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 = ""; }; 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 = ""; }; @@ -567,8 +532,6 @@ 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 = ""; }; @@ -610,6 +573,7 @@ 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 */ @@ -620,6 +584,7 @@ 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 */, @@ -647,7 +612,6 @@ 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 */, @@ -660,7 +624,7 @@ files = ( 4DD056122177A65C009BD3DD /* libOCMock.a in Frameworks */, 4DD056142177A65C009BD3DD /* libOHHTTPStubs.a in Frameworks */, - 6EF9E0CC67B914F9A632E6F2 /* libPods-Branch-SDK-Tests.a in Frameworks */, + CE09D25C88071212954A776D /* libPods-Branch-SDK-Tests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -678,6 +642,7 @@ 4D16837A2098C901008819E3 /* Branch-SDK-Tests */ = { isa = PBXGroup; children = ( + E7A728BC2AA9A112009343B7 /* BNCAPIServerTest.m */, 5FC7326F22DD1F93006E6FBC /* BNCAppleReceiptTests.m */, 4D1683972098C901008819E3 /* BNCApplication.Test.m */, 4D7881FB209CF2D4002B750F /* BNCApplication+BNCTest.h */, @@ -700,6 +665,7 @@ 4D1683A02098C901008819E3 /* BNCPreferenceHelperTests.m */, 5F92B23323835FEB00CA909B /* BNCReachabilityTests.m */, C1CC888129BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m */, + 5FC20E722A93D85F00D9E1C8 /* BNCRequestFactoryTests.m */, 4D16837E2098C901008819E3 /* BNCServerInterface.Test.m */, 4D16837D2098C901008819E3 /* BNCServerRequestQueueOldTests.m */, 5FB6CC12264F0C7C0020E478 /* BNCServerRequestQueueTests.m */, @@ -709,11 +675,10 @@ 4D16838D2098C901008819E3 /* BNCTestCase.m */, 4D7881F9209CF2D4002B750F /* BNCTestCase.strings */, 4D7881FA209CF2D4002B750F /* BNCTestCase.Test.m */, - 4D16838C2098C901008819E3 /* BNCURLFilterTests.m */, 5FCF7EAC29DC96A7008D629E /* BNCURLFilterSkiplistUpgradeTests.m */, + 4D16838C2098C901008819E3 /* BNCURLFilterTests.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 */, @@ -724,10 +689,8 @@ C10F393927A0872800BF5D36 /* BranchPluginSupportTests.m */, C12320B42808DB90007771C0 /* BranchQRCodeTests.m */, 4D1683862098C901008819E3 /* BranchSDKFunctionalityTests.m */, - 4D16837B2098C901008819E3 /* BranchSetIdentityRequestTests.m */, + 4D16837B2098C901008819E3 /* BranchSetIdentityTests.m */, C10C61A9282481FB00761D7E /* BranchShareLinkTests.m */, - 4D1683912098C901008819E3 /* BranchShortUrlRequestTests.m */, - 4D1683942098C901008819E3 /* BranchShortUrlSyncRequestTests.m */, 4D1683962098C901008819E3 /* BranchUniversalObject.Test.m */, 4AB16367239E3A2700D42931 /* DispatchToIsolationQueueTests.m */, 4D16839F2098C901008819E3 /* Info.plist */, @@ -735,6 +698,7 @@ 4D16839E2098C901008819E3 /* NSString+Branch.Test.m */, E7A728BC2AA9A112009343B7 /* BNCAPIServerTest.m */, C15CC9DD2ABCB549003CC339 /* BNCCurrencyTests.m */, + ); path = "Branch-SDK-Tests"; sourceTree = ""; @@ -756,19 +720,9 @@ 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 */, @@ -781,18 +735,9 @@ 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 = ""; @@ -811,7 +756,7 @@ 5FC4CF7D24860C320001E701 /* cannedData */, 670016621940F51400A9E103 /* Frameworks */, 670016611940F51400A9E103 /* Products */, - 4E9E42B169DC1CF6F46E29F7 /* Pods */, + D7B9BBDAF01EEBE97D55F0AF /* Pods */, ); sourceTree = ""; }; @@ -830,6 +775,7 @@ 670016621940F51400A9E103 /* Frameworks */ = { isa = PBXGroup; children = ( + 5FF7D2852A9549B40049158D /* AdServices.framework */, C1614D55285BC8A00098946B /* LinkPresentation.framework */, 5F42763225DB3694005B9BBC /* AdServices.framework */, 5FDB04EF24E4D27000F2F267 /* StoreKit.framework */, @@ -846,7 +792,7 @@ 670016631940F51400A9E103 /* Foundation.framework */, 670016651940F51400A9E103 /* CoreGraphics.framework */, 670016671940F51400A9E103 /* UIKit.framework */, - 6F8346B3671BEF4D5274161E /* libPods-Branch-SDK-Tests.a */, + F2C896423B99BFA2E8B0E4D6 /* libPods-Branch-SDK-Tests.a */, ); name = Frameworks; sourceTree = ""; @@ -902,12 +848,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 */, @@ -942,12 +888,18 @@ 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 */, @@ -976,8 +928,6 @@ 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 */, @@ -986,10 +936,6 @@ 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 */, @@ -1015,8 +961,6 @@ C1614D5B285BD4AF0098946B /* BranchPluginSupport.m */, C12320B6280E2060007771C0 /* BranchQRCode.h */, C12320B8280E2091007771C0 /* BranchQRCode.m */, - 5F3801F324DCC2E500E6FAFD /* BranchRegisterViewRequest.h */, - 5F3801E524DCC2E300E6FAFD /* BranchRegisterViewRequest.m */, 5F32D7C1242AC338000DE539 /* BranchScene.h */, 5F32D7C2242AC338000DE539 /* BranchScene.m */, 4DB567311E79F46000A8A324 /* BranchShareLink.h */, @@ -1037,15 +981,20 @@ 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 */ @@ -1059,7 +1008,6 @@ 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 */, @@ -1091,8 +1039,6 @@ 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 */, @@ -1124,9 +1070,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 */, @@ -1195,7 +1141,7 @@ isa = PBXNativeTarget; buildConfigurationList = 7E6B3B571AA42D0E005F45BF /* Build configuration list for PBXNativeTarget "Branch-SDK-Tests" */; buildPhases = ( - 40DD88C9D6295C210BC1F5C7 /* [CP] Check Pods Manifest.lock */, + BF36CDEC6A8D1A1CF5E669A4 /* [CP] Check Pods Manifest.lock */, 7E6B3B4D1AA42D0E005F45BF /* Sources */, 7E6B3B4E1AA42D0E005F45BF /* Frameworks */, 7E6B3B4F1AA42D0E005F45BF /* Resources */, @@ -1313,7 +1259,6 @@ 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; @@ -1323,18 +1268,9 @@ 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 */, ); @@ -1367,7 +1303,7 @@ shellPath = /bin/sh; shellScript = "xcrun simctl terminate booted io.branch.sdk.Branch-TestBed\nxcrun simctl uninstall booted io.branch.sdk.Branch-TestBed\n"; }; - 40DD88C9D6295C210BC1F5C7 /* [CP] Check Pods Manifest.lock */ = { + BF36CDEC6A8D1A1CF5E669A4 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1403,7 +1339,6 @@ 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 */, @@ -1429,22 +1364,20 @@ 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 */, @@ -1479,7 +1412,6 @@ 5F67F48E228F535500067429 /* BNCEncodingUtilsTests.m in Sources */, 5F8B7B4721B5F5F0009CE0A6 /* Branch_setBranchKeyTests.m in Sources */, 5F3D671C233062FD00454FF1 /* BNCJsonLoader.m in Sources */, - 5FC7327722DE9A44006E6FBC /* BNCServerInterfaceTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1508,9 +1440,9 @@ 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 */, @@ -1522,14 +1454,12 @@ 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 */, @@ -1544,7 +1474,7 @@ 5F892EC5236116CD0023AEC1 /* NSErrorBranchCategoryTests.m in Sources */, 4D1683AA2098C902008819E3 /* BranchOpenRequestTests.m in Sources */, 4D1683A82098C902008819E3 /* BNCServerRequestQueueOldTests.m in Sources */, - 4D1683A62098C902008819E3 /* BranchSetIdentityRequestTests.m in Sources */, + 4D1683A62098C902008819E3 /* BranchSetIdentityTests.m in Sources */, 4D1683BC2098C902008819E3 /* BranchDelegate.Test.m in Sources */, 4D1683B62098C902008819E3 /* BNCURLFilterTests.m in Sources */, C10C61AA282481FB00761D7E /* BranchShareLinkTests.m in Sources */, @@ -1864,7 +1794,7 @@ }; 7E6B3B581AA42D0E005F45BF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 90CAF8DC43EFE0F2055286FE /* Pods-Branch-SDK-Tests.debug.xcconfig */; + baseConfigurationReference = 130D24DFC422D39DC8CB96CC /* Pods-Branch-SDK-Tests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_WARN_UNREACHABLE_CODE = YES; @@ -1890,7 +1820,7 @@ }; 7E6B3B591AA42D0E005F45BF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8FB246ACB97F3D73F28A4536 /* Pods-Branch-SDK-Tests.release.xcconfig */; + baseConfigurationReference = 713E79E4D7BF588897570949 /* 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 deleted file mode 100644 index f6190ab4c..000000000 --- a/Branch-TestBed/cannedData/cpid.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "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 deleted file mode 100644 index 74bc3ffbe..000000000 --- a/Branch-TestBed/cannedData/cpid_empty_dev_id.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "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 deleted file mode 100644 index 26c8e8bcc..000000000 --- a/Branch-TestBed/cannedData/cpid_empty_id.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "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 deleted file mode 100644 index c28561223..000000000 --- a/Branch-TestBed/cannedData/cpid_empty_past.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "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 deleted file mode 100644 index 7cf595679..000000000 --- a/Branch-TestBed/cannedData/cpid_empty_prob.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "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 deleted file mode 100644 index 749763585..000000000 --- a/Branch-TestBed/cannedData/cpid_missing_dev_id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index f20297036..000000000 --- a/Branch-TestBed/cannedData/cpid_missing_id.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "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 deleted file mode 100644 index c9f77ff11..000000000 --- a/Branch-TestBed/cannedData/cpid_missing_past.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "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 deleted file mode 100644 index 5a8ab5b6b..000000000 --- a/Branch-TestBed/cannedData/cpid_missing_prob.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "user_data": { - "developer_identity": "test@branch.io", - "cross_platform_id": "273e4c5da13b978ee2f78f8997abd972959c184aaffb8cad716721a00a08d32b", - "past_cross_platform_ids": [ - "a0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20", - "z0bd175fd2c45b1cad81df45d5f1ddb117eadc98e61b85bb49f8f13e88ceff20" - ] - } -} diff --git a/BranchSDK.xcodeproj/project.pbxproj b/BranchSDK.xcodeproj/project.pbxproj index d22b3d804..26ccae7a7 100644 --- a/BranchSDK.xcodeproj/project.pbxproj +++ b/BranchSDK.xcodeproj/project.pbxproj @@ -64,7 +64,6 @@ 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 */; }; @@ -89,14 +88,11 @@ 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, ); }; }; @@ -115,7 +111,6 @@ 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 */; }; @@ -125,7 +120,6 @@ 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, ); }; }; @@ -150,7 +144,6 @@ 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 */; }; @@ -191,7 +184,6 @@ 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 */; }; @@ -203,6 +195,12 @@ 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 */; }; @@ -243,10 +241,7 @@ 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, ); }; }; @@ -258,7 +253,6 @@ 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 */; }; @@ -301,10 +295,7 @@ 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 */; }; @@ -315,7 +306,6 @@ 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 */; }; @@ -364,13 +354,10 @@ 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 */; }; @@ -382,7 +369,6 @@ 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 */; }; @@ -433,13 +419,10 @@ 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, ); }; }; @@ -452,7 +435,6 @@ 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 */; }; @@ -550,7 +532,6 @@ 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 = ""; }; @@ -575,14 +556,11 @@ 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 = ""; }; @@ -601,7 +579,6 @@ 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 = ""; }; @@ -611,7 +588,6 @@ 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 = ""; }; @@ -636,7 +612,6 @@ 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 = ""; }; @@ -677,7 +652,6 @@ 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; }; @@ -693,6 +667,8 @@ 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 = ""; }; @@ -795,12 +771,6 @@ 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 */, @@ -826,8 +796,8 @@ 5F2210462894A33E00C5B190 /* BNCDeviceSystem.m */, 5F2210B22894A34000C5B190 /* BNCEncodingUtils.h */, 5F22108C2894A33F00C5B190 /* BNCEncodingUtils.m */, - C1CDEF322A95718C0098524F /* BNCProductCategory.h */, - C1CDEF312A95718C0098524F /* BNCProductCategory.m */, + E761E92029E61DA000E55C98 /* BNCEventUtils.h */, + E761E91F29E61DA000E55C98 /* BNCEventUtils.m */, 5F2210632894A33F00C5B190 /* BNCFieldDefines.h */, 5F2210782894A33F00C5B190 /* BNCInitSessionResponse.h */, 5F2210742894A33F00C5B190 /* BNCInitSessionResponse.m */, @@ -852,10 +822,18 @@ 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 */, @@ -874,6 +852,8 @@ 5F2210AD2894A34000C5B190 /* BNCThreads.m */, 5F2210A72894A34000C5B190 /* BNCURLFilter.h */, 5F2210292894A33E00C5B190 /* BNCURLFilter.m */, + C1B63C7B29D2380000D1136D /* BNCUrlQueryParameter.h */, + C1B63C7929D2380000D1136D /* BNCUrlQueryParameter.m */, 5F2210812894A33F00C5B190 /* BNCUserAgentCollector.h */, 5F2210C32894A34000C5B190 /* BNCUserAgentCollector.m */, 5F2210B82894A34000C5B190 /* Branch.h */, @@ -882,8 +862,6 @@ 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 */, @@ -892,10 +870,6 @@ 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 */, @@ -917,14 +891,10 @@ 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 */, @@ -1024,7 +994,6 @@ 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 */, @@ -1046,12 +1015,10 @@ 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 */, @@ -1070,7 +1037,7 @@ 5F2211112894A34000C5B190 /* BNCContentDiscoveryManager.h in Headers */, 5F2211012894A34000C5B190 /* BNCFieldDefines.h in Headers */, 5F2210F42894A34000C5B190 /* BNCCallbackMap.h in Headers */, - 5F2210F02894A34000C5B190 /* BranchRegisterViewRequest.h in Headers */, + 5F5139962AC21F6E004A3BA4 /* BNCRequestFactory.h in Headers */, 5F2210C92894A34000C5B190 /* BNCReachability.h in Headers */, 5F22111E2894A34000C5B190 /* BranchContentPathProperties.h in Headers */, 5F22115A2894A34000C5B190 /* NSError+Branch.h in Headers */, @@ -1140,14 +1107,11 @@ 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 */, @@ -1155,12 +1119,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 */, @@ -1190,7 +1154,6 @@ 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 */, @@ -1226,20 +1189,18 @@ 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 */, @@ -1579,6 +1540,7 @@ 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 */, @@ -1590,13 +1552,11 @@ 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 */, @@ -1613,7 +1573,6 @@ 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 */, @@ -1630,7 +1589,6 @@ 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 */, @@ -1687,6 +1645,7 @@ 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 */, @@ -1713,13 +1672,10 @@ 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 */, @@ -1733,7 +1689,6 @@ 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 */, @@ -1783,10 +1738,8 @@ 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 */, - 5F79041728B5C93E003144CD /* BranchCPIDRequest.m in Sources */, - 5F79041828B5C93E003144CD /* BranchCrossPlatformID.m in Sources */, + 5F51399B2AC21F6E004A3BA4 /* BNCRequestFactory.m in Sources */, 5F79041A28B5C93E003144CD /* BranchDelegate.m in Sources */, 5F79041B28B5C93E003144CD /* BranchEvent.m in Sources */, 5F79041C28B5C93E003144CD /* BranchInstallRequest.m in Sources */, @@ -1797,7 +1750,6 @@ 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 */, @@ -1987,7 +1939,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2018,7 +1970,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2040,7 +1992,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -2050,7 +2002,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -2219,7 +2171,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2254,7 +2206,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2288,6 +2240,7 @@ 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", @@ -2301,7 +2254,7 @@ SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 12.0; }; name = Debug; }; @@ -2318,6 +2271,7 @@ 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", @@ -2331,7 +2285,7 @@ SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 12.0; }; name = Release; }; @@ -2340,7 +2294,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -2350,7 +2304,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -2360,7 +2314,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -2370,7 +2324,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -2380,7 +2334,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -2390,7 +2344,7 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = R63EM248DP; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; diff --git a/BranchSDK/BNCConfig.h b/BranchSDK/BNCConfig.h index f0273d658..b7eabea85 100644 --- a/BranchSDK/BNCConfig.h +++ b/BranchSDK/BNCConfig.h @@ -13,14 +13,11 @@ #endif -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_SDK_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_VERSION_3; +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; diff --git a/BranchSDK/BNCConfig.m b/BranchSDK/BNCConfig.m index 4c53fb623..26244bb5a 100644 --- a/BranchSDK/BNCConfig.m +++ b/BranchSDK/BNCConfig.m @@ -8,15 +8,11 @@ #include "BNCConfig.h" -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_SDK_VERSION = @"2.2.1"; +NSString * const BNC_LINK_URL = @"https://bnc.lt"; +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_VERSION_3 = @"v3"; +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"; diff --git a/BranchSDK/BNCDeviceInfo.h b/BranchSDK/BNCDeviceInfo.h index 4b9fb4662..c7a1dd238 100644 --- a/BranchSDK/BNCDeviceInfo.h +++ b/BranchSDK/BNCDeviceInfo.h @@ -20,8 +20,6 @@ - (void)registerPluginName:(NSString *)name version:(NSString *)version; -- (NSDictionary *) v2dictionary; - /* Thread safety is the callee's responsibility! @@ -39,7 +37,6 @@ @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 0ff6b3897..abd311e3a 100644 --- a/BranchSDK/BNCDeviceInfo.m +++ b/BranchSDK/BNCDeviceInfo.m @@ -127,7 +127,6 @@ - (void)checkAdvertisingIdentifier { self.isFirstOptIn = NO; } - self.isAdTrackingEnabled = [BNCSystemObserver adTrackingEnabled]; self.advertiserId = [BNCSystemObserver advertiserIdentifier]; BOOL ignoreIdfa = [BNCPreferenceHelper sharedInstance].isDebug; @@ -148,62 +147,4 @@ - (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 ea004512d..7f384660c 100644 --- a/BranchSDK/BNCNetworkInterface.m +++ b/BranchSDK/BNCNetworkInterface.m @@ -65,9 +65,6 @@ - (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 03d7c3c7a..8f771db42 100644 --- a/BranchSDK/BNCPreferenceHelper.h +++ b/BranchSDK/BNCPreferenceHelper.h @@ -61,8 +61,6 @@ 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; @@ -75,18 +73,12 @@ NSURL* /* _Nonnull */ BNCURLForBranchDirectory(void); @property (strong, nonatomic) NSDate *firstAppLaunchTime; @property (assign, nonatomic) BOOL invokeRegisterApp; -@property (assign, nonatomic) BOOL useEUServers; - - (void) clearTrackingInformation; + (BNCPreferenceHelper *)sharedInstance; -- (NSString *)getAPIBaseURL; -- (NSString *)getAPIURL:(NSString *)endpoint; -- (NSString *)getEndpointFromURL:(NSString *)url; - -- (void) setBranchAPIURL:(NSString*)branchAPIURL; -- (void) setPatternListURL:(NSString*)cdnURL; +- (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 0573f03a5..f67a01b02 100644 --- a/BranchSDK/BNCPreferenceHelper.m +++ b/BranchSDK/BNCPreferenceHelper.m @@ -111,8 +111,7 @@ @implementation BNCPreferenceHelper highestConversionValueSent = _highestConversionValueSent, referringURLQueryParameters = _referringURLQueryParameters, anonID = _anonID, - patternListURL = _patternListURL, - useEUServers = _useEUServers; + patternListURL = _patternListURL; + (BNCPreferenceHelper *)sharedInstance { static BNCPreferenceHelper *preferenceHelper; @@ -150,61 +149,48 @@ - (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]; } } -- (NSString*) branchAPIURL { +// TODO: This method is not used with the Tracking domain change. See SDK-2118 +- (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_BASE_URL copy]; + _branchAPIURL = [BNC_API_URL copy]; [self writeObjectToDefaults:BRANCH_PREFS_KEY_API_URL value:_branchAPIURL]; } - return _branchAPIURL; - } -} -- (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 _branchAPIURL; } - return @""; } -- (void) setPatternListURL:(NSString*)url { +- (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; } } @@ -398,6 +384,7 @@ - (NSString *)initialReferrer { - (void)setInitialReferrer:(NSString *)initialReferrer { [self writeObjectToDefaults:BRANCH_REQUEST_KEY_INITIAL_REFERRER value:initialReferrer]; } + - (NSString *)sessionParams { @synchronized (self) { if (!_sessionParams) { @@ -663,22 +650,6 @@ - (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; @@ -805,23 +776,6 @@ - (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/BNCRequestFactory.h b/BranchSDK/BNCRequestFactory.h new file mode 100644 index 000000000..6e33f480a --- /dev/null +++ b/BranchSDK/BNCRequestFactory.h @@ -0,0 +1,40 @@ +// +// BNCRequestFactory.h +// Branch +// +// Created by Ernest Cho on 8/16/23. +// Copyright © 2023 Branch, Inc. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/* + BNCRequestFactory + + Collates general device and app data for request JSONs. + Enforces privacy controls on data within request JSONs. + + Endpoint specific data is passed in and not edited by this class. + */ +@interface BNCRequestFactory : NSObject + +- (instancetype)initWithBranchKey:(NSString *)key NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +- (NSDictionary *)dataForInstall; +- (NSDictionary *)dataForOpen; + +// Event data is passed in +- (NSDictionary *)dataForEventWithEventDictionary:(NSMutableDictionary *)dictionary; + +// Link payload is passed in +- (NSDictionary *)dataForShortURLWithLinkDataDictionary:(NSMutableDictionary *)dictionary isSpotlightRequest:(BOOL)isSpotlightRequest; + +// LATD attribution window is passed in +- (NSDictionary *)dataForLATDWithDataDictionary:(NSMutableDictionary *)dictionary; + +@end + +NS_ASSUME_NONNULL_END diff --git a/BranchSDK/BNCRequestFactory.m b/BranchSDK/BNCRequestFactory.m new file mode 100644 index 000000000..7386e9641 --- /dev/null +++ b/BranchSDK/BNCRequestFactory.m @@ -0,0 +1,622 @@ +// +// BNCRequestFactory.m +// Branch +// +// Created by Ernest Cho on 8/16/23. +// Copyright © 2023 Branch, Inc. All rights reserved. +// + +#import "BNCRequestFactory.h" + +// For privacy setting +#import "Branch.h" + +// For SDK version number +#import "BNCConfig.h" + +// For request JSON key names +#import "BranchConstants.h" + +// Data format utility +#import "BNCEncodingUtils.h" + +// nil checked set and copy methods +#import "NSMutableDictionary+Branch.h" + +// Data sources +#import "BNCApplication.h" +#import "BNCSystemObserver.h" +#import "BNCPartnerParameters.h" +#import "BNCDeviceInfo.h" +#import "BNCPreferenceHelper.h" +#import "BNCAppleReceipt.h" +#import "BNCAppGroupsData.h" +#import "BNCSKAdNetwork.h" +#import "BNCReferringURLUtility.h" +#import "BNCPasteboard.h" + +@interface BNCRequestFactory() + +@property (nonatomic, strong, readwrite) NSString *branchKey; + +@property (nonatomic, strong, readwrite) BNCDeviceInfo *deviceInfo; +@property (nonatomic, strong, readwrite) BNCPreferenceHelper *preferenceHelper; +@property (nonatomic, strong, readwrite) BNCPartnerParameters *partnerParameters; +@property (nonatomic, strong, readwrite) BNCApplication *application; +@property (nonatomic, strong, readwrite) BNCAppGroupsData *appGroupsData; +@property (nonatomic, strong, readwrite) BNCSKAdNetwork *skAdNetwork; +@property (nonatomic, strong, readwrite) BNCAppleReceipt *appleReceipt; +@property (nonatomic, strong, readwrite) BNCPasteboard *pasteboard; + +@end + +@implementation BNCRequestFactory + +- (instancetype)initWithBranchKey:(NSString *)key { + self = [super init]; + if (self) { + self.branchKey = key; + + self.deviceInfo = [BNCDeviceInfo getInstance]; + self.preferenceHelper = [BNCPreferenceHelper sharedInstance]; + self.partnerParameters = [BNCPartnerParameters shared]; + self.application = [BNCApplication currentApplication]; + self.appGroupsData = [BNCAppGroupsData shared]; + self.skAdNetwork = [BNCSKAdNetwork sharedInstance]; + self.appleReceipt = [BNCAppleReceipt sharedInstance]; + self.pasteboard = [BNCPasteboard sharedInstance]; + } + return self; +} + +// SDK level tracking control +// When set to YES, only link creation and resolution calls are allowed. +// NO by default. +- (BOOL)isTrackingDisabled { + return Branch.trackingDisabled; +} + +- (NSDictionary *)dataForInstall { + NSMutableDictionary *json = [NSMutableDictionary new]; + + // All requests + [self addDefaultRequestDataToJSON:json]; + + // All POST requests + [self addInstrumentationToJSON:json]; + + // Install, Open and Event + [self addMetadataWithSKANMaxTimeToJSON:json]; + + // All POST requests other than Events + [self addSDKVersionToJSON:json]; + [self addV1DictionaryToJSON:json]; + + // Install and Open + [self addDeveloperUserIDToJSON:json]; + [self addSystemObserverDataToJSON:json]; + [self addPreferenceHelperDataToJSON:json]; + [self addPartnerParametersToJSON:json]; + [self addAppleReceiptSourceToJSON:json]; + [self addTimestampsToJSON:json]; + + [self addAppleAttributionTokenToJSON:json]; + + // Install Only + [self addAppleReceiptDataToJSON:json]; + [self addAppClipDataToJSON:json]; + [self addLocalURLToInstallJSON:json]; + + // TODO: refactor to simply request values for install + [self addReferringURLsToJSON:json forEndpoint:@"/v1/install"]; + + return json; +} + +- (NSDictionary *)dataForOpen { + NSMutableDictionary *json = [NSMutableDictionary new]; + + // All requests + [self addDefaultRequestDataToJSON:json]; + + // All POST requests + [self addInstrumentationToJSON:json]; + + // Install, Open and Event + [self addMetadataWithSKANMaxTimeToJSON:json]; + + // Open and Event + [self addSKANWindowToJSON:json]; + + // All POST requests other than Events + [self addSDKVersionToJSON:json]; + [self addV1DictionaryToJSON:json]; + + // Install and Open + [self addDeveloperUserIDToJSON:json]; + [self addSystemObserverDataToJSON:json]; + [self addPreferenceHelperDataToJSON:json]; + [self addPartnerParametersToJSON:json]; + [self addAppleReceiptSourceToJSON:json]; + [self addTimestampsToJSON:json]; + + // Usually sent with install, but retry on open if it didn't get sent + [self addAppleAttributionTokenToJSON:json]; + + // Only for opens + [self addOpenTokensToJSON:json]; + [self addLocalURLToOpenJSON:json]; + + // TODO: refactor to simply request values for open + [self addReferringURLsToJSON:json forEndpoint:@"/v1/open"]; + + return json; +} + +// The event data dictionary is NOT checked or changed +- (NSDictionary *)dataForEventWithEventDictionary:(NSMutableDictionary *)dictionary { + + // Event requests are not valid when tracking is disabled + if ([self isTrackingDisabled]) { + return [NSMutableDictionary new]; + } + + NSMutableDictionary *json = dictionary ? dictionary : [NSMutableDictionary new]; + + // All requests + [self addDefaultRequestDataToJSON:json]; + + // All POST requests + [self addInstrumentationToJSON:json]; + + // Install, Open and Event + [self addMetadataWithSKANMaxTimeToJSON:json]; + + // Open and Event + [self addSKANWindowToJSON:json]; + + // Event and LATD + [self addV2DictionaryToJSON:json]; + + // TODO: refactor to simply request values for event + [self addReferringURLsToJSON:json forEndpoint:@"/v2/event"]; + + return json; +} + +// The short URL link data dictionary is NOT checked or changed +- (NSDictionary *)dataForShortURLWithLinkDataDictionary:(NSMutableDictionary *)dictionary isSpotlightRequest:(BOOL)isSpotlightRequest { + NSMutableDictionary *json = dictionary ? dictionary : [NSMutableDictionary new]; + + // All requests + [self addDefaultRequestDataToJSON:json]; + + // All POST requests + [self addInstrumentationToJSON:json]; + + // All POST requests other than Events + [self addSDKVersionToJSON:json]; + + // TODO: is this required? Confirm with server team that we can remove this. + [self addV1DictionaryToJSON:json]; + + // TODO: metadata is very likely dropped at server. Confirm with server team. + [self addMetadataToJSON:json]; + + // TODO: These are optional fields in the server code. Can we drop these as well? + [self addShortURLTokensToJSON:json isSpotlightRequest:isSpotlightRequest]; + + return json; +} + +- (NSDictionary *)dataForLATDWithDataDictionary:(NSMutableDictionary *)dictionary { + + // LATD requests are not valid when tracking is disabled + if ([self isTrackingDisabled]) { + return [NSMutableDictionary new]; + } + + NSMutableDictionary *json = dictionary ? dictionary : [NSMutableDictionary new]; + + // All requests + [self addDefaultRequestDataToJSON:json]; + + // All POST requests + [self addInstrumentationToJSON:json]; + + // All POST requests other than Events + [self addSDKVersionToJSON:json]; + + // TODO: likely a subset of the V2 dictionary is sufficient, should we minimize it. + [self addV2DictionaryToJSON:json]; + + // TODO: probably remove this, this is a data pull request and likely does nothing. + [self addMetadataToJSON:json]; + + return json; +} + +- (void)addOpenTokensToJSON:(NSMutableDictionary *)json { + // Tokens are not valid when tracking is disabled + if ([self isTrackingDisabled]) { + return; + } + + if (self.preferenceHelper.randomizedDeviceToken) { + json[BRANCH_REQUEST_KEY_RANDOMIZED_DEVICE_TOKEN] = self.preferenceHelper.randomizedDeviceToken; + } + json[BRANCH_REQUEST_KEY_RANDOMIZED_BUNDLE_TOKEN] = self.preferenceHelper.randomizedBundleToken; + + // TODO: remove if deprecated + // tmp location, it's only on opens like the tokens but it will probably be deleted + if (self.preferenceHelper.limitFacebookTracking) { + json[@"limit_facebook_tracking"] = (__bridge NSNumber*) kCFBooleanTrue; + } +} + +- (void)addShortURLTokensToJSON:(NSMutableDictionary *)json isSpotlightRequest:(BOOL)isSpotlightRequest { + // Tokens are not valid when tracking is disabled + if ([self isTrackingDisabled]) { + return; + } + + json[BRANCH_REQUEST_KEY_RANDOMIZED_DEVICE_TOKEN] = self.preferenceHelper.randomizedDeviceToken; + if (!isSpotlightRequest) { + json[BRANCH_REQUEST_KEY_RANDOMIZED_BUNDLE_TOKEN] = self.preferenceHelper.randomizedBundleToken; + } + json[BRANCH_REQUEST_KEY_SESSION_ID] = self.preferenceHelper.sessionID; +} + +- (void)addPreferenceHelperDataToJSON:(NSMutableDictionary *)json { + json[BRANCH_REQUEST_KEY_DEBUG] = @(self.preferenceHelper.isDebug); + + [self safeSetValue:self.preferenceHelper.linkClickIdentifier forKey:BRANCH_REQUEST_KEY_LINK_IDENTIFIER onDict:json]; + [self safeSetValue:self.preferenceHelper.spotlightIdentifier forKey:BRANCH_REQUEST_KEY_SPOTLIGHT_IDENTIFIER onDict:json]; + [self safeSetValue:self.preferenceHelper.universalLinkUrl forKey:BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL onDict:json]; + [self safeSetValue:self.preferenceHelper.initialReferrer forKey:BRANCH_REQUEST_KEY_INITIAL_REFERRER onDict:json]; + + // This was only on opens before, cause it can't exist on install. + [self safeSetValue:self.preferenceHelper.externalIntentURI forKey:BRANCH_REQUEST_KEY_EXTERNAL_INTENT_URI onDict:json]; +} + +- (void)addSystemObserverDataToJSON:(NSMutableDictionary *)json { + [self safeSetValue:[BNCSystemObserver bundleIdentifier] forKey:BRANCH_REQUEST_KEY_BUNDLE_ID onDict:json]; + [self safeSetValue:[BNCSystemObserver teamIdentifier] forKey:BRANCH_REQUEST_KEY_TEAM_ID onDict:json]; + [self safeSetValue:[BNCSystemObserver applicationVersion] forKey:BRANCH_REQUEST_KEY_APP_VERSION onDict:json]; + [self safeSetValue:[BNCSystemObserver defaultURIScheme] forKey:BRANCH_REQUEST_KEY_URI_SCHEME onDict:json]; +} + +- (void)addAppleReceiptDataToJSON:(NSMutableDictionary *)json { + [self safeSetValue:[self.appleReceipt installReceipt] forKey:BRANCH_REQUEST_KEY_APPLE_RECEIPT onDict:json]; +} + +- (void)addAppleReceiptSourceToJSON:(NSMutableDictionary *)json { + NSNumber *isSandboxReceipt = [NSNumber numberWithBool:[self.appleReceipt isTestFlight]]; + + // The JSON key name is misleading, really indicates if the receipt is real or a sandbox receipt + [self safeSetValue:isSandboxReceipt forKey:BRANCH_REQUEST_KEY_APPLE_TESTFLIGHT onDict:json]; +} + +- (void)addAppleAttributionTokenToJSON:(NSMutableDictionary *)json { + // This value is only sent once usually on install + if (!self.preferenceHelper.appleAttributionTokenChecked) { + NSString *appleAttributionToken = [BNCSystemObserver appleAttributionToken]; + if (appleAttributionToken) { + self.preferenceHelper.appleAttributionTokenChecked = YES; + [self safeSetValue:appleAttributionToken forKey:BRANCH_REQUEST_KEY_APPLE_ATTRIBUTION_TOKEN onDict:json]; + } + } +} + +- (void)addPartnerParametersToJSON:(NSMutableDictionary *)json { + // Partner parameters are not valid when tracking is disabled + if ([self isTrackingDisabled]) { + return; + } + NSDictionary *partnerParameters = [[BNCPartnerParameters shared] parameterJson]; + if (partnerParameters.count > 0) { + [self safeSetValue:partnerParameters forKey:BRANCH_REQUEST_KEY_PARTNER_PARAMETERS onDict:json]; + } +} + +- (void)addLocalURLToInstallJSON:(NSMutableDictionary *)json { + if ([BNCPasteboard sharedInstance].checkOnInstall) { + NSURL *pasteboardURL = nil; + if (@available(iOS 16.0, macCatalyst 16.0, *)) { + NSString *localURLString = [self.preferenceHelper localUrl]; + if (localURLString){ + pasteboardURL = [[NSURL alloc] initWithString:localURLString]; + } else { + pasteboardURL = [[BNCPasteboard sharedInstance] checkForBranchLink]; + } + } else { + pasteboardURL = [[BNCPasteboard sharedInstance] checkForBranchLink]; + } + + if (pasteboardURL) { + [self safeSetValue:pasteboardURL.absoluteString forKey:BRANCH_REQUEST_KEY_LOCAL_URL onDict:json]; + [self clearLocalURLFromStorage]; + } + } +} + +// If the client uses a UIPasteControl, force a new open to fetch the payload +- (void)addLocalURLToOpenJSON:(NSMutableDictionary *)json { + if (@available(iOS 16.0, macCatalyst 16.0, *)) { + NSString *localURLString = [[BNCPreferenceHelper sharedInstance] localUrl]; + if (localURLString){ + NSURL *pasteboardURL = [[NSURL alloc] initWithString:localURLString]; + if (pasteboardURL) { + [self safeSetValue:pasteboardURL.absoluteString forKey:BRANCH_REQUEST_KEY_LOCAL_URL onDict:json]; + [self clearLocalURLFromStorage]; + } + } + } +} + +- (void)clearLocalURLFromStorage { + self.preferenceHelper.localUrl = nil; +#if !TARGET_OS_TV + UIPasteboard.generalPasteboard.URL = nil; +#endif +} + +- (void)addTimestampsToJSON:(NSMutableDictionary *)json { + // timestamps are not valid when tracking is disabled + if ([self isTrackingDisabled]) { + return; + } + + json[@"lastest_update_time"] = BNCWireFormatFromDate(self.application.currentBuildDate); + json[@"previous_update_time"] = BNCWireFormatFromDate(self.preferenceHelper.previousAppBuildDate); + json[@"latest_install_time"] = BNCWireFormatFromDate(self.application.currentInstallDate); + json[@"first_install_time"] = BNCWireFormatFromDate(self.application.firstInstallDate); + + // TODO: can we omit this deprecated update flag? + json[@"update"] = @(0); +} + +// App Clips upgrade data +- (void)addAppClipDataToJSON:(NSMutableDictionary *)json { + if ([self.appGroupsData loadAppClipData]) { + [self safeSetValue:self.appGroupsData.bundleID forKey:BRANCH_REQUEST_KEY_APP_CLIP_BUNDLE_ID onDict:json]; + [self safeSetValue:BNCWireFormatFromDate(self.appGroupsData.installDate) forKey:BRANCH_REQUEST_KEY_LATEST_APP_CLIP_INSTALL_TIME onDict:json]; + [self safeSetValue:self.appGroupsData.url forKey:BRANCH_REQUEST_KEY_UNIVERSAL_LINK_URL onDict:json]; + [self safeSetValue:self.appGroupsData.branchToken forKey:BRANCH_REQUEST_KEY_APP_CLIP_RANDOMIZED_DEVICE_TOKEN onDict:json]; + [self safeSetValue:self.appGroupsData.bundleToken forKey:BRANCH_REQUEST_KEY_APP_CLIP_RANDOMIZED_BUNDLE_TOKEN onDict:json]; + } +} + +- (void)addDefaultRequestDataToJSON:(NSMutableDictionary *)json { + json[@"branch_key"] = self.branchKey; + + // omit field if value is NO + if ([self isTrackingDisabled]) { + json[@"tracking_disabled"] = @(1); + } +} + +// event omits this from the top level +- (void)addSDKVersionToJSON:(NSMutableDictionary *)json { + json[@"sdk"] = [NSString stringWithFormat:@"ios%@", BNC_SDK_VERSION]; +} + +- (void)addMetadataToJSON:(NSMutableDictionary *)json { + NSMutableDictionary *metadata = [[NSMutableDictionary alloc] init]; + [metadata bnc_safeAddEntriesFromDictionary:self.preferenceHelper.requestMetadataDictionary]; + + // copies existing metadata keys, believe there's only one pass now so this may be unnecessary + [metadata bnc_safeAddEntriesFromDictionary:json[BRANCH_REQUEST_KEY_STATE]]; + + if (metadata.count) { + json[BRANCH_REQUEST_KEY_STATE] = metadata; + } +} + +// install, open and event requests include SKAN max time within the metadata block +- (void)addMetadataWithSKANMaxTimeToJSON:(NSMutableDictionary *)json { + NSMutableDictionary *metadata = [[NSMutableDictionary alloc] init]; + [metadata bnc_safeAddEntriesFromDictionary:self.preferenceHelper.requestMetadataDictionary]; + [metadata bnc_safeAddEntriesFromDictionary:json[BRANCH_REQUEST_KEY_STATE]]; + + [metadata bnc_safeSetObject:[NSString stringWithFormat:@"%f", self.skAdNetwork.maxTimeSinceInstall] forKey:BRANCH_REQUEST_METADATA_KEY_SCANTIME_WINDOW]; + + if (metadata.count) { + json[BRANCH_REQUEST_KEY_STATE] = metadata; + } +} + +// open and event requests include the postback window number +- (void)addSKANWindowToJSON:(NSMutableDictionary *)json { + if (@available(iOS 16.1, macCatalyst 16.1, *)){ + if (self.preferenceHelper.invokeRegisterApp) { + int currentWindow = [self.skAdNetwork calculateSKANWindowForTime:[NSDate date]]; + if (currentWindow == BranchSkanWindowFirst){ + json[BRANCH_REQUEST_KEY_SKAN_POSTBACK_INDEX] = BRANCH_REQUEST_KEY_VALUE_POSTBACK_SEQUENCE_INDEX_0; + } else if (currentWindow == BranchSkanWindowSecond) { + json[BRANCH_REQUEST_KEY_SKAN_POSTBACK_INDEX] = BRANCH_REQUEST_KEY_VALUE_POSTBACK_SEQUENCE_INDEX_1; + } else if (currentWindow == BranchSkanWindowThird) { + json[BRANCH_REQUEST_KEY_SKAN_POSTBACK_INDEX] = BRANCH_REQUEST_KEY_VALUE_POSTBACK_SEQUENCE_INDEX_2; + } + } + } +} + +// POST requests include instrumentation +- (void)addInstrumentationToJSON:(NSMutableDictionary *)json { + NSDictionary *instrumentationDictionary = self.preferenceHelper.instrumentationParameters; + if (instrumentationDictionary) { + json[BRANCH_REQUEST_KEY_INSTRUMENTATION] = instrumentationDictionary; + } +} + +// BNCReferringURLUtility requires the endpoint string to determine which query params are applied +- (void)addReferringURLsToJSON:(NSMutableDictionary *)json forEndpoint:(NSString *)endpoint { + // Not a singleton, but BNCReferringURLUtility does pull from storage + BNCReferringURLUtility *utility = [BNCReferringURLUtility new]; + NSDictionary *urlQueryParams = [utility referringURLQueryParamsForEndpoint:endpoint]; + [json bnc_safeAddEntriesFromDictionary:urlQueryParams]; +} + +// install and open +- (void)addDeveloperUserIDToJSON:(NSMutableDictionary *)json { + [json bnc_safeSetObject:self.preferenceHelper.userIdentity forKey:@"identity"]; +} + +// event +- (void)addV2DictionaryToJSON:(NSMutableDictionary *)json { + NSDictionary *tmp = [self v2dictionary]; + if (tmp.count > 0) { + json[@"user_data"] = tmp; + } +} + +- (NSDictionary *)v2dictionary { + NSMutableDictionary *dictionary = [NSMutableDictionary new]; + @synchronized (self.deviceInfo) { + [self.deviceInfo checkAdvertisingIdentifier]; + + BOOL disableAdNetworkCallouts = self.preferenceHelper.disableAdNetworkCallouts; + if (disableAdNetworkCallouts) { + dictionary[@"disable_ad_network_callouts"] = [NSNumber numberWithBool:disableAdNetworkCallouts]; + } + + if (self.preferenceHelper.isDebug) { + dictionary[@"unidentified_device"] = @(YES); + } else { + [dictionary bnc_safeSetObject:self.deviceInfo.vendorId forKey:@"idfv"]; + [dictionary bnc_safeSetObject:self.deviceInfo.advertiserId forKey:@"idfa"]; + } + [dictionary bnc_safeSetObject:self.deviceInfo.anonId forKey:@"anon_id"]; + [dictionary bnc_safeSetObject:self.deviceInfo.localIPAddress forKey:@"local_ip"]; + + [dictionary bnc_safeSetObject:self.deviceInfo.optedInStatus forKey:@"opted_in_status"]; + + if (self.preferenceHelper.limitFacebookTracking) { + dictionary[@"limit_facebook_tracking"] = @(YES); + } + [dictionary bnc_safeSetObject:self.deviceInfo.brandName forKey:@"brand"]; + [dictionary bnc_safeSetObject:self.deviceInfo.modelName forKey:@"model"]; + [dictionary bnc_safeSetObject:self.deviceInfo.osName forKey:@"os"]; + [dictionary bnc_safeSetObject:self.deviceInfo.osVersion forKey:@"os_version"]; + [dictionary bnc_safeSetObject:self.deviceInfo.osBuildVersion forKey:@"build"]; + [dictionary bnc_safeSetObject:self.deviceInfo.environment forKey:@"environment"]; + [dictionary bnc_safeSetObject:self.deviceInfo.cpuType forKey:@"cpu_type"]; + [dictionary bnc_safeSetObject:self.deviceInfo.screenScale forKey:@"screen_dpi"]; + [dictionary bnc_safeSetObject:self.deviceInfo.screenHeight forKey:@"screen_height"]; + [dictionary bnc_safeSetObject:self.deviceInfo.screenWidth forKey:@"screen_width"]; + [dictionary bnc_safeSetObject:self.deviceInfo.locale forKey:@"locale"]; + [dictionary bnc_safeSetObject:self.deviceInfo.country forKey:@"country"]; + [dictionary bnc_safeSetObject:self.deviceInfo.language forKey:@"language"]; + [dictionary bnc_safeSetObject:[self.deviceInfo connectionType] forKey:@"connection_type"]; + [dictionary bnc_safeSetObject:[self.deviceInfo 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.deviceInfo.applicationVersion forKey:@"app_version"]; + + [dictionary bnc_safeSetObject:self.deviceInfo.pluginName forKey:@"plugin_name"]; + [dictionary bnc_safeSetObject:self.deviceInfo.pluginVersion forKey:@"plugin_version"]; + dictionary[@"sdk_version"] = BNC_SDK_VERSION; + dictionary[@"sdk"] = @"ios"; + } + + return dictionary; +} + +// install, open and latd +- (void)addV1DictionaryToJSON:(NSMutableDictionary *)json { + [self updateDeviceInfoToMutableDictionary:json]; +} + +- (void)updateDeviceInfoToMutableDictionary:(NSMutableDictionary *)dict { + @synchronized (self.deviceInfo) { + + // These fields are not necessary for link resolution calls + if (![self isTrackingDisabled]) { + [self.deviceInfo checkAdvertisingIdentifier]; + + // hardware id information. idfa, idfv or random + NSString *hardwareId = [self.deviceInfo.hardwareId copy]; + NSString *hardwareIdType = [self.deviceInfo.hardwareIdType copy]; + NSNumber *isRealHardwareId = @(self.deviceInfo.isRealHardwareId); + if (hardwareId != nil && hardwareIdType != nil && isRealHardwareId != nil) { + dict[BRANCH_REQUEST_KEY_HARDWARE_ID] = hardwareId; + dict[BRANCH_REQUEST_KEY_HARDWARE_ID_TYPE] = hardwareIdType; + dict[BRANCH_REQUEST_KEY_IS_HARDWARE_ID_REAL] = isRealHardwareId; + } + + // idfv is duplicated in the hardware id field when idfa is unavailable + [self safeSetValue:self.deviceInfo.vendorId forKey:BRANCH_REQUEST_KEY_IOS_VENDOR_ID onDict:dict]; + // idfa is only in the hardware id field + // [self safeSetValue:deviceInfo.advertiserId forKey:@"idfa" onDict:dict]; + [self safeSetValue:self.deviceInfo.anonId forKey:@"anon_id" onDict:dict]; + + [self safeSetValue:[self.deviceInfo localIPAddress] forKey:@"local_ip" onDict:dict]; + + [self safeSetValue:[self.deviceInfo optedInStatus] forKey:BRANCH_REQUEST_KEY_OPTED_IN_STATUS onDict:dict]; + if ([self installDateIsRecent] && [self.deviceInfo isFirstOptIn]) { + [self safeSetValue:@(self.deviceInfo.isFirstOptIn) forKey:BRANCH_REQUEST_KEY_FIRST_OPT_IN onDict:dict]; + [BNCPreferenceHelper sharedInstance].hasOptedInBefore = YES; + } + } + + [self safeSetValue:self.deviceInfo.osName forKey:BRANCH_REQUEST_KEY_OS onDict:dict]; + [self safeSetValue:self.deviceInfo.osVersion forKey:BRANCH_REQUEST_KEY_OS_VERSION onDict:dict]; + [self safeSetValue:self.deviceInfo.osBuildVersion forKey:@"build" onDict:dict]; + [self safeSetValue:self.deviceInfo.environment forKey:@"environment" onDict:dict]; + [self safeSetValue:self.deviceInfo.locale forKey:@"locale" onDict:dict]; + [self safeSetValue:self.deviceInfo.country forKey:@"country" onDict:dict]; + [self safeSetValue:self.deviceInfo.language forKey:@"language" onDict:dict]; + [self safeSetValue:self.deviceInfo.brandName forKey:BRANCH_REQUEST_KEY_BRAND onDict:dict]; + [self safeSetValue:self.deviceInfo.modelName forKey:BRANCH_REQUEST_KEY_MODEL onDict:dict]; + [self safeSetValue:self.deviceInfo.cpuType forKey:@"cpu_type" onDict:dict]; + [self safeSetValue:self.deviceInfo.screenScale forKey:@"screen_dpi" onDict:dict]; + [self safeSetValue:self.deviceInfo.screenHeight forKey:BRANCH_REQUEST_KEY_SCREEN_HEIGHT onDict:dict]; + [self safeSetValue:self.deviceInfo.screenWidth forKey:BRANCH_REQUEST_KEY_SCREEN_WIDTH onDict:dict]; + + [self safeSetValue:[self.deviceInfo connectionType] forKey:@"connection_type" onDict:dict]; + [self safeSetValue:[self.deviceInfo userAgentString] forKey:@"user_agent" onDict:dict]; + + [self safeSetValue:self.deviceInfo.applicationVersion forKey:@"app_version" onDict:dict]; + [self safeSetValue:self.deviceInfo.pluginName forKey:@"plugin_name" onDict:dict]; + [self safeSetValue:self.deviceInfo.pluginVersion forKey:@"plugin_version" onDict:dict]; + + BOOL disableAdNetworkCallouts = self.preferenceHelper.disableAdNetworkCallouts; + if (disableAdNetworkCallouts) { + [dict setObject:[NSNumber numberWithBool:disableAdNetworkCallouts] forKey:@"disable_ad_network_callouts"]; + } + } +} + +// Do not send first_opt_in, if the install is older than 30 days +- (BOOL)installDateIsRecent { + //NSTimeInterval maxTimeSinceInstall = 60.0; + NSTimeInterval maxTimeSinceInstall = 0; + + if (@available(iOS 16.1, macCatalyst 16.1, *)) { + maxTimeSinceInstall = 3600.0 * 24.0 * 60; // For SKAN 4.0, The user has 60 days to launch the app. + } else { + maxTimeSinceInstall = 3600.0 * 24.0 * 30; + } + + NSDate *now = [NSDate date]; + NSDate *maxDate = [self.application.currentInstallDate dateByAddingTimeInterval:maxTimeSinceInstall]; + + if ([now compare:maxDate] == NSOrderedDescending) { + return NO; + } else { + return YES; + } +} + +// Low value helper method, ignores nils. Also redundant with the category on NSMutableDictionary. +- (void)safeSetValue:(NSObject *)value forKey:(NSString *)key onDict:(NSMutableDictionary *)dict { + if (value) { + dict[key] = value; + } +} + +@end diff --git a/BranchSDK/BNCServerAPI.h b/BranchSDK/BNCServerAPI.h index 992026fcb..6fc218e65 100644 --- a/BranchSDK/BNCServerAPI.h +++ b/BranchSDK/BNCServerAPI.h @@ -17,22 +17,22 @@ NS_ASSUME_NONNULL_BEGIN + (BNCServerAPI *)sharedInstance; -// retrieves appropriate service URL -- (NSURL *)installServiceURL; -- (NSURL *)openServiceURL; -- (NSURL *)eventServiceURL; -- (NSURL *)linkServiceURL; +- (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; -// 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 917cafa3d..2e9bc5c2a 100644 --- a/BranchSDK/BNCServerAPI.m +++ b/BranchSDK/BNCServerAPI.m @@ -6,7 +6,6 @@ // #import "BNCServerAPI.h" -#import "BNCPreferenceHelper.h" #import "BNCSystemObserver.h" #import "BNCConfig.h" #import "BranchConstants.h" @@ -24,53 +23,87 @@ + (BNCServerAPI *)sharedInstance { return serverAPI; } -- (NSURL *)installServiceURL{ - return [NSURL URLWithString: [[self getBaseURLWithVersion] stringByAppendingString: BRANCH_REQUEST_ENDPOINT_INSTALL]]; +- (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 *)openServiceURL { - return [NSURL URLWithString: [[self getBaseURLWithVersion] stringByAppendingString: BRANCH_REQUEST_ENDPOINT_OPEN]]; +- (NSString *)linkServiceURL { + return [[self getBaseURLForLinkingEndpoints] stringByAppendingString: @"/v1/url"]; } -- (NSURL *)eventServiceURL{ - return [NSURL URLWithString: [[self getBaseURLWithVersion] stringByAppendingString: BRANCH_REQUEST_ENDPOINT_USER_COMPLETED_ACTION]]; +- (NSString *)qrcodeServiceURL { + return [[self getBaseURLForLinkingEndpoints] stringByAppendingString: @"/v1/qr-code"]; } -- (NSURL *)linkServiceURL { - return [NSURL URLWithString: [[self getBaseURLWithVersion] stringByAppendingString: BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL]]; +// LATD endpoint is not a data collection endpoint and will be treated like linking endpoints +- (NSString *)latdServiceURL { + return [[self getBaseURLForLinkingEndpoints] stringByAppendingString: @"/v1/cpid/latd"]; } -- (BOOL)useTrackingDomain { +- (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 { NSString* optedInStatus = [BNCSystemObserver attOptedInStatus]; - if ([optedInStatus isEqualToString:@"authorized"]){ return TRUE; } return FALSE; } -- (void)setUseEUServers:(BOOL)useEUServers { - [[BNCPreferenceHelper sharedInstance] setUseEUServers: useEUServers]; -} - -- (BOOL)useEUServers { - return [[BNCPreferenceHelper sharedInstance] useEUServers]; +// 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; } -- (NSString *) getBaseURLWithVersion { +- (NSString *)getBaseURL { + if (self.automaticallyEnableTrackingDomain) { + self.useTrackingDomain = [self optedIntoIDFA]; + } + 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 e500ececa..ec652d406 100644 --- a/BranchSDK/BNCServerInterface.m +++ b/BranchSDK/BNCServerInterface.m @@ -11,18 +11,16 @@ #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 @@ -42,18 +40,11 @@ - (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 @@ -64,96 +55,27 @@ - (void)getRequest:(NSDictionary *)params #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]; } -- (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; +- (void)postRequest:(NSDictionary *)post url:(NSString *)url retryNumber:(NSInteger)retryNumber key:(NSString *)key callback:(BNCServerCallback)callback { - // 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]; + // 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]; [self genericHTTPRequest:request retryNumber:retryNumber callback:callback retryHandler:^ NSURLRequest *(NSInteger lastRetryNumber) { - return [self preparePostRequest:extendedParams url:url key:key retryNumber:lastRetryNumber+1]; + return [self preparePostRequest:post url:url key:key retryNumber:lastRetryNumber+1]; }]; } -- (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]; +// 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]; return [self genericHTTPRequestSynchronous:request]; } @@ -166,10 +88,7 @@ - (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) { @@ -294,7 +213,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" @@ -355,60 +274,31 @@ - (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 *preparedParams = - [self prepareParamDict:params key:key retryNumber:retryNumber requestType:@"GET"]; - NSString *requestUrlString = - [NSString stringWithFormat:@"%@%@", url, [BNCEncodingUtils encodeDictionaryToQueryString:preparedParams]]; + NSDictionary *tmp = [self addRetryCount:retryNumber toJSON:params]; + NSString *requestUrlString = [NSString stringWithFormat:@"%@%@", url, [BNCEncodingUtils encodeDictionaryToQueryString:tmp]]; 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 { +- (NSURLRequest *)preparePostRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)key retryNumber:(NSInteger)retryNumber { + + NSDictionary *tmp = [self addRetryCount:retryNumber toJSON:params]; - 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]; + NSData *postData = [BNCEncodingUtils encodeDictionaryToJsonData:tmp]; NSString *postLength = [NSString stringWithFormat:@"%lu", (unsigned long)[postData length]]; BNCLogDebug([NSString stringWithFormat:@"URL: %@.\n", url]); BNCLogDebug([NSString stringWithFormat:@"Body: %@\nJSON: %@.", - preparedParams, + params, [[NSString alloc] initWithData:postData encoding:NSUTF8StringEncoding]] ); @@ -424,62 +314,10 @@ - (NSURLRequest *)preparePostRequest:(NSDictionary *)params return request; } -- (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 *)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]); @@ -496,7 +334,7 @@ - (BNCServerResponse *)processServerResponse:(NSURLResponse *)response 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]; @@ -505,97 +343,16 @@ - (void) collectInstrumentationMetricsWithOperation:(id 0) { + tmp[@"retryNumber"] = @(count); } else { - 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; + tmp[@"retryNumber"] = @(0); } + return tmp; } @end diff --git a/BranchSDK/BNCServerRequestQueue.h b/BranchSDK/BNCServerRequestQueue.h index ff391d4e1..62f468426 100755 --- a/BranchSDK/BNCServerRequestQueue.h +++ b/BranchSDK/BNCServerRequestQueue.h @@ -23,7 +23,6 @@ - (BOOL)containsInstallOrOpen; - (BOOL)removeInstallOrOpen; -- (BOOL)containsClose; - (BranchOpenRequest *)moveInstallOrOpenToFront:(NSInteger)networkCount; - (void)persistEventually; diff --git a/BranchSDK/BNCServerRequestQueue.m b/BranchSDK/BNCServerRequestQueue.m index 17b3eb299..dea5a88f7 100755 --- a/BranchSDK/BNCServerRequestQueue.m +++ b/BranchSDK/BNCServerRequestQueue.m @@ -9,7 +9,6 @@ #import "BNCServerRequestQueue.h" #import "BNCPreferenceHelper.h" -#import "BranchCloseRequest.h" // Analytics requests #import "BranchInstallRequest.h" @@ -215,18 +214,6 @@ - (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 { @@ -306,13 +293,9 @@ - (NSData *)oldArchiveQueue:(NSArray *)queue { NSMutableArray *archivedRequests = [NSMutableArray new]; for (BNCServerRequest *request in queue) { - // only close requests were ignored - if (![BranchCloseRequest.class isEqual:request.class]) { - - // archive every request - NSData *encodedRequest = [self archiveObject:request]; - [archivedRequests addObject:encodedRequest]; - } + // 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 4c2146414..24899a6a4 100644 --- a/BranchSDK/BNCSystemObserver.h +++ b/BranchSDK/BNCSystemObserver.h @@ -28,7 +28,6 @@ + (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 0a0ab24f5..cc4944302 100644 --- a/BranchSDK/BNCSystemObserver.m +++ b/BranchSDK/BNCSystemObserver.m @@ -122,24 +122,6 @@ + (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 2b974b643..5deca2670 100644 --- a/BranchSDK/Branch+Validator.m +++ b/BranchSDK/Branch+Validator.m @@ -11,6 +11,7 @@ #import "BranchConstants.h" #import "BNCApplication.h" #import "BNCEncodingUtils.h" +#import "BNCServerAPI.h" #import "UIViewController+Branch.h" void BNCForceBranchValidatorCategoryToLoad(void) { @@ -41,19 +42,16 @@ - (void)validateSDKIntegrationCore { - (void) startValidation { BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; - 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]; - } - }]; + 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]; + } + }]; } - (void) validateIntegrationWithServerResponse:(BNCServerResponse*)response { diff --git a/BranchSDK/Branch.h b/BranchSDK/Branch.h index e4324e5b3..54bb55377 100644 --- a/BranchSDK/Branch.h +++ b/BranchSDK/Branch.h @@ -16,7 +16,6 @@ // 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" @@ -256,7 +255,6 @@ extern NSString * __nonnull const BNCSpotlightFeature; + (BOOL)branchKeyIsSet; -/// TODO: Add documentation. @property (weak, nullable) NSObject* delegate; //@property (strong, nonatomic, nullable) BranchEvent *testEvent; @@ -919,17 +917,6 @@ 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 12bccd12b..8a307809a 100644 --- a/BranchSDK/Branch.m +++ b/BranchSDK/Branch.m @@ -18,7 +18,6 @@ #import "BNCServerRequestQueue.h" #import "BNCServerResponse.h" #import "BNCSystemObserver.h" -#import "BranchCloseRequest.h" #import "BranchConstants.h" #import "BranchInstallRequest.h" #import "BranchJsonConfig.h" @@ -1119,13 +1118,6 @@ - (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, ^(){ @@ -1742,31 +1734,12 @@ - (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 { @@ -2130,6 +2103,7 @@ - (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 deleted file mode 100644 index df76c49dd..000000000 --- a/BranchSDK/BranchCPIDRequest.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// 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 deleted file mode 100644 index d6bc73f17..000000000 --- a/BranchSDK/BranchCPIDRequest.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// 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 deleted file mode 100644 index e4ca5252c..000000000 --- a/BranchSDK/BranchCloseRequest.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// 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 deleted file mode 100644 index 1d118aee8..000000000 --- a/BranchSDK/BranchCloseRequest.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// 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 fdd1e6049..013622446 100644 --- a/BranchSDK/BranchConstants.h +++ b/BranchSDK/BranchConstants.h @@ -38,7 +38,6 @@ 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; @@ -87,11 +86,9 @@ 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 3f56480a5..f4d12989d 100644 --- a/BranchSDK/BranchConstants.m +++ b/BranchSDK/BranchConstants.m @@ -34,7 +34,6 @@ 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"; @@ -82,11 +81,9 @@ 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 deleted file mode 100644 index 23e274472..000000000 --- a/BranchSDK/BranchCrossPlatformID.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// 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 deleted file mode 100644 index fed4dd0fb..000000000 --- a/BranchSDK/BranchCrossPlatformID.m +++ /dev/null @@ -1,82 +0,0 @@ -// -// 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 5eb6da704..8fbf82b6b 100644 --- a/BranchSDK/BranchDelegate.h +++ b/BranchSDK/BranchDelegate.h @@ -6,8 +6,6 @@ // 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 7e20dd229..a7c9703cf 100644 --- a/BranchSDK/BranchEvent.m +++ b/BranchSDK/BranchEvent.m @@ -16,6 +16,8 @@ #import "BNCPartnerParameters.h" #import "BNCPreferenceHelper.h" #import "BNCEventUtils.h" +#import "BNCRequestFactory.h" +#import "BNCServerAPI.h" #pragma mark BranchStandardEvents @@ -73,10 +75,11 @@ - (instancetype) initWithServerURL:(NSURL*)serverURL - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { - [serverInterface postRequest:self.eventDictionary - url:[self.serverURL absoluteString] - key:key - callback: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]; } - (void)processResponse:(BNCServerResponse*)response error:(NSError*)error { @@ -302,13 +305,11 @@ - (void) logEvent { [self logEventWithCompletion:nil]; } -- (BranchEventRequest *)buildRequestWithEventDictionary:(NSDictionary *)eventDictionary { - BNCPreferenceHelper *preferenceHelper = [BNCPreferenceHelper sharedInstance]; - +- (BranchEventRequest *)buildRequestWithEventDictionary:(NSDictionary *)eventDictionary { NSString *serverURL = ([self.class.standardEvents containsObject:self.eventName]) - ? [NSString stringWithFormat:@"%@/%@", preferenceHelper.branchAPIURL, @"v2/event/standard"] - : [NSString stringWithFormat:@"%@/%@", preferenceHelper.branchAPIURL, @"v2/event/custom"]; + ? [[BNCServerAPI sharedInstance] standardEventServiceURL] + : [[BNCServerAPI sharedInstance] customEventServiceURL]; BranchEventRequest *request = [[BranchEventRequest alloc] @@ -351,19 +352,6 @@ - (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 f00ca9227..8bcc5dd13 100644 --- a/BranchSDK/BranchInstallRequest.m +++ b/BranchSDK/BranchInstallRequest.m @@ -7,15 +7,10 @@ // #import "BranchInstallRequest.h" -#import "BNCPreferenceHelper.h" -#import "BNCSystemObserver.h" +#import "BNCServerAPI.h" #import "BranchConstants.h" -#import "BNCEncodingUtils.h" -#import "BNCApplication.h" -#import "BNCAppleReceipt.h" -#import "BNCAppGroupsData.h" -#import "BNCPartnerParameters.h" -#import "BNCPasteboard.h" + +#import "BNCRequestFactory.h" @implementation BranchInstallRequest @@ -24,69 +19,10 @@ - (id)initWithCallback:(callbackWithStatus)callback { } - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { - 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]; + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; + NSDictionary *params = [factory dataForInstall]; - [serverInterface postRequest:params url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_INSTALL] key:key callback:callback]; + [serverInterface postRequest:params url:[[BNCServerAPI sharedInstance] installServiceURL] key:key callback:callback]; } - (NSString *)getActionName { diff --git a/BranchSDK/BranchLATDRequest.m b/BranchSDK/BranchLATDRequest.m index adc77f325..330cf3cf9 100644 --- a/BranchSDK/BranchLATDRequest.m +++ b/BranchSDK/BranchLATDRequest.m @@ -9,6 +9,8 @@ #import "BranchLATDRequest.h" #import "BNCPreferenceHelper.h" #import "BranchConstants.h" +#import "BNCServerAPI.h" +#import "BNCRequestFactory.h" @implementation BranchLATDRequest @@ -21,18 +23,19 @@ - (instancetype)init { } - (NSString *)serverURL { - return [[BNCPreferenceHelper sharedInstance] getAPIURL:BRANCH_REQUEST_ENDPOINT_LATD]; + return [[BNCServerAPI sharedInstance] latdServiceURL]; } -- (NSMutableDictionary *)buildRequestParams { +- (NSMutableDictionary *)dataDictionary { NSMutableDictionary *params = [NSMutableDictionary new]; [params setObject:@(self.attributionWindow) forKey:@"attribution_window"]; 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]; + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; + NSDictionary *json = [factory dataForLATDWithDataDictionary:[self dataDictionary]]; + [serverInterface postRequest:json 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 305bf4ab3..316ae3d42 100644 --- a/BranchSDK/BranchOpenRequest.h +++ b/BranchSDK/BranchOpenRequest.h @@ -12,7 +12,6 @@ @interface BranchOpenRequest : BNCServerRequest @property (nonatomic, copy) callbackWithStatus callback; -@property (assign, nonatomic) BOOL clearLocalURL; + (void) waitForOpenResponseLock; + (void) releaseOpenResponseLock; @@ -20,6 +19,5 @@ - (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 cb13a2ec1..2b2ec894c 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" -#import "BNCAppleReceipt.h" + +// used to call SKAN based on response #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" -#if !TARGET_OS_TV -#import "BranchContentDiscoveryManifest.h" -#import "BranchContentDiscoverer.h" -#endif +#import "BNCServerAPI.h" @interface BranchOpenRequest () @property (assign, nonatomic) BOOL isInstall; @@ -46,95 +46,15 @@ - (id)initWithCallback:(callbackWithStatus)callback isInstall:(BOOL)isInstall { } - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { - 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; - } - } - } + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; + NSDictionary *params = [factory dataForOpen]; - 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:[preferenceHelper - getAPIURL:BRANCH_REQUEST_ENDPOINT_OPEN] + url:[[BNCServerAPI sharedInstance] openServiceURL] 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) { @@ -246,7 +166,6 @@ - (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) { @@ -258,22 +177,7 @@ - (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 1ece5e656..d2f4cfe20 100644 --- a/BranchSDK/BranchPluginSupport.h +++ b/BranchSDK/BranchPluginSupport.h @@ -13,6 +13,7 @@ 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. @@ -20,7 +21,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 567d31985..36b710c8b 100644 --- a/BranchSDK/BranchPluginSupport.m +++ b/BranchSDK/BranchPluginSupport.m @@ -54,21 +54,22 @@ + (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([NSString stringWithFormat:@"Not setting url - %@. Its invalid.", url]); - [[BNCPreferenceHelper sharedInstance] setBranchAPIURL:BNC_API_BASE_URL]; + BNCLogWarning(@"Ignoring invalid custom API URL"); } } +// Overrides base CDN URL + (void)setCDNBaseUrl:(NSString *)url { if([url hasPrefix:@"http://"] || [url hasPrefix:@"https://"] ){ [[BNCPreferenceHelper sharedInstance] setPatternListURL:url]; } else { - BNCLogWarning([NSString stringWithFormat:@"Not setting url - %@. Its invalid.", url]); - [[BNCPreferenceHelper sharedInstance] setPatternListURL:BNC_CDN_URL]; + BNCLogWarning(@"Ignoring invalid custom CDN URL"); } } diff --git a/BranchSDK/BranchQRCode.m b/BranchSDK/BranchQRCode.m index 2aad02ea9..6000e6a1a 100644 --- a/BranchSDK/BranchQRCode.m +++ b/BranchSDK/BranchQRCode.m @@ -14,6 +14,7 @@ #import "NSError+Branch.h" #import "UIViewController+Branch.h" #import "BNCLog.h" +#import "BNCServerAPI.h" @interface BranchQRCode() @property (nonatomic, copy, readwrite) NSString *buoTitle; @@ -125,8 +126,7 @@ - (void)callQRCodeAPI:(nullable NSDictionary *)params completion:(void(^)(NSData * _Nullable qrCode, NSError * _Nullable error))completion { NSError *error; - NSString *branchAPIURL = [BNC_API_BASE_URL copy]; - NSString *urlString = [NSString stringWithFormat: @"%@/v1/qr-code", branchAPIURL]; + NSString *urlString = [[BNCServerAPI sharedInstance] qrcodeServiceURL]; NSURL *url = [NSURL URLWithString: urlString]; NSURLSession *session = [NSURLSession sharedSession]; diff --git a/BranchSDK/BranchRegisterViewRequest.h b/BranchSDK/BranchRegisterViewRequest.h deleted file mode 100644 index 5b17d6014..000000000 --- a/BranchSDK/BranchRegisterViewRequest.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// 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 deleted file mode 100644 index 5b1c29de1..000000000 --- a/BranchSDK/BranchRegisterViewRequest.m +++ /dev/null @@ -1,84 +0,0 @@ -// -// 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 a597f9124..7ce0400f2 100644 --- a/BranchSDK/BranchShortUrlRequest.m +++ b/BranchSDK/BranchShortUrlRequest.m @@ -11,6 +11,8 @@ #import "BNCEncodingUtils.h" #import "BranchConstants.h" #import "BNCConfig.h" +#import "BNCRequestFactory.h" +#import "BNCServerAPI.h" @interface BranchShortUrlRequest () @@ -54,18 +56,12 @@ - (id)initWithTags:(NSArray *)tags alias:(NSString *)alias type:(BranchLinkType) - (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback { - 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; - } + + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; + NSDictionary *json = [factory dataForShortURLWithLinkDataDictionary:[self.linkData.data mutableCopy] isSpotlightRequest:self.isSpotlightRequest]; - [serverInterface postRequest:params - url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL] + [serverInterface postRequest:json + url:[[BNCServerAPI sharedInstance] linkServiceURL] key:key callback:callback]; } diff --git a/BranchSDK/BranchShortUrlSyncRequest.m b/BranchSDK/BranchShortUrlSyncRequest.m index 84939f4a1..2526af572 100644 --- a/BranchSDK/BranchShortUrlSyncRequest.m +++ b/BranchSDK/BranchShortUrlSyncRequest.m @@ -12,6 +12,8 @@ #import "BranchConstants.h" #import "BNCConfig.h" #import "BNCLog.h" +#import "BNCRequestFactory.h" +#import "BNCServerAPI.h" @interface BranchShortUrlSyncRequest () @@ -50,17 +52,11 @@ - (id)initWithTags:(NSArray *)tags alias:(NSString *)alias type:(BranchLinkType) } - (BNCServerResponse *)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key { - 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; - } + BNCRequestFactory *factory = [[BNCRequestFactory alloc] initWithBranchKey:key]; + NSDictionary *json = [factory dataForShortURLWithLinkDataDictionary:[self.linkData.data mutableCopy] isSpotlightRequest:NO]; - return [serverInterface postRequestSynchronous:params - url:[preferenceHelper getAPIURL:BRANCH_REQUEST_ENDPOINT_GET_SHORT_URL] + return [serverInterface postRequestSynchronous:json + url:[[BNCServerAPI sharedInstance] linkServiceURL] key:key]; } diff --git a/BranchSDK/BranchUniversalObject.m b/BranchSDK/BranchUniversalObject.m index 0311b1237..fb771747b 100644 --- a/BranchSDK/BranchUniversalObject.m +++ b/BranchSDK/BranchUniversalObject.m @@ -519,7 +519,6 @@ - (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/Framework/BranchSDK.h b/Framework/BranchSDK.h index df72d63e2..bc23920bd 100644 --- a/Framework/BranchSDK.h +++ b/Framework/BranchSDK.h @@ -25,7 +25,6 @@ FOUNDATION_EXPORT const unsigned char BranchSDKVersionString[]; #import #import -#import #import #import