Skip to content

Commit 867f840

Browse files
committed
feat: add visionos support
fix: address issues with scale, ScrollView prop feat: move min_visionos_version_supported to Helpers feat: implement `visionos_hoverStyle` prop chore: update README.MD fix: refactor visionos_hoverStyle to take a string and new arch support docs: add link to rn-tester's README.md (#5) chore: change VisionOS to visionOS (#13) chore: use `min_supported_versions` for third-party-podspecs (#18) chore: remove not necessary ifs TARGET_OS_VISION, minimise code diff (#22) feat: add visionos support add warning when using InputAccessoryView update platform naming fix: remove keyboard listerners and mark as unsupported (#25) * fix: remove keyboard listerners and mark as unsupported * chore: replace warn with warnOnce feat: support building visionOS with dynamic frameworks enabled (#28) chore: sync Podfile.lock with upstream, remove unnecessary #endif feat: add visionOS as separate target to fix iOS tests (#31) * feat: add visionOS as separate target to fix iOS tests * fix: disable multiple windows support * feat: add visionOS App Icon * fix: creating Release build Update README.md (#36) * Update README.md * fix: update README link * feat: add caution section * fix: bring back info about Hermes Add platform guidelines to README (#37) * Add platform guidelines to README * fix: link to docs Rename react-native package to @callstack/react-native-visionos (#35) * rename react-native package to @callstack/react-native-visionos * fix typo * Make JS and TS tests independent of react-native package name * change name in template * replace more refs in e2e tests * revert tests changes * disable js e2e tests for visionos * bring back react-native for other platforms compat * ci: run js, no e2e js Fix codegen issues for RNTester after renaming package (#40) feat: make hermes build for visionOS (#26) * [WIP] feat: make hermes build for visionOS * feat: point to callstack/hermes-visionos fork, update README * fix: remove USE_HERMES from project.pbxproj feat: align unnecessary compiler conditionals (#51) chore: sync Podfile.lock feat: implement OOT release script (#43) * feat: implement OOT release script * docs: add readme on Release process * fix: remove header file Co-authored-by: Michał Pierzchała <[email protected]> * add reference --------- Co-authored-by: Michał Pierzchała <[email protected]> feat: add visionOS template (#34) * Update CLI to v12.1.1 * feat: implement visionos react-native template * feat: modify template look * feat: add `@callstack/out-of-tree-platforms` to metro config * fix: metro config * feat: update supported platforms --------- Co-authored-by: szymonrybczak <[email protected]> task(StatusBar component): show warn when using StatusBar (#49) * task(StatusBar component): show warn when using StatusBar * pr suggestions docs: update CMake instructions (#55) Fix iOS native tests (#58) * fix: remove unnecessary libevent.podspec * fix: make OCMock build for visionOS fix: remove unnecessary YogaKit pod (#61) feat: add warning while building Hermes that at least CMake 3.28.0 is required (#63) fix: RCTAlertController transparent background override added cornerRadius for hover style (#66) * added corner radius for hover style * fix: implement proper handling for old arch, reformat code --------- Co-authored-by: Oskar Kwaśniewski <[email protected]> chore: sync Podfile.lock fix: don't warn users about the Keyboard API (#71) feat: implement visionos cli commands (#64) fix: use isVision instead of isVisionOS (#76) fix: release build bundle (#74) fix: remove duplicated isVision key (#78) fix: change resolver option name (#79) fix: RCTDeviceInfo UIApplicationDidChangeStatusBarOrientationNotification method fix: update README.md with corrected capitalization (#84) fix: upstream sync ifdefs fix: providing unsupported value to hoverStyle crashed the app (#88) fix: pointer events (#114) fix: hoverEffect for bridgeless mode (#92) refactor: remove unused RCTForegroundWindow (#94) fix: properly retrieve window when clicking DevMenu action (#95) sync with upstream chore: sync Podfile.lock docs: add how is it different from iOS version section (#91) docs: move to documentation website (#119) Update README.md (#121) * Update README.md * Update README.md Co-authored-by: Kacper Rożniata <[email protected]> --------- Co-authored-by: Kacper Rożniata <[email protected]> Update getting started link in Readme. (#123) Co-authored-by: christinamartinez <[email protected]> chore: remove hover effect & add cursor: pointer (#122) * chore: remove hover effect * fix: set cursor pointer by default, update tests * feat(iOS): Implement cursor style prop --------- Co-authored-by: Saad Najmi <[email protected]> chore: resync with upstream fix: change versio of @callstack/out-of-tree-platforms feat: make SwiftUI React Native entry point (#68) * feat: add Swift entrypoint [wip] add module maps to some RN modules to allow for swift c++ imports feat: implement RCTReactController and RCTSwiftUIAppDelegate feat: introduce new method to RCTAppDelegate * feat: modify template to use SwiftUI * fix: dimensions, use RCTMainWindow() * fix: fallback to DarkMode on visionOS * fix: use KeyWindow() in RCTPerfMonitor feat: update docs (#80) * feat: update docs * Update README.md Co-authored-by: Michał Pierzchała <[email protected]> * Update README.md Co-authored-by: Michał Pierzchała <[email protected]> * Update README.md Co-authored-by: Michał Pierzchała <[email protected]> * Update README.md Co-authored-by: Michał Pierzchała <[email protected]> * Update README.md Co-authored-by: Michał Pierzchała <[email protected]> --------- Co-authored-by: Michał Pierzchała <[email protected]> feat: add UIApplicationSceneManifest to template Create custom resolver and utils package for out-of-tree platforms (#32) * rename react-native package to @callstack/react-native-visionos * wip: metro setup for other platform * fix(flow): add .ios.visionos as support platform * fix some flow errors * fix flow * revert Platform.select change * revert KeyboardAvoidingView change * fix type * change kBundlePath to ios.visionos * fix: remove redundant isVisionOS * use custom resolver options to read platform for OOT * fix types * remove formatting * add/remove platform checks * document variant behavior * use visionOS Keyboard mock * use visionOS KeyboardAvoidingView mock * use visionOS InputAccessoryView mock * test: add test for metroPlatformResolver * move implementation to user space * create out-of-tree-platforms package and bring back resolver options * revert flow changes * revert sourceExts changes * update links * add comments * fix visionos typo * adjust lockfile * revert loadMetroConfig change * remove podfile lock * revert scripts changes Fix build step for `@callstack/out-of-tree-platforms` (#46) * feat: setup @callstack/out-of-tree-platforms to build properly * feat: add build packages step to `oot-release.js` script * chore: format package.json fix(#48) local build of @callstack/out-of-tree-platforms (#50) feat: Automate releases to GitHub (#83) fix: adjust oot-release script for stable releases (#85) fix: hermes xcode build scripts (#133) feat: release scripts chore: sync with upstream chore: sync with upstream chore: sync with upstream prevent keyboard api in ScrollView (#143) chore: sync with upstream feat: include privacy info manifest (#144) chore: sync with upstream fix: local commands parameters (#134) fix: add missing index.flow.js file to out-of-tree-platforms package feat: implement `XR` API (#81) * feat: implement Spatial API * feat: make RCTSpatial decoupled from RCTMainWindow() * feat: implement XR module docs: add image to README, annotate nightly APIs fix: export XR library from typescript feat: add multi-window support (#117) * feat: add multi-window support * feat: introduce WindowManager fix: RCTReactViewController properly check props to update fix: use clearColor instead of systemBackgroundColor for visionOS (#125) feat: allow to use WindowHandlingModifier outside of RCTMainWindow fix: deep and universal links when app is running (#140) Co-authored-by: Thiago Brezinski <[email protected]> fix: remove window init feat: add support for ornaments & dev menu trigger (#149) * feat: add support for ornaments * feat: add ornaments support to second window fix: allow to manually move dev menu to avoid conflicts (#150) fix: remove unnecessary diff after upstreaming changes (#151) Make CMake 3.29.0 as minimum required version (#155) fix: move visionOS codegen specs, sync with upstream chore: sync with upstream fix: remove template Move template to a separate repo fix: update oot-release scripts chore: remove unnecessary diff (#159) fix: react-native-config chore: sync with upstream chore: sync with upstrteam Move to GH Actions (#158) * Revert "feat: implement visionOS CI (#54)" This reverts commit ae6f903. * fix: implement GH actions CI chore: sync with upstream chore: remove automatic cursor pointer (#161) Download VisionOS SDK (#163) chore: sync with upstream chore: remove oot-platforms package (#165) chore: sync with upstream
1 parent c4e952e commit 867f840

File tree

113 files changed

+3041
-431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+3041
-431
lines changed

.github/actions/test-ios-helloworld/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ runs:
4343
- name: Run yarn
4444
uses: ./.github/actions/yarn-install
4545
- name: Setup ruby
46-
uses: ruby/setup-ruby@v1.170.0
46+
uses: ruby/setup-ruby@v1.171.0
4747
with:
4848
ruby-version: ${{ inputs.ruby-version }}
4949
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }}

