Skip to content

feat(objc): Add SentryObjC wrapper SDK#7598

Open
philprime wants to merge 126 commits intomainfrom
philprime/objc-wrapper-sdk-6342
Open

feat(objc): Add SentryObjC wrapper SDK#7598
philprime wants to merge 126 commits intomainfrom
philprime/objc-wrapper-sdk-6342

Conversation

@philprime
Copy link
Copy Markdown
Member

@philprime philprime commented Mar 4, 2026

📜 Description

Adds a pure Objective-C SDK wrapper (SentryObjC) that enables Sentry usage in Objective-C++ projects with CLANG_ENABLE_MODULES=NO. This solves the long-standing issue where Swift SDK APIs are inaccessible without Clang modules, affecting React Native, Haxe, and other custom build systems.

Read the develop-docs/SENTRY-OBJC.md architecture document first.

💡 Motivation and Context

Closes #6342

The Problem

Since SDK 8.54.0, the Swift SDK's public API requires Clang modules to be imported. When CLANG_ENABLE_MODULES=NO:

  • #import <Sentry/Sentry.h> only exposes Objective-C APIs
  • Swift types like SentrySDK, SentryOptions.sessionReplay, and the Metrics API are unavailable
  • Build errors: use of undeclared identifier 'SentrySDK'

This breaks projects that cannot enable modules, particularly:

  • React Native (uses ObjC++ extensively)
  • Haxe-based applications
  • Custom build systems with strict compiler settings

Implementation Approach & Thought Process

Initial Considerations

Option 1: Make Swift SDK importable without modules

  • ❌ Extremely difficult - would require rewriting core SDK architecture
  • ❌ Breaks existing Swift API design patterns
  • ❌ Not backwards compatible

Option 2: Pure ObjC wrapper (chosen approach)

  • ✅ Preserves existing SDK architecture
  • ✅ Allows Swift and ObjC to coexist
  • ✅ Minimal maintenance burden
  • ✅ Clean separation of concerns

Architecture Decision

The wrapper uses a three-layer architecture:

