Skip to content
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

Allow user to use Xcode 13 #5531

Merged
merged 4 commits into from
Mar 10, 2023
Merged

Allow user to use Xcode 13 #5531

merged 4 commits into from
Mar 10, 2023

Conversation

kneth
Copy link
Contributor

@kneth kneth commented Mar 2, 2023

What, How & Why?

Xcode 14 emits stubs for Objective C code which is incompatible with Xcode 13. See https://developer.apple.com/forums/thread/716965 for details.

This closes #5511

☑️ ToDos

  • 📝 Changelog entry
  • [ ] 📝 Compatibility label is updated or copied from previous entry
  • [ ] 📝 Update COMPATIBILITY.md
  • 🚦 Tests
  • [ ] 🔀 Executed flexible sync tests locally if modifying flexible sync
  • [ ] 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • 📱 Check the React Native/other sample apps work if necessary
  • [ ] 📝 Public documentation PR created or is not necessary
  • [ ] 💥 Breaking label has been applied or is not necessary

If this PR adds or changes public API's:

  • [ ] typescript definitions file is updated
  • [ ] jsdoc files updated

@cla-bot cla-bot bot added the cla: yes label Mar 2, 2023
@kneth kneth requested a review from takameyer March 2, 2023 17:33
@kneth kneth requested a review from nirinchev March 2, 2023 17:33
CMakeLists.txt Outdated
Comment on lines 84 to 90
if(APPLE)
if(NOT DEFINED CMAKE_JS_VERSION)
# https://developer.apple.com/forums/thread/716965
add_cxx_flag_if_supported(-fno-objc-msgsend-selector-stubs)
endif()
endif()

Copy link
Member

Choose a reason for hiding this comment

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

We want/need this on the realm-js-ios target in src/ios/CMakeLists.txt specifically because that's the one that compiled Objective-C code (platform.mm). No need to define it globally.

Copy link
Contributor

@takameyer takameyer left a comment

Choose a reason for hiding this comment

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

So it seems this is a performance/build optimization added in Xcode 14. Wondering if there would be a time we would want to add this back? Perhaps it would be worthwhile to add a comment stating that this flag can be removed when Xcode 15 is released, assuming by then most users are using Xcode 14.

@kneth
Copy link
Contributor Author

kneth commented Mar 3, 2023

if there would be a time we would want to add this back?

Good point. Once React Native specify Xcode 14 or later we can safely remove it again. I have created #5533 to track it.

@kneth kneth changed the base branch from main to v11 March 6, 2023 12:00
@kneth kneth merged commit 8aa0afe into v11 Mar 10, 2023
@kneth kneth deleted the kneth/allow-xcode13 branch March 10, 2023 14:17
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't build on Mac M1 with 11.5.0
3 participants