Skip to content

Conversation

antonis
Copy link
Contributor

@antonis antonis commented Jul 31, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #5036

📜 Description

Removes temporary flags after Cocoa Bump and updates the sample app native initialisation example

The fixes in this PR are needed for the Cocoa 8.54 8.55 bump #5036

Also bumps xcode version due to a test failure

💡 Motivation and Context

fixes #5022

💚 How did you test it?

Manual, CI

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

@antonis antonis requested a review from noahsmartin July 31, 2025 14:59
Copy link
Contributor

github-actions bot commented Jul 31, 2025

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 432.08 ms 448.16 ms 16.08 ms
Size 17.75 MiB 19.68 MiB 1.94 MiB

Baseline results on branch: deps/scripts/update-cocoa.sh

Startup times

Revision Plain With Sentry Diff
f9bd7d3 403.74 ms 385.54 ms -18.20 ms
f139dae 415.36 ms 400.73 ms -14.63 ms
6c67a16 442.07 ms 454.91 ms 12.84 ms
ba483fc 407.51 ms 398.52 ms -8.99 ms

App size

Revision Plain With Sentry Diff
f9bd7d3 17.75 MiB 20.15 MiB 2.41 MiB
f139dae 17.75 MiB 20.15 MiB 2.40 MiB
6c67a16 17.75 MiB 20.15 MiB 2.40 MiB
ba483fc 17.75 MiB 20.15 MiB 2.40 MiB

@antonis antonis mentioned this pull request Jul 31, 2025
10 tasks
Copy link
Contributor

github-actions bot commented Jul 31, 2025

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 357.13 ms 406.46 ms 49.33 ms
Size 7.15 MiB 8.41 MiB 1.26 MiB

Baseline results on branch: deps/scripts/update-cocoa.sh

Startup times

Revision Plain With Sentry Diff
f139dae+dirty 383.66 ms 389.28 ms 5.62 ms
f9bd7d3+dirty 403.83 ms 442.76 ms 38.92 ms
ba483fc+dirty 432.91 ms 454.14 ms 21.23 ms
6c67a16+dirty 408.86 ms 440.96 ms 32.10 ms

App size

Revision Plain With Sentry Diff
f139dae+dirty 7.15 MiB 8.42 MiB 1.26 MiB
f9bd7d3+dirty 7.15 MiB 8.42 MiB 1.27 MiB
ba483fc+dirty 7.15 MiB 8.42 MiB 1.26 MiB
6c67a16+dirty 7.15 MiB 8.42 MiB 1.26 MiB

@antonis
Copy link
Contributor Author

antonis commented Jul 31, 2025

I'll need to investigate the CI failure in older RN. From the logs (see below) it might be related to getsentry/sentry-cocoa#5604

Error: reference to property 'videoWriter' in closure requires explicit use of 'self' to make capture semantics explicit
            SentrySDKLog.debug("[Session Replay] Finished video writing, status: \(videoWriter.status)")
                                                                                   ^
Error: reference to property 'videoWriter' in closure requires explicit use of 'self' to make capture semantics explicit
                SentrySDKLog.warning("[Session Replay] Finish writing video failed, reason: \(String(describing: videoWriter.error))")
                                                                                                                 ^
Error: reference to property 'videoWriter' in closure requires explicit use of 'self' to make capture semantics explicit
                SentrySDKLog.warning("[Session Replay] Finish writing video with unknown status, reason: \(String(describing: videoWriter.error))")
                                                                                                                              ^
Error: reference to property 'videoWriter' in closure requires explicit use of 'self' to make capture semantics explicit
                SentrySDKLog.warning("[Session Replay] Finish writing video in unknown state, reason: \(String(describing: videoWriter.error))")
                                                                                                                           ^
Error: reference to property 'videoWriter' in closure requires explicit use of 'self' to make capture semantics explicit
            switch videoWriter.status {
                   ^
Error: reference to property 'outputFileURL' in closure requires explicit use of 'self' to make capture semantics explicit
                        from: outputFileURL,
                              ^
Error: reference to property 'usedFrames' in closure requires explicit use of 'self' to make capture semantics explicit
                        usedFrames: usedFrames,
                                    ^
Error: reference to property 'videoWidth' in closure requires explicit use of 'self' to make capture semantics explicit
                        videoWidth: Int(videoWidth),
                                        ^
Error: reference to property 'videoHeight' in closure requires explicit use of 'self' to make capture semantics explicit
                        videoHeight: Int(videoHeight)
                                         ^
Error: reference to property 'videoWriter' in closure requires explicit use of 'self' to make capture semantics explicit
                completion(.failure(videoWriter.error ?? SentryOnDemandReplayError.errorRenderingVideo))
                                    ^
Error: reference to property 'videoWriter' in closure requires explicit use of 'self' to make capture semantics explicit
                completion(.failure(videoWriter.error ?? SentryOnDemandReplayError.errorRenderingVideo))

@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch from 6b7aad8 to ed6a296 Compare August 5, 2025 12:21
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch 10 times, most recently from c8265df to 5cbd8dc Compare August 11, 2025 14:10
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch from 00406ee to 9423cb5 Compare September 3, 2025 12:51
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch from 9423cb5 to b4ee848 Compare September 3, 2025 13:01
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch from b4ee848 to f8540d0 Compare September 3, 2025 14:40
@antonis
Copy link
Contributor Author

antonis commented Sep 3, 2025

It's interesting that the blocking CI failure happens only in dev no-frameworks builds.
Screenshot 2025-09-03 at 4 17 41 PM

The equivalent expo check doesn't fail either 🤔

[Sentry] Compiling SentrySDK.swift
Error: incorrect argument label in call (have 'userFeedback:', expected 'error:')
        SentrySDKInternal.capture(userFeedback: userFeedback)
                                 ^~~~~~~~~~~~~
Error: 'UserFeedback' is not convertible to 'any Error'
        SentrySDKInternal.capture(userFeedback: userFeedback)
                                                ^
Error: Process completed with exit code 65.

It looks like the SDK_V9 behaves different in this configuration https://github.com/getsentry/sentry-cocoa/blob/main/Sources/Swift/Helper/SentrySDK.swift#L251

@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch from f8540d0 to 6520cb7 Compare September 4, 2025 08:21
@antonis
Copy link
Contributor Author

antonis commented Sep 4, 2025

To facilitate the investigation of the above issue I’ve created a new branch with everything in one commit. This includes the changes in:
#5036
#5038
and should reproduce the issue described here.

@antonis
Copy link
Contributor Author

antonis commented Sep 4, 2025

The above failed tests passed with an xcode bump 7920e7f

@antonis antonis marked this pull request as ready for review September 4, 2025 16:59
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch 2 times, most recently from 395b9c2 to 1909f94 Compare September 5, 2025 08:07
…_flags

# Conflicts:
#	CHANGELOG.md
#	packages/core/RNSentry.podspec
@antonis antonis removed the Blocked label Sep 5, 2025
@antonis antonis merged commit 1243af4 into deps/scripts/update-cocoa.sh Sep 5, 2025
87 of 92 checks passed
@antonis antonis deleted the antonis/remove_cocoa_flags branch September 5, 2025 09:44
antonis added a commit that referenced this pull request Sep 5, 2025
* chore: update scripts/update-cocoa.sh to 8.55.1

* Removes temporary flags after Cocoa Bump (#5038)

* Update sample app native initialisation example

* Bump sample app tests to xcode 16.2

* chore(ci): Fixes iOS binary size diff failure

---------

Co-authored-by: Antonis Lilis <[email protected]>
Co-authored-by: LucasZF <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants