Skip to content

Commit 074ffe2

Browse files
author
David Crow
committed
Use pre-thinned xcframework
1 parent ddfc5bd commit 074ffe2

File tree

4 files changed

+47
-40
lines changed

4 files changed

+47
-40
lines changed

.github/workflows/ci.yaml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
- name: Set up .NET
4343
uses: actions/setup-dotnet@v4
4444
with:
45+
global-json-file: global.json
4546
dotnet-version: |
46-
7.0.x
47-
8.0.x
47+
10.0.x
4848
4949
- name: Install iOS cert and provisioning profile
5050
env:
@@ -90,24 +90,29 @@ jobs:
9090
run: |
9191
dotnet workload install android ios maui-android maui-ios maui-maccatalyst
9292
93-
- name: Install Carthage
94-
run: |
95-
brew install carthage
96-
97-
- name: Bootstrap Carthage
93+
- name: Download iOS SDK xcframeworks
9894
env:
99-
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
GH_TOKEN: ${{ secrets.CARTHAGE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
10096
run: |
101-
carthage version
102-
103-
# Bootstrap with xcframeworks, using binary downloads when available
104-
carthage bootstrap --use-xcframeworks --platform iOS --cache-builds --use-netrc
105-
106-
# Verify the build directory was created
107-
if [ ! -d "Carthage/Build" ]; then
108-
echo "ERROR: Carthage/Build directory not found. This likely failed due to GitHub API rate limits or network issues."
109-
exit 1
110-
fi
97+
# Get iOS SDK version from airship.properties
98+
IOS_VERSION=$(grep '^iosVersion' airship.properties | cut -d'=' -f2 | tr -d ' ')
99+
echo "Downloading Airship iOS SDK xcframeworks version $IOS_VERSION"
100+
101+
# Download the .NET-specific xcframeworks (no visionOS, smaller package size)
102+
gh release download "$IOS_VERSION" \
103+
--repo urbanairship/ios-library \
104+
--pattern "Airship.dotnet.xcframeworks.zip" \
105+
--output Airship.dotnet.xcframeworks.zip
106+
107+
# Extract to Carthage/Build to maintain compatibility with project paths
108+
mkdir -p Carthage/Build
109+
unzip -q Airship.dotnet.xcframeworks.zip
110+
mv dotnet-xcframeworks/*.xcframework Carthage/Build/
111+
rm -rf dotnet-xcframeworks Airship.dotnet.xcframeworks.zip
112+
113+
# Verify frameworks exist
114+
echo "Downloaded xcframeworks:"
115+
ls -la Carthage/Build/
111116
112117
- name: Build AirshipWrapper
113118
run: |

.github/workflows/release.yaml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,35 @@ jobs:
6666
with:
6767
global-json-file: global.json
6868
dotnet-version: |
69-
7.0.x
70-
8.0.x
69+
10.0.x
7170
7271
- name: Restore workloads
7372
run: |
7473
dotnet workload install android ios maui-android maui-ios maui-maccatalyst
7574
76-
- name: Install Carthage
77-
run: |
78-
brew install carthage
79-
80-
- name: Bootstrap Carthage
75+
- name: Download iOS SDK xcframeworks
8176
env:
82-
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
GH_TOKEN: ${{ secrets.CARTHAGE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
8378
run: |
84-
carthage version
85-
86-
# Bootstrap with xcframeworks, using binary downloads when available
87-
carthage bootstrap --use-xcframeworks --platform iOS --cache-builds --use-netrc
88-
89-
# Verify the build directory was created
90-
if [ ! -d "Carthage/Build" ]; then
91-
echo "ERROR: Carthage/Build directory not found. This likely failed due to GitHub API rate limits or network issues."
92-
exit 1
93-
fi
79+
# Get iOS SDK version from airship.properties
80+
IOS_VERSION=$(grep '^iosVersion' airship.properties | cut -d'=' -f2 | tr -d ' ')
81+
echo "Downloading Airship iOS SDK xcframeworks version $IOS_VERSION"
82+
83+
# Download the .NET-specific xcframeworks (no visionOS, smaller package size)
84+
gh release download "$IOS_VERSION" \
85+
--repo urbanairship/ios-library \
86+
--pattern "Airship.dotnet.xcframeworks.zip" \
87+
--output Airship.dotnet.xcframeworks.zip
88+
89+
# Extract to Carthage/Build to maintain compatibility with project paths
90+
mkdir -p Carthage/Build
91+
unzip -q Airship.dotnet.xcframeworks.zip
92+
mv dotnet-xcframeworks/*.xcframework Carthage/Build/
93+
rm -rf dotnet-xcframeworks Airship.dotnet.xcframeworks.zip
94+
95+
# Verify frameworks exist
96+
echo "Downloaded xcframeworks:"
97+
ls -la Carthage/Build/
9498
9599
- name: Build AirshipWrapper
96100
run: |

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"sdk":
33
{
4-
"version": "9.0.305",
5-
"rollForward": "latestMajor"
4+
"version": "10.0.100",
5+
"rollForward": "latestMinor"
66
},
77
"msbuild-sdks":
88
{

src/AirshipBindings.iOS.ObjectiveC/AirshipBindings.iOS.ObjectiveC.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
<PackageVersion>$(AirshipIosNugetVersion)</PackageVersion>
1919
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
2020
<SupportedOSPlatformVersion>16.0</SupportedOSPlatformVersion>
21-
<!-- Avoid zip command issues on macOS-14 CI runners -->
22-
<CompressBindingResourcePackage>false</CompressBindingResourcePackage>
2321
</PropertyGroup>
2422

2523
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

0 commit comments

Comments
 (0)