Skip to content

Commit

Permalink
Merge branch 'staging' into CORE-1916-fix-keychain-and-queue
Browse files Browse the repository at this point in the history
  • Loading branch information
echo-branch committed May 11, 2021
2 parents 656a824 + 172bd5d commit 5e24ca6
Show file tree
Hide file tree
Showing 8 changed files with 346 additions and 20 deletions.
114 changes: 113 additions & 1 deletion carthage-files/BranchSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@
name = "Branch-xcframework";
productName = "Branch-xcframework";
};
5FB6CC042649C7380020E478 /* Branch-xcframework-noidfa */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 5FB6CC062649C7380020E478 /* Build configuration list for PBXAggregateTarget "Branch-xcframework-noidfa" */;
buildPhases = (
5FB6CC052649C7380020E478 /* ShellScript */,
);
dependencies = (
);
name = "Branch-xcframework-noidfa";
productName = "Branch-xcframework";
};
5FB6CC092649C73B0020E478 /* Branch-static-xcframework-noidfa */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 5FB6CC0B2649C73B0020E478 /* Build configuration list for PBXAggregateTarget "Branch-static-xcframework-noidfa" */;
buildPhases = (
5FB6CC0A2649C73B0020E478 /* ShellScript */,
);
dependencies = (
);
name = "Branch-static-xcframework-noidfa";
productName = "Branch-static-xcframework";
};
5FD0FB0E25CE4B8A008200EE /* Branch-static-xcframework */ = {
isa = PBXAggregateTarget;
buildConfigurationList = 5FD0FB0F25CE4B8A008200EE /* Build configuration list for PBXAggregateTarget "Branch-static-xcframework" */;
Expand Down Expand Up @@ -1234,9 +1256,11 @@
targets = (
E298D0511C73D1B800589D22 /* Branch */,
5FC4CF9E2486123F0001E701 /* Branch-tvOS */,
5F85112825B1452100D544A1 /* Branch-xcframework */,
5FD0FA3E25CE46BD008200EE /* Branch-static */,
5F85112825B1452100D544A1 /* Branch-xcframework */,
5FD0FB0E25CE4B8A008200EE /* Branch-static-xcframework */,
5FB6CC042649C7380020E478 /* Branch-xcframework-noidfa */,
5FB6CC092649C73B0020E478 /* Branch-static-xcframework-noidfa */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -1283,6 +1307,40 @@
shellPath = /bin/sh;
shellScript = "# config\nIOS_PATH=\"./build/ios/ios.xcarchive\"\nIOS_SIM_PATH=\"./build/ios/ios_sim.xcarchive\"\nTVOS_PATH=\"./build/tvos/tvos.xcarchive\"\nTVOS_SIM_PATH=\"./build/tvos/tvos_sim.xcarchive\"\nXCFRAMEWORK_PATH=\"./build/Branch.xcframework\"\n\n# delete previous build\nrm -rf \"./build\" \n\n# build iOS framework\nxcodebuild archive \\\n -scheme Branch \\\n -archivePath \"${IOS_PATH}\" \\\n -sdk iphoneos \\\n SKIP_INSTALL=NO\n\n# build iOS simulator framework\nxcodebuild archive \\\n -scheme Branch \\\n -archivePath \"${IOS_SIM_PATH}\" \\\n -sdk iphonesimulator \\\n SKIP_INSTALL=NO\n\n# build tvOS framework\nxcodebuild archive \\\n -scheme Branch-tvOS \\\n -archivePath \"${TVOS_PATH}\" \\\n -sdk appletvos \\\n SKIP_INSTALL=NO\n\n# build tvOS simulator framework\nxcodebuild archive \\\n -scheme Branch-tvOS \\\n -archivePath \"${TVOS_SIM_PATH}\" \\\n -sdk appletvsimulator \\\n SKIP_INSTALL=NO\n\n# package frameworks\nxcodebuild -create-xcframework \\\n -framework \"${IOS_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -framework \"${IOS_SIM_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -framework \"${TVOS_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -framework \"${TVOS_SIM_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -output \"${XCFRAMEWORK_PATH}\"\n \n";
};
5FB6CC052649C7380020E478 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# config\nIOS_PATH=\"./build/ios/ios.xcarchive\"\nIOS_SIM_PATH=\"./build/ios/ios_sim.xcarchive\"\nTVOS_PATH=\"./build/tvos/tvos.xcarchive\"\nTVOS_SIM_PATH=\"./build/tvos/tvos_sim.xcarchive\"\nXCFRAMEWORK_PATH=\"./build/Branch.xcframework\"\n\n# delete previous build\nrm -rf \"./build\" \n\n# build iOS framework\nxcodebuild archive \\\n -scheme Branch \\\n -archivePath \"${IOS_PATH}\" \\\n -sdk iphoneos \\\n SKIP_INSTALL=NO \\\n GCC_PREPROCESSOR_DEFINITIONS='${inherited} BRANCH_EXCLUDE_IDFA_CODE=1'\n\n# build iOS simulator framework\nxcodebuild archive \\\n -scheme Branch \\\n -archivePath \"${IOS_SIM_PATH}\" \\\n -sdk iphonesimulator \\\n SKIP_INSTALL=NO \\\n GCC_PREPROCESSOR_DEFINITIONS='${inherited} BRANCH_EXCLUDE_IDFA_CODE=1'\n \n# build tvOS framework\nxcodebuild archive \\\n -scheme Branch-tvOS \\\n -archivePath \"${TVOS_PATH}\" \\\n -sdk appletvos \\\n SKIP_INSTALL=NO \\\n GCC_PREPROCESSOR_DEFINITIONS='${inherited} BRANCH_EXCLUDE_IDFA_CODE=1'\n \n# build tvOS simulator framework\nxcodebuild archive \\\n -scheme Branch-tvOS \\\n -archivePath \"${TVOS_SIM_PATH}\" \\\n -sdk appletvsimulator \\\n SKIP_INSTALL=NO \\\n GCC_PREPROCESSOR_DEFINITIONS='${inherited} BRANCH_EXCLUDE_IDFA_CODE=1'\n \n# package frameworks\nxcodebuild -create-xcframework \\\n -framework \"${IOS_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -framework \"${IOS_SIM_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -framework \"${TVOS_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -framework \"${TVOS_SIM_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -output \"${XCFRAMEWORK_PATH}\"\n \n";
};
5FB6CC0A2649C73B0020E478 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# config\nIOS_PATH=\"./build/ios/ios.xcarchive\"\nIOS_SIM_PATH=\"./build/ios/ios_sim.xcarchive\"\nXCFRAMEWORK_PATH=\"./build/Branch.xcframework\"\nSTATIC_LIB_SIM_PATH=\"./build/Branch.sim\"\nSTATIC_LIB_PATH=\"./build/Branch.a\"\n\n# delete previous build\nrm -rf \"./build\" \n\n# build iOS framework\nxcodebuild archive \\\n -scheme Branch-static \\\n -archivePath \"${IOS_PATH}\" \\\n -sdk iphoneos \\\n SKIP_INSTALL=NO \\\n GCC_PREPROCESSOR_DEFINITIONS='${inherited} BRANCH_EXCLUDE_IDFA_CODE=1'\n \n# build iOS simulator framework\nxcodebuild archive \\\n -scheme Branch-static \\\n -archivePath \"${IOS_SIM_PATH}\" \\\n -sdk iphonesimulator \\\n SKIP_INSTALL=NO \\\n GCC_PREPROCESSOR_DEFINITIONS='${inherited} BRANCH_EXCLUDE_IDFA_CODE=1'\n \n# package frameworks\nxcodebuild -create-xcframework \\\n -framework \"${IOS_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -framework \"${IOS_SIM_PATH}/Products/Library/Frameworks/Branch.framework\" \\\n -output \"${XCFRAMEWORK_PATH}\"\n";
};
5FD0FB1725CE4B93008200EE /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -1564,6 +1622,42 @@
};
name = Release;
};
5FB6CC072649C7380020E478 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = R63EM248DP;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
5FB6CC082649C7380020E478 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = R63EM248DP;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
5FB6CC0C2649C73B0020E478 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = R63EM248DP;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
5FB6CC0D2649C73B0020E478 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = R63EM248DP;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
5FC4CFA42486123F0001E701 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -1911,6 +2005,24 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5FB6CC062649C7380020E478 /* Build configuration list for PBXAggregateTarget "Branch-xcframework-noidfa" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5FB6CC072649C7380020E478 /* Debug */,
5FB6CC082649C7380020E478 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5FB6CC0B2649C73B0020E478 /* Build configuration list for PBXAggregateTarget "Branch-static-xcframework-noidfa" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5FB6CC0C2649C73B0020E478 /* Debug */,
5FB6CC0D2649C73B0020E478 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5FC4CFA62486123F0001E701 /* Build configuration list for PBXNativeTarget "Branch-tvOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5FB6CC092649C73B0020E478"
BuildableName = "Branch-static-xcframework-noidfa"
BlueprintName = "Branch-static-xcframework-noidfa"
ReferencedContainer = "container:BranchSDK.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5FB6CC092649C73B0020E478"
BuildableName = "Branch-static-xcframework-noidfa"
BlueprintName = "Branch-static-xcframework-noidfa"
ReferencedContainer = "container:BranchSDK.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5FB6CC042649C7380020E478"
BuildableName = "Branch-xcframework-noidfa"
BlueprintName = "Branch-xcframework-noidfa"
ReferencedContainer = "container:BranchSDK.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5FB6CC042649C7380020E478"
BuildableName = "Branch-xcframework-noidfa"
BlueprintName = "Branch-xcframework-noidfa"
ReferencedContainer = "container:BranchSDK.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
21 changes: 12 additions & 9 deletions scripts/build_framework.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
#!/bin/bash
set -euo pipefail

# checksum file
scheme='Branch-xcframework'
checksum_file=checksum.txt
zip_file=Branch.zip

scriptname=$(basename "${BASH_SOURCE[0]}")
scriptpath="${BASH_SOURCE[0]}"
scriptpath=$(cd "$(dirname "${scriptpath}")" && pwd)
cd ${scriptpath}/../carthage-files

# Build
echo "Building Branch.xcframework"
xcodebuild -scheme 'Branch-xcframework'
xcodebuild -scheme $scheme

# Move to build folder
cd ${scriptpath}/../carthage-files/build

# Zip the SDK files
echo "Zipping Branch.xcframework"
zip -rqy Branch.zip Branch.xcframework/
zip -rqy $zip_file Branch.xcframework/

# Checksum the zip file
echo "Creating Branch.zip checksum"
checksum_file=checksum

echo '#checksum for Branch.zip on Github' > "$checksum_file"
shasum Branch.zip >> $checksum_file
echo "Creating Branch checksum"
echo '#checksum for Branch on Github' > "$checksum_file"
shasum $zip_file >> $checksum_file

# Move zip file and checksum
mv Branch.zip ..
mv checksum ..
mv $zip_file ..
mv $checksum_file ..

# Remove source frameworks
echo "Cleaning up"
Expand Down
36 changes: 36 additions & 0 deletions scripts/build_framework_noidfa.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
set -euo pipefail

# checksum file
scheme='Branch-xcframework-noidfa'
checksum_file=checksum_noidfa.txt
zip_file=Branch_noidfa.zip

scriptname=$(basename "${BASH_SOURCE[0]}")
scriptpath="${BASH_SOURCE[0]}"
scriptpath=$(cd "$(dirname "${scriptpath}")" && pwd)
cd ${scriptpath}/../carthage-files

# Build
echo "Building Branch.xcframework"
xcodebuild -scheme $scheme

# Move to build folder
cd ${scriptpath}/../carthage-files/build

# Zip the SDK files
echo "Zipping Branch.xcframework"
zip -rqy $zip_file Branch.xcframework/

# Checksum the zip file
echo "Creating Branch checksum"
echo '#checksum for Branch on Github' > "$checksum_file"
shasum $zip_file >> $checksum_file

# Move zip file and checksum
mv $zip_file ..
mv $checksum_file ..

# Remove source frameworks
echo "Cleaning up"
rm -rf Branch.xcframework
Loading

0 comments on commit 5e24ca6

Please sign in to comment.