.github/actions/test-ios-rntester/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ runs:
4848
name: hermes-darwin-bin-${{ inputs.flavor }}
4949
path: ${{ inputs.hermes-tarball-artifacts-dir }}
5050
- name: Setup ruby
51-
uses: ruby/setup-ruby@v1.170.0
51+
uses: ruby/setup-ruby@v1.171.0
5252
with:
5353
ruby-version: ${{ inputs.ruby-version }}
5454
- name: Prepare IOS Tests
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: test-visionos-rntester
2+
description: Build visionOS RNTester using JSC
3+
inputs:
4+
use-frameworks:
5+
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
6+
default: StaticLibraries
7+
architecture:
8+
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup
9+
default: NewArch
10+
ruby-version:
11+
description: The version of ruby that must be used
12+
default: 2.6.10
13+
flavor:
14+
description: The flavor of the build. Must be one of "Debug", "Release".
15+
default: Debug
16+
react-native-version:
17+
description: The version of react-native
18+
required: true
19+
run-e2e-tests:
20+
description: Whether we want to run E2E tests or not
21+
required: false
22+
default: false
23+
24+
runs:
25+
using: composite
26+
steps:
27+
- name: Setup xcode
28+
uses: ./.github/actions/setup-xcode
29+
with:
30+
xcode-version: "15.4"
31+
- name: Setup node.js
32+
uses: ./.github/actions/setup-node
33+
- name: Run yarn
34+
uses: ./.github/actions/yarn-install-with-cache
35+
- name: Setup ruby
36+
uses: ruby/[email protected]
37+
with:
38+
ruby-version: ${{ inputs.ruby-version }}
39+
- name: Setup xcode build cache
40+
uses: ./.github/actions/setup-xcode-build-cache
41+
- name: Download visionOS SDK
42+
run: |
43+
# https://github.com/actions/runner-images/issues/10559
44+
sudo xcodebuild -runFirstLaunch
45+
sudo xcrun simctl list
46+
sudo xcodebuild -downloadPlatform visionOS
47+
sudo xcodebuild -runFirstLaunch
48+
shell: bash
49+
- name: Install CocoaPods dependencies
50+
shell: bash
51+
run: |
52+
export USE_HERMES=0
53+
54+
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
55+
export USE_FRAMEWORKS=dynamic
56+
fi
57+
58+
if [[ ${{ inputs.architecture }} == "NewArch" ]]; then
59+
export RCT_NEW_ARCH_ENABLED=1
60+
fi
61+
62+
cd packages/rn-tester
63+
64+
bundle install
65+
bundle exec pod install
66+
- name: Build RNTester for visionOS
67+
if: ${{ inputs.run-e2e-tests == 'false' }}
68+
shell: bash
69+
run: |
70+
xcodebuild build \
71+
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
72+
-scheme RNTester-visionOS \
73+
-sdk xrsimulator \
74+
-destination "platform=visionOS Simulator,name=Apple Vision Pro"

