Skip to content

Commit

Permalink
Merge branch 'master' into SDK-2095
Browse files Browse the repository at this point in the history
  • Loading branch information
nsingh-branch authored Oct 10, 2023
2 parents 24e8a83 + 8e353a9 commit df29f6b
Show file tree
Hide file tree
Showing 13 changed files with 499 additions and 12 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/sync-readme-changelog.yml
Original file line number Diff line number Diff line change
@@ -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 }}

194 changes: 194 additions & 0 deletions Branch-TestBed/Branch-SDK-Tests/BNCCurrencyTests.m
Original file line number Diff line number Diff line change
@@ -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 <XCTest/XCTest.h>
#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
4 changes: 4 additions & 0 deletions Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -547,6 +548,7 @@
C12320B6280E2060007771C0 /* BranchQRCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BranchQRCode.h; sourceTree = "<group>"; };
C12320B8280E2091007771C0 /* BranchQRCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchQRCode.m; sourceTree = "<group>"; };
C15CC9DF2ABCF8C8003CC339 /* BranchActivityItemTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchActivityItemTests.m; sourceTree = "<group>"; };
C15CC9DD2ABCB549003CC339 /* BNCCurrencyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCCurrencyTests.m; sourceTree = "<group>"; };
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 = "<group>"; };
C1614D5B285BD4AF0098946B /* BranchPluginSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchPluginSupport.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -701,6 +703,7 @@
E7A728BC2AA9A112009343B7 /* BNCAPIServerTest.m */,
C15CC9DF2ABCF8C8003CC339 /* BranchActivityItemTests.m */,
C17DAF7A2AC20C2000B16B1A /* BranchClassTests.m */,
C15CC9DD2ABCB549003CC339 /* BNCCurrencyTests.m */,
);
path = "Branch-SDK-Tests";
sourceTree = "<group>";
Expand Down Expand Up @@ -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 */,
Expand Down
3 changes: 2 additions & 1 deletion BranchSDK.podspec
Original file line number Diff line number Diff line change
@@ -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?
Expand All @@ -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}"
Expand Down
Loading

0 comments on commit df29f6b

Please sign in to comment.