Summary:
Having React Native support every Apple platform is tough to achieve as it introduces many platform-specific ifdefs.
On the other side, maintaining an OOT platform fork is already a demanding job, so to make it easier I propose adding ifdefs for iOS-specific code. Thanks to this change, OOT platforms can focus on their OS-specific features while the core is also adding iOS-specific features behind ifdefs. Fortunately, **most of the code on Apple platforms can be shared** and this PR aims to introduce better support for this and to minimize OOT fork's surface.
In this example `RCTDeviceInfo.mm` has support for handling orientation changes and the availability of this feature across Apple OS looks as follows:
| Platform | Support |
| ------------- | ------------- |
| macOS | ❌ |
| tvOS | ❌ |
| visionOS | ❌ |
| iOS/iPadOS | ✅ |
Here is a table from `TargetConditionals.h` header file which shows the coverage of `TARGET_OS_IOS` macro. (It supports both iOS and iPadOS)
![CleanShot 2024-06-26 at 11 51 47@2x](https://github.com/facebook/react-native/assets/52801365/5f7dc99a-72b8-46ce-87d4-896bdb017269)
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[INTERNAL] [ADDED] - Conditionals for iOS only code in RCTDeviceInfo.mm
Pull Request resolved: https://github.com/facebook/react-native/pull/45176
Test Plan: CI Green
Reviewed By: christophpurrer
Differential Revision: D59106103
Pulled By: cipolleschi
fbshipit-source-id: 594a9d2451024baddfbc9cd3bc1ccfb8829fc31c
Summary:
This PR updates the internal version of cocoapods to 1.13, template already uses this version. I've also removed the root folder Gemfile as it's not necessary anymore.
## Changelog:
[INTERNAL] [CHANGED] - Update RNTester Cocoapods to 1.13
Pull Request resolved: https://github.com/facebook/react-native/pull/41248
Test Plan:
Check if cocoapods installs correctly by running:
1. `bundle install`
2. `bundle exec pod install`
Reviewed By: dmytrorykun
Differential Revision: D50972135
Pulled By: cipolleschi
fbshipit-source-id: b7d6a4671e641b7b8f50242a3374f623e023daf4
Summary:
After disabling the E2E tests, we lost a test that was verifying that Hermes works well with the latest version of React Native for iOS
This change introduce this test back in GH actions
## Changelog:
[Internal] Add tests for Hermes-Xcode integration to GH Actions
Pull Request resolved: https://github.com/facebook/react-native/pull/41187
Test Plan: CI is green 🤞
Reviewed By: NickGerleman
Differential Revision: D50737860
Pulled By: cipolleschi
fbshipit-source-id: f4bc09be879af7aba0ca42f1b7e407a5d5dc0986
Summary:
In CricleCI we are still using Xcode 14.0.1.
This version will be removed from CircleCI this Thursday, so we have to update it.
## Changelog
[Internal] - Bump xcode in CircleCI to 14.2.0
Pull Request resolved: https://github.com/facebook/react-native/pull/36388
Test Plan: CircleCI should be Green
Reviewed By: dmytrorykun
Differential Revision: D43873750
Pulled By: cipolleschi
fbshipit-source-id: 8b796c0961647fce103d2659036bf5f9037fe90a
Summary:
Just got a report that we depend on `activesupport` 6.1.7 which is marked as vulnerable
as per CVE-2023-22796
https://github.com/advisories/GHSA-j6gc-792m-qgm2
I'm adding a dep on >= 6.1.7.1 in the Gemfile.
Changelog:
[Internal] [Changed] - Bump activesupport to 6.1.7.1 to address CVE-2023-22796
Reviewed By: yungsters
Differential Revision: D43117034
fbshipit-source-id: 2c925754ca32257c9523d5bd68d6cf3bb3eb31e3
Summary:
[Changelog][Internal]
This appears to be a regression from https://github.com/facebook/yoga/pull/1195
The `yoga/internal/experiments.cpp` was removed, but the corresponding Pod cache wasn't updated, which made the RNTester iOS to start fail.
Reviewed By: christophpurrer
Differential Revision: D42268322
fbshipit-source-id: 8db1118787ed41cde10babe6845f6d05a8f86bc2
Summary:
This bumps ruby to the latest 2.7.x versions which includes bug fixes and 3 CVEs (https://www.ruby-lang.org/en/news/2021/11/24/ruby-2-7-5-released/)
## Changelog
[iOS] [Changed] - Bump ruby to 2.7.5
Pull Request resolved: https://github.com/facebook/react-native/pull/33485
Test Plan: no test plan, should just pass tests.
Reviewed By: cortinico
Differential Revision: D35116757
Pulled By: GijsWeterings
fbshipit-source-id: a8e96bfcc6086b70dac21aee24bae46fe6b072bb
Summary:
Fix the `scripts/update-ruby.sh` so it always use the correct [bundle config](https://bundler.io/man/bundle-config.1.html#DESCRIPTION). In the current version it wasn't using the correct configuration inside the `template/` directory, resulting in incorrect platform for `template/Gemfile.lock`.
While at that, update the gems to their latest version:
- ethon 0.14.0 -> 0.15.0
- json 0.5.1 -> 0.6.0
- zeitwerk 2.4.2 -> 2.5.1
- bundler 2.2.28 -> 2.2.29
## Changelog
No changelog
Pull Request resolved: https://github.com/facebook/react-native/pull/32456
Test Plan:
Run `bump-oss-version.js` and see `template/Gemfile.lock` lists `ruby` as the `PLATFORM` (no diff in that line).
## References
- e18cf90d71 (r58230816)
Reviewed By: yungsters
Differential Revision: D31841524
Pulled By: charlesbdudley
fbshipit-source-id: 695c245fcb344c866afed45f747e04233e5c91e4
Summary:
Implement par of the discussion https://github.com/react-native-community/discussions-and-proposals/discussions/411, except the `.nvmrc` part, this includes:
- Setting `.ruby-version` in the main project and also `template/`
- Fixing the CocoaPods version with a project-level `Gemfile` and also `template/Gemfile`
- Using all `pod` executions from `bundle exec pod`, using the determined version
- Script to manage and update the ruby version
## Changelog
[iOS] [Added] - Gemfile with CocoaPods 1.11 and ruby-version (2.7.4)
Pull Request resolved: https://github.com/facebook/react-native/pull/32303
Test Plan: Build for iOS and run all CircleCI tests to see if nothing changed
Reviewed By: RSNara
Differential Revision: D31344686
Pulled By: fkgozali
fbshipit-source-id: 25c63131ca9b16d3cf6341019548e0d63bdcaefe