Skip to content

Commit 4e754a1

Browse files
committed
download framework on demand
1 parent abe7ca5 commit 4e754a1

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

src/Sentry/iOS/Sentry.iOS.props

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
<IsBindingProject>true</IsBindingProject>
88
<NoBindingEmbedding>true</NoBindingEmbedding>
99
<!-- Don't remove native symbols, because it makes debugging native crashes harder -->
10+
<SentryCocoaSdkVersion>7.17.0</SentryCocoaSdkVersion>
1011
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
11-
<iOSLibsDirectory>$(MSBuildProjectDirectory)/../../libs/iOS/</iOSLibsDirectory>
12+
<iOSLibsDirectory>$(BaseIntermediateOutputPath)/libs/iOS/</iOSLibsDirectory>
13+
<iOSFramework>$(iOSLibsDirectory)Sentry.xcframework/Carthage/Build/Sentry.xcframework</iOSFramework>
1214
</PropertyGroup>
1315

1416
<ItemGroup>
@@ -18,7 +20,7 @@
1820
<ItemGroup>
1921
<ObjcBindingApiDefinition Include="iOS/ApiDefinition.cs" />
2022
<ObjcBindingCoreSource Include="iOS/Structs.cs" />
21-
<NativeReference Include="$(iOSLibsDirectory)/Sentry.xcframework">
23+
<NativeReference Include="$(iOSFramework)">
2224
<Kind>Framework</Kind>
2325
<SmartLink>False</SmartLink>
2426
<!-- <Frameworks>CoreLocation ModelIO</Frameworks> -->
@@ -30,25 +32,17 @@
3032
<Using Include="System.Text.Json" />
3133
</ItemGroup>
3234

33-
<!-- Update Android SDK: Update SentryAndroidSdkVersion and run:
34-
dotnet msbuild src/Sentry /t:DownloadSentryAndroidSdk /p:TargetFramework=net6.0-android -->
35-
<Target Name="DownloadSentryAndroidSdk">
36-
<RemoveDir Directories="$(AndroidLibsDirectory)" />
37-
<DownloadFile SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry-android-core/$(SentryAndroidSdkVersion)/sentry-android-core-$(SentryAndroidSdkVersion).aar"
38-
DestinationFolder="$(AndroidLibsDirectory)"
39-
SkipUnchangedFiles="true">
40-
<Output TaskParameter="DownloadedFile" ItemName="Content" />
41-
</DownloadFile>
42-
<DownloadFile SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry-android-ndk/$(SentryAndroidSdkVersion)/sentry-android-ndk-$(SentryAndroidSdkVersion).aar"
43-
DestinationFolder="$(AndroidLibsDirectory)"
44-
SkipUnchangedFiles="true">
45-
<Output TaskParameter="DownloadedFile" ItemName="Content" />
46-
</DownloadFile>
47-
<DownloadFile SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry/$(SentryAndroidSdkVersion)/sentry-$(SentryAndroidSdkVersion).jar"
48-
DestinationFolder="$(AndroidLibsDirectory)"
49-
SkipUnchangedFiles="true">
50-
<Output TaskParameter="DownloadedFile" ItemName="Content" />
35+
<Target Name="DownloadSentryCocoaSdk" BeforeTargets="CollectPackageReferences">
36+
<DownloadFile SourceUrl="https://github.com/getsentry/sentry-cocoa/releases/download/$(SentryCocoaSdkVersion)/Sentry.xcframework.zip"
37+
DestinationFolder="$(iOSLibsDirectory)"
38+
Condition="!Exists('$(iOSLibsDirectory)Sentry.xcframework.zip')">
39+
<Output TaskParameter="DownloadedFile" ItemName="None" />
5140
</DownloadFile>
41+
<Unzip
42+
SourceFiles="$(iOSLibsDirectory)Sentry.xcframework.zip"
43+
DestinationFolder="$(iOSLibsDirectory)Sentry.xcframework"
44+
OverwriteReadOnlyFiles="true"
45+
/>
5246
</Target>
5347

5448
</Project>

0 commit comments

Comments
 (0)