Skip to content

Removes temporary flags after Cocoa Bump #5038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: deps/scripts/update-cocoa.sh
Choose a base branch
from

Conversation

antonis
Copy link
Collaborator

@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

💡 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 430.41 ms 413.66 ms -16.75 ms
Size 17.75 MiB 20.15 MiB 2.41 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 359.86 ms 430.55 ms 70.69 ms
Size 7.15 MiB 8.42 MiB 1.27 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
Collaborator 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 3 times, most recently from 27b0d6d to d2f6a18 Compare August 13, 2025 14:58
@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch from d2f6a18 to 4f3abd3 Compare August 14, 2025 03:26
Copy link
Contributor

github-actions bot commented Aug 14, 2025

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1224.83 ms 1241.40 ms 16.57 ms
Size 3.19 MiB 4.42 MiB 1.23 MiB

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

Startup times

Revision Plain With Sentry Diff
6c67a16+dirty 1220.52 ms 1223.47 ms 2.95 ms
f9bd7d3+dirty 1224.46 ms 1237.04 ms 12.58 ms
ba483fc+dirty 1203.07 ms 1213.62 ms 10.55 ms
f139dae+dirty 1213.82 ms 1215.87 ms 2.05 ms

App size

Revision Plain With Sentry Diff
6c67a16+dirty 3.19 MiB 4.35 MiB 1.16 MiB
f9bd7d3+dirty 3.19 MiB 4.38 MiB 1.19 MiB
ba483fc+dirty 3.19 MiB 4.35 MiB 1.17 MiB
f139dae+dirty 3.19 MiB 4.36 MiB 1.17 MiB

Copy link
Contributor

github-actions bot commented Aug 14, 2025

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1228.39 ms 1234.96 ms 6.57 ms
Size 2.63 MiB 3.85 MiB 1.22 MiB

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

Startup times

Revision Plain With Sentry Diff
6c67a16+dirty 1218.27 ms 1224.22 ms 5.96 ms
f9bd7d3+dirty 1207.15 ms 1216.72 ms 9.57 ms
ba483fc+dirty 1211.24 ms 1220.49 ms 9.24 ms
f139dae+dirty 1220.86 ms 1233.21 ms 12.35 ms

App size

Revision Plain With Sentry Diff
6c67a16+dirty 2.63 MiB 3.78 MiB 1.15 MiB
f9bd7d3+dirty 2.63 MiB 3.81 MiB 1.18 MiB
ba483fc+dirty 2.63 MiB 3.78 MiB 1.15 MiB
f139dae+dirty 2.63 MiB 3.80 MiB 1.17 MiB

@antonis
Copy link
Collaborator Author

antonis commented Aug 14, 2025

0.65.3 build issues are fixed in 8.55.0 with getsentry/sentry-cocoa#5917

@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch from 4f3abd3 to dcd3b15 Compare August 14, 2025 12:16
@antonis antonis marked this pull request as ready for review August 14, 2025 12:44
#import "SentryNativeInitialiser.h"
@import Sentry;

@implementation SentryNativeInitialiser
Copy link
Contributor

Choose a reason for hiding this comment

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

A minor thing: probably it needs to be called SentryNativeInitialiser with z for the sake of consistency with other function names in Sentry SDKs and with the function name (void)initializeSentry below.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Well done! I wouldn't have noticed that nit

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch @alwx 🙇
Updated with 29f79b9

antonis and others added 2 commits August 14, 2025 16:38
@alwx alwx self-requested a review August 14, 2025 13:47
Copy link
Contributor

@alwx alwx left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Collaborator

@lucas-zimerman lucas-zimerman left a comment

Choose a reason for hiding this comment

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

LGTM!

Checked the previous PRs that added those conditions and everything was correctly reverted to the new pattern.

@antonis
Copy link
Collaborator Author

antonis commented Aug 14, 2025

Marking this as blocked for now since I've noticed another CI failure (not in 0.65.3)

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

This should be related with the changes in here

I haven't been able to reproduce locally yet.

@bruno-garcia bruno-garcia force-pushed the deps/scripts/update-cocoa.sh branch from dcd3b15 to 61df9c3 Compare August 14, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants