diff --git a/.github/workflows/sync-readme-changelog.yml b/.github/workflows/sync-readme-changelog.yml new file mode 100644 index 000000000..b19b9c1a6 --- /dev/null +++ b/.github/workflows/sync-readme-changelog.yml @@ -0,0 +1,98 @@ +name: Update Version History on ReadMe + +on: + release: + types: [published] + +jobs: + update-changelog: + runs-on: ubuntu-latest + + steps: + - name: Format and publish release notes to version history doc + id: update + run: | + # Get release name, body, and date from the release event + release_name="${{ github.event.release.tag_name }}" + release_body="${{ github.event.release.body }}" + release_date=$(date -d "${{ github.event.release.published_at }}" +"%Y-%B-%d") + + # Format release notes + formatted_notes="## v$release_name\n\n**($release_date)**\n\n$release_body" + + # Get existing version history page + existing_content=$(curl --request GET \ + --url https://dash.readme.com/api/v1/docs/ios-version-history \ + --header 'accept: application/json' \ + --header "authorization: Basic ${{ secrets.readme_api_key_base64 }}" \ + | jq -r '.body') + + # Prepend new release notes to existing content + new_content=$(echo -e "$formatted_notes\n\n$existing_content") + payload=$(jq -n --arg nc "$new_content" '{"body": $nc}') + + # Update version history page with new release notes + curl --request PUT \ + --url https://dash.readme.com/api/v1/docs/ios-version-history \ + --header 'accept: application/json' \ + --header "authorization: Basic ${{ secrets.readme_api_key_base64 }}" \ + --header 'content-type: application/json' \ + --data "$payload" + + - name: Announce New Release in Slack + uses: slackapi/slack-github-action@v1.24.0 + with: + channel-id: "CDFGXRM9S" + payload: | + { + "text": "New Release: Branch iOS SDK v${{ github.event.release.tag_name }}", + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": ":rocket: New Release: Branch iOS SDK v${{ github.event.release.tag_name }}", + "emoji": true + } + }, + { + "type": "divider" + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":star: *What's New*" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ${{ toJSON(github.event.release.body) }} + } + }, + { + "type": "divider" + }, + { + "type": "actions", + "elements": [ + { + "type": "button", + "text": { + "type": "plain_text", + "text": ":git: GitHub Release", + "emoji": true + }, + "value": "github", + "action_id": "github", + "url": "${{ github.event.release.html_url }}" + } + ] + } + ] + } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_SDK_BOT_TOKEN }} + diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCCurrencyTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCCurrencyTests.m new file mode 100644 index 000000000..ec24da0f8 --- /dev/null +++ b/Branch-TestBed/Branch-SDK-Tests/BNCCurrencyTests.m @@ -0,0 +1,194 @@ +// +// BNCCurrencyTests.m +// Branch-SDK-Tests +// +// Created by Nipun Singh on 9/21/23. +// Copyright © 2023 Branch, Inc. All rights reserved. +// + +#import +#import "BNCCurrency.h" + +@interface BNCCurrencyTests : XCTestCase +@end + +@implementation BNCCurrencyTests + +- (void)testEnumValues { + XCTAssertEqualObjects(BNCCurrencyAED, @"AED"); + XCTAssertEqualObjects(BNCCurrencyAFN, @"AFN"); + XCTAssertEqualObjects(BNCCurrencyALL, @"ALL"); + XCTAssertEqualObjects(BNCCurrencyAMD, @"AMD"); + XCTAssertEqualObjects(BNCCurrencyANG, @"ANG"); + XCTAssertEqualObjects(BNCCurrencyAOA, @"AOA"); + XCTAssertEqualObjects(BNCCurrencyARS, @"ARS"); + XCTAssertEqualObjects(BNCCurrencyAUD, @"AUD"); + XCTAssertEqualObjects(BNCCurrencyAWG, @"AWG"); + XCTAssertEqualObjects(BNCCurrencyAZN, @"AZN"); + XCTAssertEqualObjects(BNCCurrencyBAM, @"BAM"); + XCTAssertEqualObjects(BNCCurrencyBBD, @"BBD"); + XCTAssertEqualObjects(BNCCurrencyBDT, @"BDT"); + XCTAssertEqualObjects(BNCCurrencyBGN, @"BGN"); + XCTAssertEqualObjects(BNCCurrencyBHD, @"BHD"); + XCTAssertEqualObjects(BNCCurrencyBIF, @"BIF"); + XCTAssertEqualObjects(BNCCurrencyBMD, @"BMD"); + XCTAssertEqualObjects(BNCCurrencyBND, @"BND"); + XCTAssertEqualObjects(BNCCurrencyBOB, @"BOB"); + XCTAssertEqualObjects(BNCCurrencyBOV, @"BOV"); + XCTAssertEqualObjects(BNCCurrencyBRL, @"BRL"); + XCTAssertEqualObjects(BNCCurrencyBSD, @"BSD"); + XCTAssertEqualObjects(BNCCurrencyBTN, @"BTN"); + XCTAssertEqualObjects(BNCCurrencyBWP, @"BWP"); + XCTAssertEqualObjects(BNCCurrencyBYN, @"BYN"); + XCTAssertEqualObjects(BNCCurrencyBYR, @"BYR"); + XCTAssertEqualObjects(BNCCurrencyBZD, @"BZD"); + XCTAssertEqualObjects(BNCCurrencyCAD, @"CAD"); + XCTAssertEqualObjects(BNCCurrencyCDF, @"CDF"); + XCTAssertEqualObjects(BNCCurrencyCHE, @"CHE"); + XCTAssertEqualObjects(BNCCurrencyCHF, @"CHF"); + XCTAssertEqualObjects(BNCCurrencyCHW, @"CHW"); + XCTAssertEqualObjects(BNCCurrencyCLF, @"CLF"); + XCTAssertEqualObjects(BNCCurrencyCLP, @"CLP"); + XCTAssertEqualObjects(BNCCurrencyCNY, @"CNY"); + XCTAssertEqualObjects(BNCCurrencyCOP, @"COP"); + XCTAssertEqualObjects(BNCCurrencyCOU, @"COU"); + XCTAssertEqualObjects(BNCCurrencyCRC, @"CRC"); + XCTAssertEqualObjects(BNCCurrencyCUC, @"CUC"); + XCTAssertEqualObjects(BNCCurrencyCUP, @"CUP"); + XCTAssertEqualObjects(BNCCurrencyCVE, @"CVE"); + XCTAssertEqualObjects(BNCCurrencyCZK, @"CZK"); + XCTAssertEqualObjects(BNCCurrencyDJF, @"DJF"); + XCTAssertEqualObjects(BNCCurrencyDKK, @"DKK"); + XCTAssertEqualObjects(BNCCurrencyDOP, @"DOP"); + XCTAssertEqualObjects(BNCCurrencyDZD, @"DZD"); + XCTAssertEqualObjects(BNCCurrencyEGP, @"EGP"); + XCTAssertEqualObjects(BNCCurrencyERN, @"ERN"); + XCTAssertEqualObjects(BNCCurrencyETB, @"ETB"); + XCTAssertEqualObjects(BNCCurrencyEUR, @"EUR"); + XCTAssertEqualObjects(BNCCurrencyFJD, @"FJD"); + XCTAssertEqualObjects(BNCCurrencyFKP, @"FKP"); + XCTAssertEqualObjects(BNCCurrencyGBP, @"GBP"); + XCTAssertEqualObjects(BNCCurrencyGEL, @"GEL"); + XCTAssertEqualObjects(BNCCurrencyGHS, @"GHS"); + XCTAssertEqualObjects(BNCCurrencyGIP, @"GIP"); + XCTAssertEqualObjects(BNCCurrencyGMD, @"GMD"); + XCTAssertEqualObjects(BNCCurrencyGNF, @"GNF"); + XCTAssertEqualObjects(BNCCurrencyGTQ, @"GTQ"); + XCTAssertEqualObjects(BNCCurrencyGYD, @"GYD"); + XCTAssertEqualObjects(BNCCurrencyHKD, @"HKD"); + XCTAssertEqualObjects(BNCCurrencyHNL, @"HNL"); + XCTAssertEqualObjects(BNCCurrencyHRK, @"HRK"); + XCTAssertEqualObjects(BNCCurrencyHTG, @"HTG"); + XCTAssertEqualObjects(BNCCurrencyHUF, @"HUF"); + XCTAssertEqualObjects(BNCCurrencyIDR, @"IDR"); + XCTAssertEqualObjects(BNCCurrencyILS, @"ILS"); + XCTAssertEqualObjects(BNCCurrencyINR, @"INR"); + XCTAssertEqualObjects(BNCCurrencyIQD, @"IQD"); + XCTAssertEqualObjects(BNCCurrencyIRR, @"IRR"); + XCTAssertEqualObjects(BNCCurrencyISK, @"ISK"); + XCTAssertEqualObjects(BNCCurrencyJMD, @"JMD"); + XCTAssertEqualObjects(BNCCurrencyJOD, @"JOD"); + XCTAssertEqualObjects(BNCCurrencyJPY, @"JPY"); + XCTAssertEqualObjects(BNCCurrencyKES, @"KES"); + XCTAssertEqualObjects(BNCCurrencyKGS, @"KGS"); + XCTAssertEqualObjects(BNCCurrencyKHR, @"KHR"); + XCTAssertEqualObjects(BNCCurrencyKMF, @"KMF"); + XCTAssertEqualObjects(BNCCurrencyKPW, @"KPW"); + XCTAssertEqualObjects(BNCCurrencyKRW, @"KRW"); + XCTAssertEqualObjects(BNCCurrencyKWD, @"KWD"); + XCTAssertEqualObjects(BNCCurrencyKYD, @"KYD"); + XCTAssertEqualObjects(BNCCurrencyKZT, @"KZT"); + XCTAssertEqualObjects(BNCCurrencyLAK, @"LAK"); + XCTAssertEqualObjects(BNCCurrencyLBP, @"LBP"); + XCTAssertEqualObjects(BNCCurrencyLKR, @"LKR"); + XCTAssertEqualObjects(BNCCurrencyLRD, @"LRD"); + XCTAssertEqualObjects(BNCCurrencyLSL, @"LSL"); + XCTAssertEqualObjects(BNCCurrencyLYD, @"LYD"); + XCTAssertEqualObjects(BNCCurrencyMAD, @"MAD"); + XCTAssertEqualObjects(BNCCurrencyMDL, @"MDL"); + XCTAssertEqualObjects(BNCCurrencyMGA, @"MGA"); + XCTAssertEqualObjects(BNCCurrencyMKD, @"MKD"); + XCTAssertEqualObjects(BNCCurrencyMMK, @"MMK"); + XCTAssertEqualObjects(BNCCurrencyMNT, @"MNT"); + XCTAssertEqualObjects(BNCCurrencyMOP, @"MOP"); + XCTAssertEqualObjects(BNCCurrencyMRO, @"MRO"); + XCTAssertEqualObjects(BNCCurrencyMUR, @"MUR"); + XCTAssertEqualObjects(BNCCurrencyMVR, @"MVR"); + XCTAssertEqualObjects(BNCCurrencyMWK, @"MWK"); + XCTAssertEqualObjects(BNCCurrencyMXN, @"MXN"); + XCTAssertEqualObjects(BNCCurrencyMXV, @"MXV"); + XCTAssertEqualObjects(BNCCurrencyMYR, @"MYR"); + XCTAssertEqualObjects(BNCCurrencyMZN, @"MZN"); + XCTAssertEqualObjects(BNCCurrencyNAD, @"NAD"); + XCTAssertEqualObjects(BNCCurrencyNGN, @"NGN"); + XCTAssertEqualObjects(BNCCurrencyNIO, @"NIO"); + XCTAssertEqualObjects(BNCCurrencyNOK, @"NOK"); + XCTAssertEqualObjects(BNCCurrencyNPR, @"NPR"); + XCTAssertEqualObjects(BNCCurrencyNZD, @"NZD"); + XCTAssertEqualObjects(BNCCurrencyOMR, @"OMR"); + XCTAssertEqualObjects(BNCCurrencyPAB, @"PAB"); + XCTAssertEqualObjects(BNCCurrencyPEN, @"PEN"); + XCTAssertEqualObjects(BNCCurrencyPGK, @"PGK"); + XCTAssertEqualObjects(BNCCurrencyPHP, @"PHP"); + XCTAssertEqualObjects(BNCCurrencyPKR, @"PKR"); + XCTAssertEqualObjects(BNCCurrencyPLN, @"PLN"); + XCTAssertEqualObjects(BNCCurrencyPYG, @"PYG"); + XCTAssertEqualObjects(BNCCurrencyQAR, @"QAR"); + XCTAssertEqualObjects(BNCCurrencyRON, @"RON"); + XCTAssertEqualObjects(BNCCurrencyRSD, @"RSD"); + XCTAssertEqualObjects(BNCCurrencyRUB, @"RUB"); + XCTAssertEqualObjects(BNCCurrencyRWF, @"RWF"); + XCTAssertEqualObjects(BNCCurrencySAR, @"SAR"); + XCTAssertEqualObjects(BNCCurrencySBD, @"SBD"); + XCTAssertEqualObjects(BNCCurrencySCR, @"SCR"); + XCTAssertEqualObjects(BNCCurrencySDG, @"SDG"); + XCTAssertEqualObjects(BNCCurrencySEK, @"SEK"); + XCTAssertEqualObjects(BNCCurrencySGD, @"SGD"); + XCTAssertEqualObjects(BNCCurrencySHP, @"SHP"); + XCTAssertEqualObjects(BNCCurrencySLL, @"SLL"); + XCTAssertEqualObjects(BNCCurrencySOS, @"SOS"); + XCTAssertEqualObjects(BNCCurrencySRD, @"SRD"); + XCTAssertEqualObjects(BNCCurrencySSP, @"SSP"); + XCTAssertEqualObjects(BNCCurrencySTD, @"STD"); + XCTAssertEqualObjects(BNCCurrencySYP, @"SYP"); + XCTAssertEqualObjects(BNCCurrencySZL, @"SZL"); + XCTAssertEqualObjects(BNCCurrencyTHB, @"THB"); + XCTAssertEqualObjects(BNCCurrencyTJS, @"TJS"); + XCTAssertEqualObjects(BNCCurrencyTMT, @"TMT"); + XCTAssertEqualObjects(BNCCurrencyTND, @"TND"); + XCTAssertEqualObjects(BNCCurrencyTOP, @"TOP"); + XCTAssertEqualObjects(BNCCurrencyTRY, @"TRY"); + XCTAssertEqualObjects(BNCCurrencyTTD, @"TTD"); + XCTAssertEqualObjects(BNCCurrencyTWD, @"TWD"); + XCTAssertEqualObjects(BNCCurrencyTZS, @"TZS"); + XCTAssertEqualObjects(BNCCurrencyUAH, @"UAH"); + XCTAssertEqualObjects(BNCCurrencyUGX, @"UGX"); + XCTAssertEqualObjects(BNCCurrencyUSD, @"USD"); + XCTAssertEqualObjects(BNCCurrencyUSN, @"USN"); + XCTAssertEqualObjects(BNCCurrencyUYI, @"UYI"); + XCTAssertEqualObjects(BNCCurrencyUYU, @"UYU"); + XCTAssertEqualObjects(BNCCurrencyUZS, @"UZS"); + XCTAssertEqualObjects(BNCCurrencyVEF, @"VEF"); + XCTAssertEqualObjects(BNCCurrencyVND, @"VND"); + XCTAssertEqualObjects(BNCCurrencyVUV, @"VUV"); + XCTAssertEqualObjects(BNCCurrencyWST, @"WST"); + XCTAssertEqualObjects(BNCCurrencyXAF, @"XAF"); + XCTAssertEqualObjects(BNCCurrencyXAG, @"XAG"); + XCTAssertEqualObjects(BNCCurrencyXAU, @"XAU"); + XCTAssertEqualObjects(BNCCurrencyXCD, @"XCD"); + XCTAssertEqualObjects(BNCCurrencyXDR, @"XDR"); + XCTAssertEqualObjects(BNCCurrencyXOF, @"XOF"); + XCTAssertEqualObjects(BNCCurrencyXPD, @"XPD"); + XCTAssertEqualObjects(BNCCurrencyXPF, @"XPF"); + XCTAssertEqualObjects(BNCCurrencyXPT, @"XPT"); + XCTAssertEqualObjects(BNCCurrencyXSU, @"XSU"); + XCTAssertEqualObjects(BNCCurrencyXTS, @"XTS"); + XCTAssertEqualObjects(BNCCurrencyXUA, @"XUA"); + XCTAssertEqualObjects(BNCCurrencyXXX, @"XXX"); + XCTAssertEqualObjects(BNCCurrencyYER, @"YER"); + XCTAssertEqualObjects(BNCCurrencyZAR, @"ZAR"); + XCTAssertEqualObjects(BNCCurrencyZMW, @"ZMW"); +} + + +@end diff --git a/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj b/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj index 5eb44c040..c235b3026 100644 --- a/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj +++ b/Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj @@ -229,6 +229,7 @@ C12320B7280E2060007771C0 /* BranchQRCode.h in Headers */ = {isa = PBXBuildFile; fileRef = C12320B6280E2060007771C0 /* BranchQRCode.h */; settings = {ATTRIBUTES = (Public, ); }; }; C12320B9280E2091007771C0 /* BranchQRCode.m in Sources */ = {isa = PBXBuildFile; fileRef = C12320B8280E2091007771C0 /* BranchQRCode.m */; }; C15CC9E02ABCF8C8003CC339 /* BranchActivityItemTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C15CC9DF2ABCF8C8003CC339 /* BranchActivityItemTests.m */; }; + C15CC9DE2ABCB549003CC339 /* BNCCurrencyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C15CC9DD2ABCB549003CC339 /* BNCCurrencyTests.m */; }; C1614D56285BC8A00098946B /* LinkPresentation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1614D55285BC8A00098946B /* LinkPresentation.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; C1614D5C285BD4AF0098946B /* BranchPluginSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = C1614D5A285BD4AF0098946B /* BranchPluginSupport.h */; }; C1614D5D285BD4AF0098946B /* BranchPluginSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = C1614D5B285BD4AF0098946B /* BranchPluginSupport.m */; }; @@ -547,6 +548,7 @@ C12320B6280E2060007771C0 /* BranchQRCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchQRCode.h; sourceTree = ""; }; C12320B8280E2091007771C0 /* BranchQRCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchQRCode.m; sourceTree = ""; }; C15CC9DF2ABCF8C8003CC339 /* BranchActivityItemTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchActivityItemTests.m; sourceTree = ""; }; + C15CC9DD2ABCB549003CC339 /* BNCCurrencyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCCurrencyTests.m; sourceTree = ""; }; C1614D55285BC8A00098946B /* LinkPresentation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LinkPresentation.framework; path = System/Library/Frameworks/LinkPresentation.framework; sourceTree = SDKROOT; }; C1614D5A285BD4AF0098946B /* BranchPluginSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchPluginSupport.h; sourceTree = ""; }; C1614D5B285BD4AF0098946B /* BranchPluginSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchPluginSupport.m; sourceTree = ""; }; @@ -701,6 +703,7 @@ E7A728BC2AA9A112009343B7 /* BNCAPIServerTest.m */, C15CC9DF2ABCF8C8003CC339 /* BranchActivityItemTests.m */, C17DAF7A2AC20C2000B16B1A /* BranchClassTests.m */, + C15CC9DD2ABCB549003CC339 /* BNCCurrencyTests.m */, ); path = "Branch-SDK-Tests"; sourceTree = ""; @@ -1448,6 +1451,7 @@ 5FD1786E26DEE49D009696E3 /* BNCPasteboardTests.m in Sources */, 5F92B242238752A500CA909B /* BNCDeviceInfoTests.m in Sources */, 4D1683C62098C902008819E3 /* BranchEvent.Test.m in Sources */, + C15CC9DE2ABCB549003CC339 /* BNCCurrencyTests.m in Sources */, C10F393A27A0872800BF5D36 /* BranchPluginSupportTests.m in Sources */, 5F83B9ED2433BAAA0054A022 /* BNCServerInterface.Test.m in Sources */, 5F205D0823186AF700C776D1 /* BNCUserAgentCollectorTests.m in Sources */, diff --git a/BranchSDK.podspec b/BranchSDK.podspec index 13817fef4..555f13065 100644 --- a/BranchSDK.podspec +++ b/BranchSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "BranchSDK" - s.version = "2.2.1" + s.version = "3.0.0" s.summary = "Create an HTTP URL for any piece of content in your app" s.description = <<-DESC - Want the highest possible conversions on your sharing feature? @@ -18,6 +18,7 @@ Use the Branch SDK (branch.io) to create and power the links that point back to s.ios.deployment_target = '12.0' s.tvos.deployment_target = '12.0' + s.resources = ["BranchSDK/*.{xcprivacy}"] s.ios.source_files = "BranchSDK/*.{h,m}" s.tvos.source_files = "BranchSDK/*.{h,m}" diff --git a/BranchSDK.xcodeproj/project.pbxproj b/BranchSDK.xcodeproj/project.pbxproj index 26ccae7a7..6c2392513 100644 --- a/BranchSDK.xcodeproj/project.pbxproj +++ b/BranchSDK.xcodeproj/project.pbxproj @@ -315,6 +315,9 @@ 5F79042F28B5C93F003144CD /* NSMutableDictionary+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210352894A33E00C5B190 /* NSMutableDictionary+Branch.m */; }; 5F79043028B5C93F003144CD /* NSString+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F22102A2894A33E00C5B190 /* NSString+Branch.m */; }; 5F79043128B5C93F003144CD /* UIViewController+Branch.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210412894A33E00C5B190 /* UIViewController+Branch.m */; }; + 5FC446652ACCB97000FF1C87 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */; }; + 5FC446662ACCB97100FF1C87 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */; }; + 5FC446672ACCB97200FF1C87 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */; }; 5FF2AFE028E7C22400393216 /* BranchSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FF2AFDF28E7C22100393216 /* BranchSDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF2AFE128E7C22400393216 /* BranchSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FF2AFDF28E7C22100393216 /* BranchSDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5FF9DDFB28EE78A700D62DE1 /* BNCAppGroupsData.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2210A32894A34000C5B190 /* BNCAppGroupsData.m */; }; @@ -479,9 +482,9 @@ E7653F052A9E737700C7C040 /* BNCServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = E7653F042A9E737700C7C040 /* BNCServerAPI.m */; }; E7653F062A9E737700C7C040 /* BNCServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = E7653F042A9E737700C7C040 /* BNCServerAPI.m */; }; E7653F072A9E737700C7C040 /* BNCServerAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = E7653F042A9E737700C7C040 /* BNCServerAPI.m */; }; - E7653F092A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E7653F0A2A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E7653F0B2A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E7653F092A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; }; + E7653F0A2A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; }; + E7653F0B2A9E73AA00C7C040 /* BNCServerAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E7653F082A9E73AA00C7C040 /* BNCServerAPI.h */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -677,6 +680,7 @@ 5F73EC0128EDEAC200608601 /* build_static_xcframework.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_static_xcframework.sh; sourceTree = ""; }; 5F73EC0228EDEAC200608601 /* build_xcframework_noidfa.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_xcframework_noidfa.sh; sourceTree = ""; }; 5F79038C28B5765D003144CD /* BranchSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BranchSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 5FF2AFDC28E7BF8A00393216 /* build_xcframework.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_xcframework.sh; sourceTree = ""; }; 5FF2AFDE28E7C22100393216 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; 5FF2AFDF28E7C22100393216 /* BranchSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchSDK.h; sourceTree = ""; }; @@ -969,6 +973,7 @@ children = ( 5FF2AFDF28E7C22100393216 /* BranchSDK.h */, 5FF2AFDE28E7C22100393216 /* module.modulemap */, + 5FC446642ACCB96000FF1C87 /* PrivacyInfo.xcprivacy */, ); path = Framework; sourceTree = ""; @@ -1401,6 +1406,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 5FC446652ACCB97000FF1C87 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1432,6 +1438,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 5FC446662ACCB97100FF1C87 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1439,6 +1446,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 5FC446672ACCB97200FF1C87 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1945,7 +1953,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.2.1; + MARKETING_VERSION = 3.0.0; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1976,7 +1984,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.2.1; + MARKETING_VERSION = 3.0.0; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2178,7 +2186,7 @@ "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; - MARKETING_VERSION = 2.2.1; + MARKETING_VERSION = 3.0.0; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_MODULE_NAME = BranchSDK; PRODUCT_NAME = BranchSDK; @@ -2213,7 +2221,7 @@ "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; - MARKETING_VERSION = 2.2.1; + MARKETING_VERSION = 3.0.0; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_MODULE_NAME = BranchSDK; PRODUCT_NAME = BranchSDK; @@ -2246,7 +2254,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.2.1; + MARKETING_VERSION = 3.0.0; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_NAME = BranchSDK; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2277,7 +2285,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.2.1; + MARKETING_VERSION = 3.0.0; PRODUCT_BUNDLE_IDENTIFIER = io.branch.BranchSDK; PRODUCT_NAME = BranchSDK; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/BranchSDK/BNCConfig.m b/BranchSDK/BNCConfig.m index 26244bb5a..ba11b7d30 100644 --- a/BranchSDK/BNCConfig.m +++ b/BranchSDK/BNCConfig.m @@ -8,7 +8,7 @@ #include "BNCConfig.h" -NSString * const BNC_SDK_VERSION = @"2.2.1"; +NSString * const BNC_SDK_VERSION = @"3.0.0"; NSString * const BNC_LINK_URL = @"https://bnc.lt"; NSString * const BNC_CDN_URL = @"https://cdn.branch.io"; diff --git a/BranchSDK/Branch.h b/BranchSDK/Branch.h index 54bb55377..820376a8d 100644 --- a/BranchSDK/Branch.h +++ b/BranchSDK/Branch.h @@ -568,6 +568,13 @@ extern NSString * __nonnull const BNCSpotlightFeature; */ - (void)enableLogging; +/** + Send requests to EU endpoints. + + This feature must also be enabled on the server side, otherwise the server will drop requests. Contact your account manager for details. + */ +- (void)useEUEndpoints; + /** setDebug is deprecated and all functionality has been disabled. diff --git a/BranchSDK/Branch.m b/BranchSDK/Branch.m index 8a307809a..24bcf7ef0 100644 --- a/BranchSDK/Branch.m +++ b/BranchSDK/Branch.m @@ -419,6 +419,10 @@ - (void)enableLogging { BNCLogSetDisplayLevel(BNCLogLevelDebug); } +- (void)useEUEndpoints { + [BNCServerAPI sharedInstance].useEUServers = YES; +} + - (void)setDebug { NSLog(@"Branch setDebug is deprecated and all functionality has been disabled. " "If you wish to enable logging, please invoke enableLogging. " diff --git a/BranchSDK/PrivacyInfo.xcprivacy b/BranchSDK/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..1c0043760 --- /dev/null +++ b/BranchSDK/PrivacyInfo.xcprivacy @@ -0,0 +1,72 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + https://api-safetrack.branch.io + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeDeviceID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeThirdPartyAdvertising + NSPrivacyCollectedDataTypePurposeDeveloperAdvertising + NSPrivacyCollectedDataTypePurposeAnalytics + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePerformanceData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDataTypes + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + + diff --git a/ChangeLog.md b/ChangeLog.md index c3b4dc1dc..4d3aa4a2f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,26 @@ Branch iOS SDK Change Log +V.3.0.0 + +- Add a Privacy Manifest for the Branch SDK. App developers may need add an App level Privacy Manifest for data they collect and pass into the Branch SDK. + - Known Issue: When using cocoapods without the `use_frameworks!` option, the build can fail with a duplicate privacy manifest error. Workaround is to manually merge privacy manifests. +- Add support for a tracking domain. When Ads tracking is enabled, the SDK sends event calls to a tracking domain. +- iOS 12 is now the min version +- Xcode 15 is now the min version +- Fix short URL creation via a sharesheet when tracking is disabled +- Add macCatalyst checks +- SetIdentity and Logout are now handled device side +- Remove deprecated code and some data minimization + - Cross Platform ID + - Credits and Referrals + - Close requests + - Facebook App Links + - pre-iOS 14 tracking status. This is always `false` on recent iOS versions. + - Tune data upgrade check + - v1 Branch Events, all events are now v2 Branch Events + - pre-iOS 10 locale support + - Device carrier. This was used for fraud analysis, but is no longer available on new iOS versions. + V.2.2.1 Branch iOS SDK 2.2.1 adds parameter for current SKAN 4.0 Window in /v1/open and /v2/event requests. diff --git a/Framework/PrivacyInfo.xcprivacy b/Framework/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..1c0043760 --- /dev/null +++ b/Framework/PrivacyInfo.xcprivacy @@ -0,0 +1,72 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + https://api-safetrack.branch.io + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeDeviceID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeThirdPartyAdvertising + NSPrivacyCollectedDataTypePurposeDeveloperAdvertising + NSPrivacyCollectedDataTypePurposeAnalytics + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePerformanceData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDataTypes + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + + diff --git a/Gemfile b/Gemfile index b5b6c319e..2e36ecb83 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source 'https://rubygems.org' gem 'cocoapods', '~> 1.9' +gem 'activesupport', '~> 7.0', '<= 7.0.8' gem 'fastlane', '~> 2.69' gem 'pattern_patch', '~> 0.5' gem 'slather' diff --git a/Package.swift b/Package.swift index 6d66f9c42..95d907d84 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.2 +// swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -13,10 +13,15 @@ let package = Package( name: "BranchSDK", targets: ["BranchSDK"]), ], + dependencies: [ + ], targets: [ .target( name: "BranchSDK", path: "BranchSDK", + resources: [ + .copy("PrivacyInfo.xcprivacy"), + ], publicHeadersPath: "", linkerSettings: [ .linkedFramework("CoreServices"),