.github/workflows/test-all.yml

+35-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: Test All
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
run-e2e-tests:
7-
description: Whether to run E2E tests or not
8-
type: boolean
9-
default: false
105
pull_request:
116
push:
127
branches:
@@ -15,6 +10,7 @@ on:
1510

1611
jobs:
1712
set_release_type:
13+
if: github.repository == 'facebook/react-native'
1814
runs-on: ubuntu-latest
1915
outputs:
2016
RELEASE_TYPE: ${{ steps.set_release_type.outputs.RELEASE_TYPE }}
@@ -38,6 +34,7 @@ jobs:
3834
echo "Should I run E2E tests? ${{ inputs.run-e2e-tests }}"
3935
4036
prepare_hermes_workspace:
37+
if: github.repository == 'facebook/react-native'
4138
runs-on: ubuntu-latest
4239
env:
4340
HERMES_WS_DIR: /tmp/hermes
@@ -56,6 +53,7 @@ jobs:
5653
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}
5754

5855
build_hermesc_apple:
56+
if: github.repository == 'facebook/react-native'
5957
runs-on: macos-13
6058
needs: prepare_hermes_workspace
6159
env:
@@ -70,6 +68,7 @@ jobs:
7068
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
7169

7270
build_apple_slices_hermes:
71+
if: github.repository == 'facebook/react-native'
7372
runs-on: macos-14
7473
needs: [build_hermesc_apple, prepare_hermes_workspace]
7574
env:
@@ -96,6 +95,7 @@ jobs:
9695
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
9796