┌─────────────────────────────────────┐
│   SentryObjC (Pure ObjC Headers)    │  ← Public API for no-modules context
│  Sources/SentryObjC/Public/*.h      │
└──────────────┬──────────────────────┘
               │
               ▼
┌─────────────────────────────────────┐
│   SentryObjCBridge (Swift)          │  ← Forwards to Swift SDK
│  Sources/SentryObjCBridge/*.swift   │
└──────────────┬──────────────────────┘
               │
               ▼
┌─────────────────────────────────────┐
│     SentrySwift (Main SDK)          │  ← Actual implementation
└─────────────────────────────────────┘

Why this design?

See develop-docs/SENTRY-OBJC.md

📝 Checklist

  • I added tests to verify the changes
  • No new PII added
  • Docs updated (sample README, AGENTS.md)
  • Wizard update (not applicable - advanced use case)
  • Review from native team
  • No breaking changes
  • No breaking changes for hybrid SDKs

🔗 Related Issues & Context

Add a pure Objective-C SDK wrapper that mirrors the Sentry public API so it can be used from ObjC++ without modules (e.g. for React Native, Haxe, custom build systems). Includes:

- SentryObjC product and target in Package.swift
- Re-declared headers for all public types in Sources/SentryObjC/Public/
- Wrapper implementations for Swift-only types (Unit, Metric, MetricValue, AttributeContent, RedactRegionType)
- iOS-ObjectiveCpp-NoModules sample using SentryObjC
- sdk_objc_api.json generation via extract-objc-api.py for API stability CI
- Makefile targets: build-spm-objc, verify-objc, generate-objc-api

Refs GH-6342
@philprime philprime self-assigned this Mar 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (objc) Add SentryObjC wrapper SDK by philprime in #7598

Documentation 📚

  • Add SentryCrash analysis and improvement plan document by itaybre in #7528

Internal Changes 🔧

  • (deps) Bump json from 2.18.1 to 2.19.2 by dependabot in #7709

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against ec2e43a

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 38.18182% with 136 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.163%. Comparing base (86bd73c) to head (ec2e43a).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
Sources/SentryObjCBridge/SentryObjCBridge.swift 0.000% 100 Missing ⚠️
...entryObjCTypes/Public/SentryObjCAttributeContent.m 12.500% 28 Missing ⚠️
...s/SentryObjCBridge/SentryObjCBridgeCallbacks.swift 50.000% 4 Missing ⚠️
...ources/Swift/Protocol/SentryAttributeContent.swift 0.000% 2 Missing ⚠️
Sources/SentryObjCTypes/Public/SentryObjCMetric.m 90.000% 1 Missing ⚠️
Sources/SentryObjCTypes/Public/SentryObjCUnit.m 0.000% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7598       +/-   ##
=============================================
- Coverage   85.502%   85.163%   -0.339%     
=============================================
  Files          487       494        +7     
  Lines        29646     29866      +220     
  Branches     12896     12902        +6     
=============================================
+ Hits         25348     25435       +87     
- Misses        4248      4381      +133     
  Partials        50        50               
Files with missing lines Coverage Δ
...ryObjCBridge/SentryObjCBridgeTypeConversions.swift 100.000% <100.000%> (ø)
...ces/SentryObjCTypes/Public/SentryObjCMetricValue.m 100.000% <100.000%> (ø)
Sources/Swift/Core/Helper/Log/SentryLevel.swift 100.000% <ø> (ø)
...tegrations/SessionReplay/SentryReplayOptions.swift 97.175% <ø> (ø)
...ift/Integrations/UserFeedback/SentryFeedback.swift 59.183% <ø> (ø)
Sources/Swift/Protocol/SentryAttribute.swift 92.361% <ø> (ø)
Sources/Swift/Protocol/SentryLog.swift 97.777% <ø> (ø)
Sources/Swift/Protocol/SentryMetric.swift 100.000% <ø> (ø)
Sources/Swift/SentryExperimentalOptions.swift 75.000% <ø> (ø)
Sources/Swift/Tools/SentryEnvelope.swift 83.333% <ø> (ø)
... and 9 more

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86bd73c...ec2e43a. Read the comment docs.

Add detailed documentation to core SentryObjC public APIs following
Objective-C documentation best practices:
- Document all properties with their purpose and behavior
- Document all methods with parameters and return values
- Add class-level documentation explaining usage context
- Include notes about automatic behavior and warnings where applicable

Files documented:
- SentryObjCSDK: Main SDK entry point
- SentryObjCOptions: Configuration options
- SentryObjCEvent: Event data structure
- SentryObjCScope: Contextual data container
- SentryObjCBreadcrumb: Breadcrumb trail
- SentryObjCUser: User identification
- SentryObjCSpanProtocol: Performance tracing protocol

Also adds changelog entry explaining the purpose of the SentryObjC
wrapper SDK.
Add comprehensive documentation to exception, attachment, message,
and tracing-related classes:
- SentryObjCException: Exception information
- SentryObjCAttachment: File attachments
- SentryObjCMessage: Log messages
- SentryObjCSpanContext: Span trace context
- SentryObjCTransactionContext: Transaction context

All classes now include detailed property and method documentation
following Objective-C best practices.
Add comprehensive documentation to:
- SentryObjCFrame: Stack frame with source location and context
- SentryObjCStacktrace: Stack trace with frames and registers
- SentryObjCThread: Thread information and crash state
- SentryObjCMechanism: Error mechanism and handling context
- SentryObjCDebugMeta: Debug symbols and binary metadata
- SentryObjCRequest: HTTP request information
- SentryObjCGeo: Geographical location data

All classes now include detailed property and method documentation.
Add comprehensive documentation to:
- SentryObjCReplayOptions: Session replay configuration with privacy controls
- SentryObjCReplayApi: Runtime replay control and masking API
- SentryObjCSamplingContext: Context for dynamic trace sampling decisions

All properties and methods now include detailed documentation explaining
their purpose, behavior, and usage.
Remove the conditional check for sdk_objc_api.json existence since an
empty baseline file will be added to main in a follow-up PR. This
simplifies the workflow logic.
Keep the original problem description explaining why modules don't work
in ObjC++ projects, then show how SentryObjC solves this issue. This
provides better context for readers to understand why SentryObjC exists.

- Restore "Problem" section describing module import failures
- Add "Solution: SentryObjC" section explaining how it solves the issue
- List key differences from the main Sentry framework
- Reference original issue #4543 and solution PR #6342
Sync with main to include latest changes and adopt new sample
structure using projectReferences instead of SPM packages.
philprime and others added 6 commits March 10, 2026 12:49
Replace Python-based regex parsing with clang AST dump and jq
processing. The new approach:

- Uses xcrun clang -ast-dump=json for reliable parsing
- Extracts declarations via jq queries on intermediate files
- Outputs structured JSON objects instead of string signatures
- Migrates from Python to pure bash/jq pipeline

Also standardize filename to sdk_api_objc.json to match the
sdk_api.json and sdk_api_sentryswiftui.json naming convention.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Include the iOS-ObjectiveCpp-NoModules sample in CI build verification
to ensure it continues to build successfully with the SentryObjC wrapper.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add the SentryObjC product and target to Package@swift-6.1.swift so
the sample can reference it. Also revert iOS-ObjectiveCpp-NoModules
sample to use SPM packages instead of projectReferences since
SentryObjC is an SPM product, not an Xcode project target.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Complete documentation for:
- SentryObjCAppStartMeasurement (app start types and timestamps)
- SentryObjCAttributeContent (typed attribute values)
- SentryObjCBaggage (distributed tracing propagation)
- SentryObjCError (SDK error codes and helpers)
- SentryObjCLogger (structured logging interface)
- SentryObjCMechanismContext (crash metadata)
- SentryObjCMetric (custom performance metrics)
- SentryObjCMetricValue (metric value types)
- SentryObjCNSError (serializable error representation)

All public types, properties, methods, and enum values now have
comprehensive documentation following Objective-C best practices.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@philprime
Copy link
Copy Markdown
Member Author

@sentry review

@philprime philprime added the ready-to-merge Use this label to trigger all PR workflows label Mar 10, 2026
@sentry
Copy link
Copy Markdown

sentry Bot commented Mar 10, 2026

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
SDK-Size io.sentry.sample.SDK-Size 9.12.1 (1) Release

⚙️ sentry-cocoa Build Distribution Settings

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 10, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1215.63 ms 1246.71 ms 31.08 ms
Size 24.14 KiB 1.16 MiB 1.13 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ce1ec47 1212.60 ms 1247.61 ms 35.02 ms
c5c7a29 1223.14 ms 1258.55 ms 35.41 ms
994f7a3 1208.71 ms 1240.54 ms 31.83 ms
49cc12d 1227.33 ms 1263.21 ms 35.89 ms
ce900e7 1212.40 ms 1244.57 ms 32.18 ms
44b7b59 1211.91 ms 1248.90 ms 36.99 ms
c958e9d 1219.05 ms 1256.44 ms 37.40 ms
48fa69f 1221.60 ms 1251.52 ms 29.92 ms
92bcc8f 1233.43 ms 1270.20 ms 36.77 ms
ae8cece 1216.83 ms 1251.37 ms 34.55 ms

App size

Revision Plain With Sentry Diff
ce1ec47 24.14 KiB 1.15 MiB 1.13 MiB
c5c7a29 24.14 KiB 1.15 MiB 1.13 MiB
994f7a3 24.14 KiB 1.15 MiB 1.13 MiB
49cc12d 24.14 KiB 1.16 MiB 1.13 MiB
ce900e7 24.14 KiB 1.15 MiB 1.13 MiB
44b7b59 24.14 KiB 1.15 MiB 1.13 MiB
c958e9d 24.14 KiB 1.15 MiB 1.13 MiB
48fa69f 24.14 KiB 1.15 MiB 1.13 MiB
92bcc8f 24.14 KiB 1.15 MiB 1.13 MiB
ae8cece 24.14 KiB 1.15 MiB 1.13 MiB

Previous results on branch: philprime/objc-wrapper-sdk-6342

Startup times

Revision Plain With Sentry Diff
5857eca 1236.71 ms 1264.36 ms 27.64 ms
fc0a15a 1220.29 ms 1256.85 ms 36.57 ms
87bd6e0 1240.02 ms 1246.75 ms 6.73 ms
a1f5242 1222.28 ms 1245.53 ms 23.25 ms
3d2e8a4 1235.17 ms 1264.59 ms 29.42 ms
694c3ad 1225.69 ms 1250.48 ms 24.79 ms
7e3cf1f 1208.80 ms 1244.33 ms 35.52 ms
82293b9 1205.29 ms 1241.32 ms 36.03 ms
e55e60d 1217.93 ms 1251.80 ms 33.86 ms
31709d3 1223.00 ms 1255.70 ms 32.70 ms

App size

Revision Plain With Sentry Diff
5857eca 24.14 KiB 1.13 MiB 1.10 MiB
fc0a15a 24.14 KiB 1.15 MiB 1.13 MiB
87bd6e0 24.14 KiB 1.13 MiB 1.11 MiB
a1f5242 24.14 KiB 1.12 MiB 1.10 MiB
3d2e8a4 24.14 KiB 1.15 MiB 1.13 MiB
694c3ad 24.14 KiB 1.15 MiB 1.13 MiB
7e3cf1f 24.14 KiB 1.12 MiB 1.10 MiB
82293b9 24.14 KiB 1.15 MiB 1.13 MiB
e55e60d 24.14 KiB 1.15 MiB 1.13 MiB
31709d3 24.14 KiB 1.15 MiB 1.13 MiB

philprime and others added 2 commits March 10, 2026 14:05
The SentryObjC product depends on SentryCppHelper, but it was only
defined in the binary targets section. Add it to the compile-from-source
targets array so it's available when building SentryObjC from source.

Fixes SPM package resolution error:
target 'SentryCppHelper' referenced in product 'SentryObjC' could not be found

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add SentryObjCSDK.m implementation that forwards all method calls to
SentrySDKInternal. This enables SentryObjC to work in projects with
CLANG_ENABLE_MODULES=NO, where Swift's @objc bridging is unavailable.

The wrapper provides a pure Objective-C implementation of the SentrySDK
class, making all SDK methods accessible via #import <SentryObjC.h>
without requiring modules or Swift bridging.

Update iOS-ObjectiveCpp-NoModules sample to use the corrected import
style (#import <SentryObjC.h> instead of <SentryObjC/SentryObjC.h>)
and add module.modulemap for SPM module resolution.

Refs #6342
@sentry
Copy link
Copy Markdown

sentry Bot commented Mar 10, 2026

Sentry Build Distribution

App Version Configuration
App 9.6.0 (1) Release

SentryCppHelper must remain in the initial targets array because the
binary distribution products (Sentry, SentrySwiftUI, etc.) depend on it.

Moving it to the compile-from-source section broke those binary products.
The target can be safely referenced by both binary and source products.
@philprime philprime force-pushed the philprime/objc-wrapper-sdk-6342 branch from 7abca39 to 913cdfd Compare March 10, 2026 13:37
@sentry
Copy link
Copy Markdown

sentry Bot commented Mar 10, 2026

Sentry Build Distribution

App Version Configuration
App 9.6.0 (1) Release

Comment thread Sources/SentryObjCTypes/Public/SentryObjCBridging.h
@philprime philprime requested a review from NinjaLikesCheez as a code owner May 5, 2026 08:26
Copy link
Copy Markdown
Contributor

@itaybre itaybre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost LGTM, just some comments

Comment thread .github/workflows/assemble-xcframework-sentryobjc.yml Outdated
Comment thread .github/workflows/assemble-xcframework-sentryobjc.yml Outdated
Comment thread Samples/iOS-ObjectiveC/App/Sources/ViewController.m

#import "AppDelegate.h"
#import <Sentry/Sentry.h>
#import <SentryObjC.h>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: Just <SentryObjC.h> works?
I would expect it to be SentryObjC/SentryObjC.h but that may be the module...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both forms work, but for different reasons.

SentryObjC is a compile-from-source SPM target (like SentrySPM, not a pre-compiled framework like Sentry), so SPM adds its publicHeadersPath directory directly to the consumer's header search paths. That's why the flat #import <SentryObjC.h> resolves.

The framework-qualified #import <SentryObjC/SentryObjC.h> would also work and is more portable (e.g. if someone later consumes the pre-built XCFramework instead).

Happy to switch if you prefer.

Comment thread Makefile
# This target is expected to FAIL until the pure ObjC SDK wrapper (#6342)
# is implemented. Use it to verify the fix.
# Builds the ObjC++ without-modules sample that uses SentryObjC (#6342).
# Uses #import <SentryObjC/SentryObjC.h> for ObjC++ without -fmodules.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: So #import <SentryObjC/SentryObjC.h> or #import <SentryObjC.h>?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah an inconsistency. See my other PR feedback comment:
#7598 (comment)

Happy to update afterwards

private let levelNames = ["none", "debug", "info", "warning", "error", "fatal"]

extension SentryLevel: CustomStringConvertible {
extension SentryLevel: CustomStringConvertible {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: @philprime there is a warning here:

extension declares a conformance of imported type 'SentryLevel' to imported protocol 'CustomStringConvertible'; this will not behave correctly if the owners of 'SentryHeaders' introduce this conformance in the future

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a SourceKit false positive. SentryLevel is defined in Sources/Sentry/Public/SentryLevel.h — same module as this Swift extension. The compiler confirms it: adding @retroactive fails with "'retroactive' attribute does not apply; 'SentryLevel' is declared in this module." The warning doesn't appear in actual builds (only in the IDE via SourceKit).


- (void)setBeforeSendMetric:(SentryBeforeSendMetricCallback)block
{
objc_setAssociatedObject(self, kBeforeSendMetricKey, block, OBJC_ASSOCIATION_COPY_NONATOMIC);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: Will this break automatically if we rename SentryOptions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SentryObjC/Public/SentryOptions.h is a hand-written ObjC header, and the actual class comes from Options.swift via @objc(SentryOptions).

If someone renamed just the @objc(...) name, this header would still compile but the runtime class wouldn't match — so it would be a runtime failure, not a compile error.

This is one of the major downsides of this split declaration style (manually maintained ObjC header backed by a Swift implementation), but the only other approach would be creating a SentryObjcOptions.h interface + implementation, which would duplicate quite some logic.

Comment thread scripts/update-package-sha.sh
Comment on lines +175 to +185
iphoneos) arch_targets=( "arm64-apple-ios15.0" ) ;;
iphonesimulator) arch_targets=( "arm64-apple-ios15.0-simulator" "x86_64-apple-ios15.0-simulator" ) ;;
macosx) arch_targets=( "arm64-apple-macos10.14" "x86_64-apple-macos10.14" ) ;;
maccatalyst) arch_targets=( "arm64-apple-ios15.0-macabi" "x86_64-apple-ios15.0-macabi" )
sysroot="$(xcrun --sdk macosx --show-sdk-path)" ;;
appletvos) arch_targets=( "arm64-apple-tvos15.0" ) ;;
appletvsimulator) arch_targets=( "arm64-apple-tvos15.0-simulator" "x86_64-apple-tvos15.0-simulator" ) ;;
watchos) arch_targets=( "arm64-apple-watchos8.0" "arm64_32-apple-watchos8.0" ) ;;
watchsimulator) arch_targets=( "arm64-apple-watchos8.0-simulator" "x86_64-apple-watchos8.0-simulator" ) ;;
xros) arch_targets=( "arm64-apple-xros1.0" ) ;;
xrsimulator) arch_targets=( "arm64-apple-xros1.0-simulator" ) ;;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: What's the reason for these specific archs?
Will these need to be updated if we bump the minimum versions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it so that it dynamically finds the relevant versions from what's configured in the Xcode build settings

Comment thread Sources/SentryObjC/SentrySDK.m Outdated

NS_ASSUME_NONNULL_BEGIN

@implementation SentrySDK
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: I was wondering, wont this cause duplicate classes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I assumed that the embedded Sentry.framework would be internal, but both export a class with the same ObjC runtime name:

$ nm SentryObjC.framework/SentryObjC | grep 'OBJC_CLASS.*SentrySDK' | grep -v 'Internal\|Log\|Only'
00000000000087a0 S _OBJC_CLASS_$_SentrySDK
00000000000082d0 s __OBJC_CLASS_RO_$_SentrySDK

$ nm SentryObjC.framework/Frameworks/Sentry.framework/Sentry | grep 'OBJC_CLASS.*SentrySDK' | grep -v 'Internal\|Log\|Only'
000000000022bfb8 S _OBJC_CLASS_$__TtC6Sentry9SentrySDK
  • SentryObjC.framework/SentryObjC: _OBJC_CLASS_$_SentrySDK is the ObjC class from SentrySDK.m
  • SentryObjC.framework/Frameworks/Sentry.framework/Sentry: _OBJC_CLASS_$__TtC6Sentry9SentrySDK is the Swift class, mangled symbol, but registers as SentrySDK in the ObjC runtime via @objc

Both resolve to the same ObjC runtime name SentrySDK, causing a duplicate class conflict at runtime. Interestingly it did not surface during testing, but it makes sense to fix this now.

Since SentryObjC is the new SDK, I'll rename its class to SentryObjcSDK to avoid the collision.

philprime added 3 commits May 6, 2026 10:14
Use the setup-xcode composite action instead of calling
ci-select-xcode.sh directly. Extract the inline arrange_slices
bash from the workflow into scripts/ci-arrange-xcframework-slices.sh
so it can be run locally for testing.
Comment thread Sources/SentryObjCBridge/SentryObjCBridgeTypeConversions.swift
philprime added 4 commits May 6, 2026 10:37
Avoids duplicate ObjC class registration when both
SentryObjC.framework and its embedded Sentry.framework
are loaded at runtime.
…r-sdk-6342

# Conflicts:
#	Sentry.xcodeproj/project.pbxproj
Comment thread Sources/SentryObjCBridge/SentryObjCBridgeCallbacks.swift
Comment thread .github/workflows/assemble-xcframework-sentryobjc.yml Outdated
philprime added 5 commits May 6, 2026 13:13
- Use --sdk named args instead of positional parameter
- Derive deployment targets from Xcode project settings
- Derive architectures from lipo -archs on built archives
- Use mktemp for temporary files
- Rename build-sentryobjc to build-framework-objc
- Align protocol replay conditional with Swift bridge
  guards (check SENTRY_NO_UI_FRAMEWORK)
- Use atomic associated objects for thread safety
- Guard empty deployment targets in standalone build
- Add trap for temp dir cleanup on early exit
@philprime philprime requested a review from itaybre May 6, 2026 11:42
Comment thread .github/workflows/api-stability.yml Outdated
Comment thread Samples/iOS-ObjectiveC/iOS-ObjectiveC.yml Outdated
The SentryObjC scheme may not expose all platform deployment
targets on CI. Use the main Sentry scheme which reliably has
all settings. Also anchor awk patterns to avoid matching
RECOMMENDED_IPHONEOS_DEPLOYMENT_TARGET.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit de97037. Configure here.

Comment thread scripts/build-xcframework-sentryobjc-standalone.sh
philprime added 4 commits May 6, 2026 15:00
Fix broken shell quoting in api-stability.yml echo statements
where inner double quotes broke the outer string. Revert
iOS-ObjectiveC sample dependency back to Sentry/Sentry since
SentrySampleShared depends on the Sentry module, causing type
redefinition errors when combined with SentryObjC.
The -sdk iphoneos flag causes xcodebuild -showBuildSettings to
only return iOS-relevant settings on CI, omitting macOS/tvOS/
watchOS/xrOS deployment targets.
xcodebuild -showBuildSettings only returns deployment targets for
the active SDK, not all platforms. Read directly from the canonical
DeploymentTargets.xcconfig which has all five targets.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • .github/file-filters.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create an ObjC SDK

3 participants