Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

- Make error throttling smarter by factoring in error message ([#287](https://github.com/getsentry/sentry-godot/pull/287))

### Other changes

- Add iOS framework as optional build target ([#290](https://github.com/getsentry/sentry-godot/pull/290))

## 1.0.0-alpha.3

### Breaking changes
Expand Down
35 changes: 23 additions & 12 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,20 @@ if platform == "ios":
Default(library)
Clean(library, File(lib_path))

# Generate XCFramework for GDExtension libs if requested
if env.get("generate_ios_framework", False):
device_lib = f"{temp_dir}/libsentry.{platform}.{build_type}.arm64.dylib"
simulator_lib = f"{temp_dir}/libsentry.{platform}.{build_type}.universal.simulator.dylib"
xcframework_path = f"{out_dir}/libsentry.{platform}.{build_type}.xcframework"

xcframework = env.CreateXCFrameworkFromLibs(
framework_path=xcframework_path,
libraries=[device_lib, simulator_lib],
)
# Generate XCFramework for iOS GDExtension libs if requested
device_lib = f"{temp_dir}/libsentry.{platform}.{build_type}.arm64.dylib"
simulator_lib = f"{temp_dir}/libsentry.{platform}.{build_type}.universal.simulator.dylib"
xcframework_path = f"{out_dir}/libsentry.{platform}.{build_type}.xcframework"

ios_framework = env.CreateXCFrameworkFromLibs(
framework_path=xcframework_path,
libraries=[device_lib, simulator_lib],
)
Alias("ios_framework", ios_framework)

env.Depends(xcframework, library)
Default(xcframework)
if env.get("generate_ios_framework", False):
env.Depends(ios_framework, library)
Default(ios_framework)

elif platform == "macos":
# *** Build macOS shared library.
Expand All @@ -232,6 +233,16 @@ else:
Default(library)


Help("""
Optional targets:

ios_framework: Create iOS XCFramework from device and simulator builds.
Usage: scons target=template_release platform=ios ios_framework
Note: Requires both device and simulator builds to exist, and it
doesn't trigger a build.
""")


# *** Deploy extension manifest.

manifest = env.Substfile(
Expand Down