9897
build_hermes_macos:
98+
if: github.repository == 'facebook/react-native'
9999
runs-on: macos-13
100100
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
101101
env:
@@ -117,6 +117,7 @@ jobs:
117117
flavor: ${{ matrix.flavor }}
118118

119119
test_ios_rntester_ruby_3_2_0:
120+
if: github.repository == 'facebook/react-native'
120121
runs-on: macos-13
121122
needs:
122123
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
@@ -134,6 +135,7 @@ jobs:
134135
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
135136

136137
test_ios_rntester_dynamic_frameworks:
138+
if: github.repository == 'facebook/react-native'
137139
runs-on: macos-13
138140
needs:
139141
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
@@ -157,6 +159,7 @@ jobs:
157159
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
158160

159161
test_ios_rntester:
162+
if: github.repository == 'facebook/react-native'
160163
runs-on: macos-13-large
161164
needs:
162165
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
@@ -167,7 +170,6 @@ jobs:
167170
strategy:
168171
fail-fast: false
169172
matrix:
170-
jsengine: [Hermes, JSC]
171173
architecture: [NewArch, OldArch]
172174
flavor: [Debug, Release]
173175
exclude: # We don't want to test the Old Arch in Release for E2E
@@ -191,6 +193,26 @@ jobs:
191193
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
192194
flavor: ${{ matrix.flavor }}
193195

196+
test_visionos_rntester:
197+
runs-on: macos-14-xlarge
198+
continue-on-error: true
199+
strategy:
200+
fail-fast: false
201+
matrix:
202+
architecture: [NewArch, OldArch]
203+
steps:
204+
- name: Checkout
205+
uses: actions/checkout@v4
206+
- name: Run it
207+
uses: ./.github/actions/test-visionos-rntester
208+
with:
209+
jsengine: ${{ matrix.jsengine }}
210+
architecture: ${{ matrix.architecture }}
211+
run-unit-tests: "false"
212+
use-frameworks: StaticLibraries
213+
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
214+
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
215+
194216
test_e2e_ios_rntester:
195217
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
196218
runs-on: macos-13-large
@@ -249,7 +271,7 @@ jobs:
249271
- name: Run yarn
250272
uses: ./.github/actions/yarn-install
251273
- name: Setup ruby
252-
uses: ruby/setup-ruby@v1.170.0
274+
uses: ruby/setup-ruby@v1.171.0
253275
with:
254276
ruby-version: 2.6.10
255277
- name: Download Hermes
@@ -393,6 +415,7 @@ jobs:
393415
architecture: ${{ matrix.architecture }}
394416

395417
build_hermesc_linux:
418+
if: github.repository == 'facebook/react-native'
396419
runs-on: ubuntu-latest
397420
needs: prepare_hermes_workspace
398421
env:
@@ -408,6 +431,7 @@ jobs:
408431
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
409432

410433
build_hermesc_windows:
434+
if: github.repository == 'facebook/react-native'
411435
runs-on: windows-2019
412436
needs: prepare_hermes_workspace
413437
env:
@@ -427,6 +451,7 @@ jobs:
427451
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
428452

429453
build_android:
454+
if: github.repository == 'facebook/react-native'
430455
runs-on: 8-core-ubuntu
431456
needs: [set_release_type]
432457
container:
@@ -574,6 +599,7 @@ jobs:
574599
compression-level: 0
575600

576601
test_ios_helloworld_with_ruby_3_2_0:
602+
if: github.repository == 'facebook/react-native'
577603
runs-on: macos-13
578604
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
579605
env:
@@ -592,6 +618,7 @@ jobs:
592618
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
593619

594620
test_ios_helloworld:
621+
if: github.repository == 'facebook/react-native'
595622
runs-on: macos-13
596623
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
597624
strategy:
@@ -635,6 +662,7 @@ jobs:
635662

636663
lint:
637664
runs-on: ubuntu-latest
665+
if: github.repository == 'facebook/react-native'
638666
env:
639667
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
640668
steps:

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,5 @@ fix_*.patch
165165

166166
# [Experimental] Generated TS type definitions
167167
/packages/**/types_generated/
168+
.circleci/storage
169+
.yarn

0 commit comments

Comments
 (0)