Skip to content

Conversation

@philprime
Copy link
Member

@philprime philprime commented Feb 11, 2026

This PR needs to be merged after #7430

Summary

  • Add a sample project (Samples/iOS-ObjectiveCpp-NoModules) that reproduces the ObjC++ without-modules issue from Replay options not visible from Objective-C without @import #4543
  • The sample uses .mm files with CLANG_ENABLE_MODULES=NO and #import <Sentry/Sentry.h>, which fails with error: use of undeclared identifier 'SentrySDK' since SDK 8.54 moved SentrySDK to Swift
  • This serves as a test case for the pure ObjC SDK wrapper proposed in Create an ObjC SDK #6342 — once implemented, this sample should build successfully

Background

Since SDK 8.54, SentrySDK is a Swift class only visible via Sentry-Swift.h or @import Sentry. Projects that cannot enable Clang modules (React Native ≤0.76, Haxe, custom build systems) can only use #import <Sentry/Sentry.h>, which no longer includes SentrySDK. The sample is intentionally not in the CI build matrix since it does not build with the current SDK.

Test plan

  • xcodegen --spec Samples/iOS-ObjectiveCpp-NoModules/iOS-ObjectiveCpp-NoModules.yml generates the project
  • Building the scheme iOS-ObjectiveCpp-NoModules fails with error: use of undeclared identifier 'SentrySDK' — confirming the reproducer works
  • Existing CI is unaffected (sample not in build matrix)

#skip-changelog

Refs #4543
Refs #6342

Add a sample project that reproduces the ObjC++ without-modules issue
where SentrySDK is undeclared when using #import <Sentry/Sentry.h>
with CLANG_ENABLE_MODULES=NO. Since SDK 8.54, SentrySDK is a Swift
class and only visible via Sentry-Swift.h or @import Sentry, both
of which are unusable from ObjC++ without modules.

This sample serves as a test case for the pure ObjC SDK wrapper
proposed in #6342. It is intentionally not in CI since it does not
build with the current SDK.

Refs #4543
Refs #6342
@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 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).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

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

Generated by 🚫 dangerJS against be62903

Add build-sample-iOS-ObjectiveCpp-NoModules target to build the
ObjC++ without-modules reproducer. This target is expected to fail
until the pure ObjC SDK wrapper (#6342) is implemented.

Refs #4543
Refs #6342
@philprime philprime self-assigned this Feb 11, 2026
Copy link

@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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.315%. Comparing base (084f0d7) to head (be62903).
⚠️ Report is 2 commits behind head on philprime/spm-sample.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@                    Coverage Diff                     @@
##           philprime/spm-sample     #7433       +/-   ##
==========================================================
- Coverage                85.770%   85.315%   -0.455%     
==========================================================
  Files                       480       480               
  Lines                     28616     28615        -1     
  Branches                  12380     12374        -6     
==========================================================
- Hits                      24544     24413      -131     
- Misses                     4023      4154      +131     
+ Partials                     49        48        -1     

see 9 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 084f0d7...be62903. Read the comment docs.

The build-sample-iOS-ObjectiveCpp-NoModules target was missing the
-destination flag, which would cause xcodebuild to resolve a
destination automatically. This is unreliable on CI and may target
the wrong platform.

Refs #4543
@itaybre itaybre added the ready-to-merge Use this label to trigger all PR workflows label Feb 11, 2026
Copy link
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.

LGTM

@github-actions
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1209.71 ms 1234.55 ms 24.84 ms
Size 24.14 KiB 1.11 MiB 1.09 MiB

Baseline results on branch: philprime/spm-sample

Startup times

Revision Plain With Sentry Diff
becdd0e 1228.96 ms 1257.13 ms 28.17 ms

App size

Revision Plain With Sentry Diff
becdd0e 24.14 KiB 1.11 MiB 1.09 MiB

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.

2 participants