Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugin-dev/Source/Sentry/Sentry.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,14 @@ public Sentry(ReadOnlyTargetRules Target) : base(Target)
{
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private", "Apple"));

#if UE_5_6_OR_LATER
PublicAdditionalFrameworks.Add(new Framework("Sentry", Path.Combine(PlatformThirdPartyPath, "Sentry.xcframework.zip"), null, true));
#else
PublicAdditionalFrameworks.Add(new Framework("Sentry", Path.Combine(PlatformThirdPartyPath, "Sentry.embeddedframework.zip"), null, true));

string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);

AdditionalPropertiesForReceipt.Add("IOSPlugin", Path.Combine(PluginPath, "Sentry_IOS_UPL.xml"));
#endif

PublicDefinitions.Add("USE_SENTRY_NATIVE=0");
PublicDefinitions.Add("COCOAPODS=0");
Expand Down
17 changes: 17 additions & 0 deletions scripts/build-deps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,23 @@ function buildSentryCocoaIos()

# Cleanup
Remove-Item "$iosOutDir/Sentry.embeddedframework" -Recurse -Force

# Create xcframework.zip for UE 5.6+
New-Item "$iosOutDir/Sentry.xcframework" -ItemType Directory > $null
Copy-Item "$tempExtractDir/Sentry-Dynamic.xcframework/ios-arm64" -Destination "$iosOutDir/Sentry.xcframework/ios-arm64" -Recurse
Copy-Item "$tempExtractDir/Sentry-Dynamic.xcframework/ios-arm64_x86_64-simulator" -Destination "$iosOutDir/Sentry.xcframework/ios-arm64_x86_64-simulator" -Recurse
Copy-Item "$tempExtractDir/Sentry-Dynamic.xcframework/Info.plist" -Destination "$iosOutDir/Sentry.xcframework/Info.plist"
Push-Location $iosOutDir
try
{
zip -r "Sentry.xcframework.zip" "Sentry.xcframework"
}
finally
{
Pop-Location
}
Remove-Item "$iosOutDir/Sentry.xcframework" -Recurse -Force

Remove-Item $tempExtractDir -Recurse -Force

Write-Host "Successfully built Sentry Cocoa for iOS"
Expand Down
9 changes: 9 additions & 0 deletions scripts/download-cocoa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ cp -R "Sentry.embeddedframework.zip" "$(dirname $sentryArtifactsDestination)/IOS
rm -rf "Sentry.embeddedframework"
rm "Sentry.embeddedframework.zip"

mkdir "Sentry.xcframework"
cp -R "${sentryCocoaCache}/Sentry-Dynamic.xcframework/ios-arm64" "Sentry.xcframework/"
cp -R "${sentryCocoaCache}/Sentry-Dynamic.xcframework/ios-arm64_x86_64-simulator" "Sentry.xcframework/"
cp "${sentryCocoaCache}/Sentry-Dynamic.xcframework/Info.plist" "Sentry.xcframework/"
zip -r "Sentry.xcframework.zip" "Sentry.xcframework"
cp "Sentry.xcframework.zip" "$(dirname $sentryArtifactsDestination)/IOS/Sentry.xcframework.zip"
rm -rf "Sentry.xcframework"
rm "Sentry.xcframework.zip"

# Prepare Mac artifacts
if ! [ -d "$(dirname $sentryArtifactsDestination)/Mac/Cocoa" ]; then
mkdir -p "$(dirname $sentryArtifactsDestination)/Mac/Cocoa"
Expand Down
1 change: 1 addition & 0 deletions scripts/packaging/package.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ Source/ThirdParty/CLI/sentry-cli-Darwin-universal
Source/ThirdParty/CLI/sentry-cli-Linux-x86_64
Source/ThirdParty/CLI/sentry-cli-Windows-x86_64.exe
Source/ThirdParty/IOS/Sentry.embeddedframework.zip
Source/ThirdParty/IOS/Sentry.xcframework.zip
Source/ThirdParty/IOS/Sentry.framework/Headers/PrivateSentrySDKOnly.h
Source/ThirdParty/IOS/Sentry.framework/Headers/PrivatesHeader.h
Source/ThirdParty/IOS/Sentry.framework/Headers/Sentry-Swift.h
Expand Down
Loading