From d1ae05ceb192df674a4d0a331a1c28cc2db40d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 14 Dec 2024 12:11:07 +0100 Subject: [PATCH 1/9] feat: platform visionOS --- .../create-app/src/lib/__tests__/bin.test.ts | 2 + packages/create-app/src/lib/templates.ts | 8 + packages/plugin-platform-visionos/README.md | 11 + .../plugin-platform-visionos/eslint.config.js | 3 + .../plugin-platform-visionos/package.json | 17 + .../plugin-platform-visionos/project.json | 23 + .../react-native.config.ts | 13 + .../plugin-platform-visionos/src/index.ts | 1 + .../src/lib/__tests__/dummy.test.ts | 5 + .../src/lib/pluginPlatformVisionOS.ts | 58 ++ .../rnef-remote-build-visionos/action.yml | 103 +++ .../workflows/remote-build-visionos.yml | 35 + .../src/template/package.json | 10 + .../src/template/visionos/.xcode.env | 11 + .../HelloWorld.xcodeproj/project.pbxproj | 693 ++++++++++++++++++ .../xcschemes/HelloWorld.xcscheme | 88 +++ .../template/visionos/HelloWorld/App.swift | 12 + .../visionos/HelloWorld/AppDelegate.swift | 17 + .../AppIcon.appiconset/Contents.json | 53 ++ .../HelloWorld/Images.xcassets/Contents.json | 6 + .../template/visionos/HelloWorld/Info.plist | 57 ++ .../visionos/HelloWorld/PrivacyInfo.xcprivacy | 38 + .../HelloWorldTests/HelloWorldTests.m | 66 ++ .../visionos/HelloWorldTests/Info.plist | 24 + .../src/template/visionos/Podfile | 40 + .../plugin-platform-visionos/tsconfig.json | 21 + .../tsconfig.lib.json | 10 + .../tsconfig.spec.json | 26 + .../plugin-platform-visionos/vite.config.ts | 28 + pnpm-lock.yaml | 16 + tsconfig.base.json | 5 +- 31 files changed, 1499 insertions(+), 1 deletion(-) create mode 100644 packages/plugin-platform-visionos/README.md create mode 100644 packages/plugin-platform-visionos/eslint.config.js create mode 100644 packages/plugin-platform-visionos/package.json create mode 100644 packages/plugin-platform-visionos/project.json create mode 100644 packages/plugin-platform-visionos/react-native.config.ts create mode 100644 packages/plugin-platform-visionos/src/index.ts create mode 100644 packages/plugin-platform-visionos/src/lib/__tests__/dummy.test.ts create mode 100644 packages/plugin-platform-visionos/src/lib/pluginPlatformVisionOS.ts create mode 100644 packages/plugin-platform-visionos/src/template/.github/actions/rnef-remote-build-visionos/action.yml create mode 100644 packages/plugin-platform-visionos/src/template/.github/workflows/remote-build-visionos.yml create mode 100644 packages/plugin-platform-visionos/src/template/package.json create mode 100644 packages/plugin-platform-visionos/src/template/visionos/.xcode.env create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/project.pbxproj create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorld/App.swift create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorld/AppDelegate.swift create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/Contents.json create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Info.plist create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorld/PrivacyInfo.xcprivacy create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/HelloWorldTests.m create mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/Info.plist create mode 100644 packages/plugin-platform-visionos/src/template/visionos/Podfile create mode 100644 packages/plugin-platform-visionos/tsconfig.json create mode 100644 packages/plugin-platform-visionos/tsconfig.lib.json create mode 100644 packages/plugin-platform-visionos/tsconfig.spec.json create mode 100644 packages/plugin-platform-visionos/vite.config.ts diff --git a/packages/create-app/src/lib/__tests__/bin.test.ts b/packages/create-app/src/lib/__tests__/bin.test.ts index 1d5a09cec..ffbcd1add 100644 --- a/packages/create-app/src/lib/__tests__/bin.test.ts +++ b/packages/create-app/src/lib/__tests__/bin.test.ts @@ -4,6 +4,7 @@ import { PLATFORMS, PLUGINS } from '../templates.js'; test('formatConfig', () => { expect(formatConfig(PLATFORMS, PLUGINS)).toMatchInlineSnapshot(` "import { pluginPlatformIOS } from '@rnef/plugin-platform-ios'; + import { pluginPlatformVisionOS } from '@rnef/plugin-platform-visionos'; import { pluginPlatformAndroid } from '@rnef/plugin-platform-android'; import { pluginMetro } from '@rnef/plugin-metro'; import { pluginRepack } from '@rnef/plugin-repack'; @@ -15,6 +16,7 @@ test('formatConfig', () => { }, platforms: { ios: pluginPlatformIOS(), + visionos: pluginPlatformVisionOS(), android: pluginPlatformAndroid(), }, }; diff --git a/packages/create-app/src/lib/templates.ts b/packages/create-app/src/lib/templates.ts index 177f502de..726b2031f 100644 --- a/packages/create-app/src/lib/templates.ts +++ b/packages/create-app/src/lib/templates.ts @@ -60,6 +60,14 @@ export const PLATFORMS: TemplateInfo[] = [ directory: 'template', importName: 'pluginPlatformIOS', }, + { + type: 'npm', + name: 'visionos', + packageName: '@callstack/rnef-plugin-platform-visionos', + version: 'latest', + directory: 'template', + importName: 'pluginPlatformVisionOS', + }, { type: 'npm', name: 'android', diff --git a/packages/plugin-platform-visionos/README.md b/packages/plugin-platform-visionos/README.md new file mode 100644 index 000000000..b60dbad01 --- /dev/null +++ b/packages/plugin-platform-visionos/README.md @@ -0,0 +1,11 @@ +# plugin-platform-visionos + +This library was generated with [Nx](https://nx.dev). + +## Building + +Run `nx build plugin-platform-visionos` to build the library. + +## Running unit tests + +Run `nx test plugin-platform-visionos` to execute the unit tests via [Vitest](https://vitest.dev/). diff --git a/packages/plugin-platform-visionos/eslint.config.js b/packages/plugin-platform-visionos/eslint.config.js new file mode 100644 index 000000000..01e15a387 --- /dev/null +++ b/packages/plugin-platform-visionos/eslint.config.js @@ -0,0 +1,3 @@ +import baseConfig from '../../eslint.config.js'; + +export default baseConfig; diff --git a/packages/plugin-platform-visionos/package.json b/packages/plugin-platform-visionos/package.json new file mode 100644 index 000000000..1493da10b --- /dev/null +++ b/packages/plugin-platform-visionos/package.json @@ -0,0 +1,17 @@ +{ + "name": "@callstack/rnef-plugin-platform-visionos", + "version": "0.0.1", + "type": "module", + "exports": { + "types": "./dist/src/index.d.ts", + "import": "./dist/src/index.js" + }, + "dependencies": { + "@react-native-community/cli-config-apple": "^15.1.2", + "tslib": "^2.3.0", + "@callstack/rnef-plugin-platform-apple": "workspace:*" + }, + "devDependencies": { + "@callstack/rnef-config": "workspace:*" + } +} diff --git a/packages/plugin-platform-visionos/project.json b/packages/plugin-platform-visionos/project.json new file mode 100644 index 000000000..43b3ce458 --- /dev/null +++ b/packages/plugin-platform-visionos/project.json @@ -0,0 +1,23 @@ +{ + "name": "plugin-platform-visionos", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "packages/plugin-platform-visionos/src", + "projectType": "library", + "tags": [], + "targets": { + "build": { + "executor": "@nx/js:tsc", + "outputs": ["{options.outputPath}"], + "options": { + "outputPath": "packages/plugin-platform-visionos/dist", + "main": "packages/plugin-platform-visionos/src/index.ts", + "tsConfig": "packages/plugin-platform-visionos/tsconfig.lib.json", + "assets": [ + "packages/plugin-platform-visionos/*.md", + "packages/plugin-platform-visionos/src/template/**/*", + "packages/plugin-platform-visionos/react-native.config.*" + ] + } + } + } +} diff --git a/packages/plugin-platform-visionos/react-native.config.ts b/packages/plugin-platform-visionos/react-native.config.ts new file mode 100644 index 000000000..3527247fb --- /dev/null +++ b/packages/plugin-platform-visionos/react-native.config.ts @@ -0,0 +1,13 @@ +import { + getProjectConfig, + getDependencyConfig, +} from '@react-native-community/cli-config-apple'; + +export default { + platforms: { + visionos: { + projectConfig: getProjectConfig({ platformName: 'visionos' }), + dependencyConfig: getDependencyConfig({ platformName: 'visionos' }), + }, + }, +}; diff --git a/packages/plugin-platform-visionos/src/index.ts b/packages/plugin-platform-visionos/src/index.ts new file mode 100644 index 000000000..695a36d56 --- /dev/null +++ b/packages/plugin-platform-visionos/src/index.ts @@ -0,0 +1 @@ +export * from './lib/pluginPlatformVisionOS.js'; diff --git a/packages/plugin-platform-visionos/src/lib/__tests__/dummy.test.ts b/packages/plugin-platform-visionos/src/lib/__tests__/dummy.test.ts new file mode 100644 index 000000000..fbed3f744 --- /dev/null +++ b/packages/plugin-platform-visionos/src/lib/__tests__/dummy.test.ts @@ -0,0 +1,5 @@ +import { test, expect } from 'vitest'; + +test('dummy test', () => { + expect(true).toBe(true); +}); diff --git a/packages/plugin-platform-visionos/src/lib/pluginPlatformVisionOS.ts b/packages/plugin-platform-visionos/src/lib/pluginPlatformVisionOS.ts new file mode 100644 index 000000000..6fc32ad9e --- /dev/null +++ b/packages/plugin-platform-visionos/src/lib/pluginPlatformVisionOS.ts @@ -0,0 +1,58 @@ +import type { PluginOutput, PluginApi } from '@callstack/rnef-config'; +import { + createBuild, + createRun, + getRunOptions, + getBuildOptions, + RunFlags, + BuildFlags, +} from '@callstack/rnef-plugin-platform-apple'; +import { getProjectConfig } from '@react-native-community/cli-config-apple'; + +const projectConfig = getProjectConfig({ platformName: 'visionos' }); +const buildOptions = getBuildOptions({ platformName: 'visionos' }); +const runOptions = getRunOptions({ platformName: 'visionos' }); + +export const pluginPlatformVisionOS = + () => + (api: PluginApi): PluginOutput => { + api.registerCommand({ + name: 'build:visionos', + description: 'Build visionOS app.', + action: async (args) => { + const projectRoot = api.getProjectRoot(); + const config = projectConfig(projectRoot, {}); + + if (config) { + await createBuild('visionos', config, args as BuildFlags); + } else { + throw new Error('visionOS project not found.'); + } + }, + options: buildOptions, + }); + + api.registerCommand({ + name: 'run:visionos', + description: 'Run visionOS app.', + action: async (args) => { + const projectRoot = api.getProjectRoot(); + const config = projectConfig(projectRoot, {}); + + if (config) { + await createRun('visionos', config, args as RunFlags, projectRoot); + } else { + throw new Error('visionOS project not found.'); + } + }, + // @ts-expect-error: fix `simulator` is not defined in `RunFlags` + options: runOptions, + }); + + return { + name: 'plugin-platform-visionos', + description: 'RNEF plugin for everything visionOS.', + }; + }; + +export default pluginPlatformVisionOS; diff --git a/packages/plugin-platform-visionos/src/template/.github/actions/rnef-remote-build-visionos/action.yml b/packages/plugin-platform-visionos/src/template/.github/actions/rnef-remote-build-visionos/action.yml new file mode 100644 index 000000000..d0113cb49 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/.github/actions/rnef-remote-build-visionos/action.yml @@ -0,0 +1,103 @@ +name: 'RNEF Remote Build - visionOS Simulator' +description: 'Github implementation of the RNEF Remote Build for visionOS Simulator' + +inputs: + github-token: + description: "GitHub Token" + required: false + default: ${{ github.token }} + scheme: + description: The workspace scheme to build + required: false + default: "HelloWorld" + architectures: + description: The architectures to build for + required: false + default: "arm64 x86_64" + +outputs: + artifact-url: + description: 'URL of the relevant visionOS Simulator build artifact (could be cached)' + value: ${{ steps.cached-url.outcome == 'success' && steps.cached-url.outputs.artifact-url || steps.upload-artifact.outputs.artifact-url }} + +runs: + using: "composite" + steps: + - name: Native Fingerprint + id: fingerprint + uses: ./.github/actions/rnef-native-fingerprint + with: + platforms: visionos + + - name: Set variables + run: | + echo "ARTIFACT_NAME=${{inputs.scheme}}-${{inputs.architectures}}-${{ steps.fingerprint.outputs.hash}}.tar.gz" >> $GITHUB_ENV + shell: bash + + - name: Find artifact URL + id: cached-url + uses: ./.github/actions/find-artifact + with: + name: ${{ env.ARTIFACT_NAME }} + + - name: Post Cached Build (if found) + if: steps.cached-url.outputs.artifact-url + uses: ./.github/actions/rnef-post-build + with: + platform: visionOS Simulator + artifact-url: ${{ steps.cached-url.outputs.artifact-url }} + + - name: Install Pods + if: ${{ !steps.cached-url.outputs.artifact-url }} + run: | + cd visionos + pod install --verbose + shell: bash + + - name: Build visionOS + if: ${{ !steps.cached-url.outputs.artifact-url }} + # Taken from: https://github.com/microsoft/rnx-kit/blob/ac1cfa362ace6172a020d2b4bcdd63c398527c17/incubator/build/scripts/build-apple.sh#L49 + # @TODO replace with RNEF CLI call. + run: | + cd visionos + xcworkspace=$(find . -maxdepth 1 -name '*.xcworkspace' -type d | head -1) + xcodebuild \ + -workspace "${xcworkspace}" \ + -scheme "${{inputs.scheme}}" \ + -destination "generic/platform=visionOS Simulator" \ + -configuration Debug \ + -derivedDataPath DerivedData \ + ARCHS="${{inputs.architectures}}" \ + CODE_SIGNING_ALLOWED=NO \ + CLANG_ADDRESS_SANITIZER=NO \ + CLANG_UNDEFINED_BEHAVIOR_SANITIZER=NO \ + OTHER_CFLAGS='$(inherited) -fno-sanitize=undefined -fno-sanitize=bounds -fstack-protector-strong' \ + OTHER_LDFLAGS='$(inherited) -fno-sanitize=undefined -fno-sanitize=bounds -fstack-protector-strong' \ + COMPILER_INDEX_STORE_ENABLE=NO \ + build + shell: bash + + - name: Prepare Artifact + if: ${{ !steps.cached-url.outputs.artifact-url }} + run: | + app=$(find visionos/DerivedData/Build/Products/Debug-iphonesimulator -maxdepth 1 -name '*.app' -type d | head -1) + app_dir=$(dirname "${app}") + app_name=$(basename "${app}") + tar -C "${app_dir}" -czvf "${{ env.ARTIFACT_NAME }}" "${app_name}" + shell: bash + + - name: Upload IPA + id: upload-artifact + if: ${{ !steps.cached-url.outputs.artifact-url }} + uses: actions/upload-artifact@v4 + with: + name: ${{ env.ARTIFACT_NAME }} + path: ${{ env.ARTIFACT_NAME }} + if-no-files-found: error + + - name: Post Build + if: ${{ !steps.cached-url.outputs.artifact-url }} + uses: ./.github/actions/rnef-post-build + with: + platform: visionOS Simulator + artifact-url: ${{ steps.upload-artifact.outputs.artifact-url }} diff --git a/packages/plugin-platform-visionos/src/template/.github/workflows/remote-build-visionos.yml b/packages/plugin-platform-visionos/src/template/.github/workflows/remote-build-visionos.yml new file mode 100644 index 000000000..5cf3a9385 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/.github/workflows/remote-build-visionos.yml @@ -0,0 +1,35 @@ +name: Remote Build visionOS Simulator + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +concurrency: + group: remote-build-visionos-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: macos-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: RNEF Remote Build - visionOS Simulator + uses: ./.github/actions/rnef-remote-build-visionos + with: + architectures: arm64 diff --git a/packages/plugin-platform-visionos/src/template/package.json b/packages/plugin-platform-visionos/src/template/package.json new file mode 100644 index 000000000..d84622a16 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/package.json @@ -0,0 +1,10 @@ +{ + "name": "rnef-plugin-platform-visionos-template", + "scripts": { + "visionos": "rnef run:visionos" + }, + "devDependencies": { + "@callstack/rnef-plugin-platform-visionos": "^0.0.1", + "@callstack/react-native-visionos": "^0.76.0" + } +} diff --git a/packages/plugin-platform-visionos/src/template/visionos/.xcode.env b/packages/plugin-platform-visionos/src/template/visionos/.xcode.env new file mode 100644 index 000000000..3d5782c71 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/.xcode.env @@ -0,0 +1,11 @@ +# This `.xcode.env` file is versioned and is used to source the environment +# used when running script phases inside Xcode. +# To customize your local environment, you can create an `.xcode.env.local` +# file that is not versioned. + +# NODE_BINARY variable contains the PATH to the node executable. +# +# Customize the NODE_BINARY variable here. +# For example, to use nvm with brew, add the following line +# . "$(brew --prefix nvm)/nvm.sh" --no-use +export NODE_BINARY=$(command -v node) diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/project.pbxproj b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/project.pbxproj new file mode 100644 index 000000000..b7d8ff5cd --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/project.pbxproj @@ -0,0 +1,693 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 00E356F31AD99517003FC87E /* HelloWorldTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* HelloWorldTests.m */; }; + 0C80B921A6F3F58F76C31292 /* libPods-HelloWorld.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 767CEBBC2B582F6B000139AD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767CEBBB2B582F6B000139AD /* AppDelegate.swift */; }; + 767CEBBE2B582F78000139AD /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767CEBBD2B582F78000139AD /* App.swift */; }; + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = HelloWorld/PrivacyInfo.xcprivacy; sourceTree = ""; }; + 7699B88040F8A987B510C191 /* libPods-HelloWorld-HelloWorldTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteInfo = HelloWorld; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HelloWorldTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* HelloWorldTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HelloWorldTests.m; sourceTree = ""; }; + 13B07F961A680F5B00A75B9A /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HelloWorld/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HelloWorld/Info.plist; sourceTree = ""; }; + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorld-HelloWorldTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.debug.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.debug.xcconfig"; sourceTree = ""; }; + 5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = ""; }; + 5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld-HelloWorldTests.debug.xcconfig"; path = "Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests.debug.xcconfig"; sourceTree = ""; }; + 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorld.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 767CEBBB2B582F6B000139AD /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = HelloWorld/AppDelegate.swift; sourceTree = ""; }; + 767CEBBD2B582F78000139AD /* App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = App.swift; path = HelloWorld/App.swift; sourceTree = ""; }; + 89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld-HelloWorldTests.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests.release.xcconfig"; sourceTree = ""; }; + ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00E356EB1AD99517003FC87E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7699B88040F8A987B510C191 /* libPods-HelloWorld-HelloWorldTests.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C80B921A6F3F58F76C31292 /* libPods-HelloWorld.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00E356EF1AD99517003FC87E /* HelloWorldTests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* HelloWorldTests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = HelloWorldTests; + sourceTree = ""; + }; + 00E356F01AD99517003FC87E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 00E356F11AD99517003FC87E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 13B07FAE1A68108700A75B9A /* HelloWorld */ = { + isa = PBXGroup; + children = ( + 767CEBBB2B582F6B000139AD /* AppDelegate.swift */, + 767CEBBD2B582F78000139AD /* App.swift */, + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */, + ); + name = HelloWorld; + sourceTree = ""; + }; + 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + ED297162215061F000B7C4FE /* JavaScriptCore.framework */, + 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */, + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + ); + name = Libraries; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* HelloWorld */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* HelloWorldTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + 2D16E6871FA4F8E400B85C8A /* Frameworks */, + BBD78D7AC51CEA395F1C20DB /* Pods */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* HelloWorld.app */, + 00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + BBD78D7AC51CEA395F1C20DB /* Pods */ = { + isa = PBXGroup; + children = ( + 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */, + 5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */, + 5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */, + 89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00E356ED1AD99517003FC87E /* HelloWorldTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "HelloWorldTests" */; + buildPhases = ( + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, + 00E356EA1AD99517003FC87E /* Sources */, + 00E356EB1AD99517003FC87E /* Frameworks */, + 00E356EC1AD99517003FC87E /* Resources */, + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00E356F51AD99517003FC87E /* PBXTargetDependency */, + ); + name = HelloWorldTests; + productName = HelloWorldTests; + productReference = 00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 13B07F861A680F5B00A75B9A /* HelloWorld */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "HelloWorld" */; + buildPhases = ( + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HelloWorld; + productName = HelloWorld; + productReference = 13B07F961A680F5B00A75B9A /* HelloWorld.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1210; + TargetAttributes = { + 00E356ED1AD99517003FC87E = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + 13B07F861A680F5B00A75B9A = { + LastSwiftMigration = 1120; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "HelloWorld" */; + compatibilityVersion = "Xcode 12.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* HelloWorld */, + 00E356ED1AD99517003FC87E /* HelloWorldTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 00E356EC1AD99517003FC87E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/.xcode.env.local", + "$(SRCROOT)/.xcode.env", + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/@callstack/react-native-visionos/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/@callstack/react-native-visionos/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; + }; + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-HelloWorld-HelloWorldTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-HelloWorld-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00E356EA1AD99517003FC87E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00E356F31AD99517003FC87E /* HelloWorldTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 767CEBBC2B582F6B000139AD /* AppDelegate.swift in Sources */, + 767CEBBE2B582F78000139AD /* App.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 13B07F861A680F5B00A75B9A /* HelloWorld */; + targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 00E356F61AD99517003FC87E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = HelloWorldTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HelloWorld.app/HelloWorld"; + }; + name = Debug; + }; + 00E356F71AD99517003FC87E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + INFOPLIST_FILE = HelloWorldTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HelloWorld.app/HelloWorld"; + }; + name = Release; + }; + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = HelloWorld/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = HelloWorld; + SUPPORTED_PLATFORMS = "xros xrsimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 7; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + INFOPLIST_FILE = HelloWorld/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = HelloWorld; + SUPPORTED_PLATFORMS = "xros xrsimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 7; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); + LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + "-DFOLLY_HAVE_CLOCK_GETTIME=1", + ); + SDKROOT = iphoneos; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); + LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + "-DFOLLY_HAVE_CLOCK_GETTIME=1", + ); + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "HelloWorldTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00E356F61AD99517003FC87E /* Debug */, + 00E356F71AD99517003FC87E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "HelloWorld" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "HelloWorld" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme new file mode 100644 index 000000000..b57be22ab --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/App.swift b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/App.swift new file mode 100644 index 000000000..c1d601b22 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/App.swift @@ -0,0 +1,12 @@ +import SwiftUI +import React +import React_RCTSwiftExtensions + +@main +struct HelloWorldApp: App { + @UIApplicationDelegateAdaptor var delegate: AppDelegate + + var body: some Scene { + RCTMainWindow(moduleName: "HelloWorld") + } +} diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/AppDelegate.swift b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/AppDelegate.swift new file mode 100644 index 000000000..4e68fb4c1 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/AppDelegate.swift @@ -0,0 +1,17 @@ +import UIKit +import React +import React_RCTAppDelegate + +class AppDelegate: RCTAppDelegate { + override func sourceURL(for bridge: RCTBridge) -> URL? { + self.bundleURL() + } + + override func bundleURL() -> URL? { +#if DEBUG + RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") +#else + Bundle.main.url(forResource: "main", withExtension: "jsbundle") +#endif + } +} diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..81213230d --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/Contents.json b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/Contents.json new file mode 100644 index 000000000..2d92bd53f --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Info.plist b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Info.plist new file mode 100644 index 000000000..2f57133ef --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Info.plist @@ -0,0 +1,57 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + Hello App Display Name + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSRequiresIPhoneOS + + NSAppTransportSecurity + + + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + + + NSLocationWhenInUseUsageDescription + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + + + diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/PrivacyInfo.xcprivacy b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..ef1896e70 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/PrivacyInfo.xcprivacy @@ -0,0 +1,38 @@ + + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyTracking + + + diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/HelloWorldTests.m b/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/HelloWorldTests.m new file mode 100644 index 000000000..884d405d6 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/HelloWorldTests.m @@ -0,0 +1,66 @@ +#import +#import + +#import +#import + +#define TIMEOUT_SECONDS 600 +#define TEXT_TO_LOOK_FOR @"Welcome to React" + +@interface HelloWorldTests : XCTestCase + +@end + +@implementation HelloWorldTests + +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test +{ + if (test(view)) { + return YES; + } + for (UIView *subview in [view subviews]) { + if ([self findSubviewInView:subview matching:test]) { + return YES; + } + } + return NO; +} + +- (void)testRendersWelcomeScreen +{ + UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; + NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; + BOOL foundElement = NO; + + __block NSString *redboxError = nil; +#ifdef DEBUG + RCTSetLogFunction( + ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); +#endif + + while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { + [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + + foundElement = [self findSubviewInView:vc.view + matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; + } + +#ifdef DEBUG + RCTSetLogFunction(RCTDefaultLogFunction); +#endif + + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); + XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); +} + +@end diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/Info.plist b/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/Info.plist new file mode 100644 index 000000000..ba72822e8 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/packages/plugin-platform-visionos/src/template/visionos/Podfile b/packages/plugin-platform-visionos/src/template/visionos/Podfile new file mode 100644 index 000000000..bb882f8d6 --- /dev/null +++ b/packages/plugin-platform-visionos/src/template/visionos/Podfile @@ -0,0 +1,40 @@ +# Resolve react_native_pods.rb with node to allow for hoisting +require Pod::Executable.execute_command('node', ['-p', + 'require.resolve( + "@callstack/react-native-visionos/scripts/react_native_pods.rb", + {paths: [process.argv[1]]}, + )', __dir__]).strip + +platform :visionos, min_visionos_version_supported +prepare_react_native_project! + +linkage = ENV['USE_FRAMEWORKS'] +if linkage != nil + Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green + use_frameworks! :linkage => linkage.to_sym +end + +target 'HelloWorld' do + config = use_native_modules!(['rnef', 'config', '-p', 'visionos']) + config[:reactNativePath] = '../node_modules/@callstack/react-native-visionos' + + use_react_native!( + :path => config[:reactNativePath], + # An absolute path to your application root. + :app_path => "#{Pod::Config.instance.installation_root}/.." + ) + + target 'HelloWorldTests' do + inherit! :complete + # Pods for testing + end + + post_install do |installer| + # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 + react_native_post_install( + installer, + config[:reactNativePath], + :mac_catalyst_enabled => false + ) + end +end diff --git a/packages/plugin-platform-visionos/tsconfig.json b/packages/plugin-platform-visionos/tsconfig.json new file mode 100644 index 000000000..0e8e67d56 --- /dev/null +++ b/packages/plugin-platform-visionos/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/packages/plugin-platform-visionos/tsconfig.lib.json b/packages/plugin-platform-visionos/tsconfig.lib.json new file mode 100644 index 000000000..ce3b531ce --- /dev/null +++ b/packages/plugin-platform-visionos/tsconfig.lib.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "exclude": ["vite.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/packages/plugin-platform-visionos/tsconfig.spec.json b/packages/plugin-platform-visionos/tsconfig.spec.json new file mode 100644 index 000000000..3c002c215 --- /dev/null +++ b/packages/plugin-platform-visionos/tsconfig.spec.json @@ -0,0 +1,26 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "types": [ + "vitest/globals", + "vitest/importMeta", + "vite/client", + "node", + "vitest" + ] + }, + "include": [ + "vite.config.ts", + "vitest.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx", + "src/**/*.d.ts" + ] +} diff --git a/packages/plugin-platform-visionos/vite.config.ts b/packages/plugin-platform-visionos/vite.config.ts new file mode 100644 index 000000000..6fe09719f --- /dev/null +++ b/packages/plugin-platform-visionos/vite.config.ts @@ -0,0 +1,28 @@ +import { defineConfig } from 'vite'; + +import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; +import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin'; + +export default defineConfig({ + root: __dirname, + cacheDir: '../../node_modules/.vite/packages/plugin-platform-visionos', + + plugins: [nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])], + + // Uncomment this if you are using workers. + // worker: { + // plugins: [ nxViteTsPaths() ], + // }, + + test: { + watch: false, + globals: true, + environment: 'node', + include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + reporters: ['default'], + coverage: { + reportsDirectory: '../../coverage/packages/plugin-platform-visionos', + provider: 'v8', + }, + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a40666566..f1975f260 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -256,6 +256,22 @@ importers: specifier: ^0.0.1 version: link:../config + packages/plugin-platform-visionos: + dependencies: + '@callstack/rnef-plugin-platform-apple': + specifier: workspace:* + version: link:../plugin-platform-apple + '@react-native-community/cli-config-apple': + specifier: ^15.1.2 + version: 15.1.2 + tslib: + specifier: ^2.3.0 + version: 2.8.1 + devDependencies: + '@callstack/rnef-config': + specifier: workspace:* + version: link:../config + packages/plugin-repack: dependencies: '@callstack/repack': diff --git a/tsconfig.base.json b/tsconfig.base.json index d73fddaad..293f5bc10 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -31,7 +31,10 @@ "@rnef/tools": ["packages/tools/src/index.ts"], "@rnef/plugin-platform-apple": [ "packages/plugin-platform-apple/src/index.ts" - ] + ], + "@rnef/plugin-platform-visionos": [ + "packages/plugin-platform-visionos/src/index.ts" + ], } }, "exclude": ["node_modules", "tmp"] From bb6d42c8ad8d5fb7f2a3ec88bb5efa9172ec5cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 14 Dec 2024 12:37:09 +0100 Subject: [PATCH 2/9] update to 77 --- .../plugin-platform-visionos/package.json | 4 + .../HelloWorldTests/HelloWorldTests.m | 66 ------- .../visionos/HelloWorldTests/Info.plist | 24 --- .../rnef-remote-build-visionos/action.yml | 0 .../workflows/remote-build-visionos.yml | 0 .../{src => }/template/package.json | 0 .../HelloWorld.xcodeproj/project.pbxproj | 179 ------------------ .../xcschemes/HelloWorld.xcscheme | 0 .../template/visionos/HelloWorld/App.swift | 0 .../visionos/HelloWorld/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../HelloWorld/Images.xcassets/Contents.json | 0 .../template/visionos/HelloWorld/Info.plist | 0 .../visionos/HelloWorld/PrivacyInfo.xcprivacy | 0 .../{src => }/template/visionos/Podfile | 5 - .../visionos/_xcode.env} | 0 16 files changed, 4 insertions(+), 274 deletions(-) delete mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/HelloWorldTests.m delete mode 100644 packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/Info.plist rename packages/plugin-platform-visionos/{src => }/template/.github/actions/rnef-remote-build-visionos/action.yml (100%) rename packages/plugin-platform-visionos/{src => }/template/.github/workflows/remote-build-visionos.yml (100%) rename packages/plugin-platform-visionos/{src => }/template/package.json (100%) rename packages/plugin-platform-visionos/{src => }/template/visionos/HelloWorld.xcodeproj/project.pbxproj (70%) rename packages/plugin-platform-visionos/{src => }/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme (100%) rename packages/plugin-platform-visionos/{src => }/template/visionos/HelloWorld/App.swift (100%) rename packages/plugin-platform-visionos/{src => }/template/visionos/HelloWorld/AppDelegate.swift (100%) rename packages/plugin-platform-visionos/{src => }/template/visionos/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json (100%) rename packages/plugin-platform-visionos/{src => }/template/visionos/HelloWorld/Images.xcassets/Contents.json (100%) rename packages/plugin-platform-visionos/{src => }/template/visionos/HelloWorld/Info.plist (100%) rename packages/plugin-platform-visionos/{src => }/template/visionos/HelloWorld/PrivacyInfo.xcprivacy (100%) rename packages/plugin-platform-visionos/{src => }/template/visionos/Podfile (93%) rename packages/plugin-platform-visionos/{src/template/visionos/.xcode.env => template/visionos/_xcode.env} (100%) diff --git a/packages/plugin-platform-visionos/package.json b/packages/plugin-platform-visionos/package.json index 1493da10b..7f5b82a49 100644 --- a/packages/plugin-platform-visionos/package.json +++ b/packages/plugin-platform-visionos/package.json @@ -6,6 +6,10 @@ "types": "./dist/src/index.d.ts", "import": "./dist/src/index.js" }, + "scripts": { + "clean-dist": "rm -f dist/package.json", + "publish:verdaccio": "npm publish --registry http://localhost:4873 --userconfig ../../.npmrc" + }, "dependencies": { "@react-native-community/cli-config-apple": "^15.1.2", "tslib": "^2.3.0", diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/HelloWorldTests.m b/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/HelloWorldTests.m deleted file mode 100644 index 884d405d6..000000000 --- a/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/HelloWorldTests.m +++ /dev/null @@ -1,66 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface HelloWorldTests : XCTestCase - -@end - -@implementation HelloWorldTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; -#ifdef DEBUG - RCTSetLogFunction( - ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); -#endif - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = [self findSubviewInView:vc.view - matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - -#ifdef DEBUG - RCTSetLogFunction(RCTDefaultLogFunction); -#endif - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - -@end diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/Info.plist b/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/Info.plist deleted file mode 100644 index ba72822e8..000000000 --- a/packages/plugin-platform-visionos/src/template/visionos/HelloWorldTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/packages/plugin-platform-visionos/src/template/.github/actions/rnef-remote-build-visionos/action.yml b/packages/plugin-platform-visionos/template/.github/actions/rnef-remote-build-visionos/action.yml similarity index 100% rename from packages/plugin-platform-visionos/src/template/.github/actions/rnef-remote-build-visionos/action.yml rename to packages/plugin-platform-visionos/template/.github/actions/rnef-remote-build-visionos/action.yml diff --git a/packages/plugin-platform-visionos/src/template/.github/workflows/remote-build-visionos.yml b/packages/plugin-platform-visionos/template/.github/workflows/remote-build-visionos.yml similarity index 100% rename from packages/plugin-platform-visionos/src/template/.github/workflows/remote-build-visionos.yml rename to packages/plugin-platform-visionos/template/.github/workflows/remote-build-visionos.yml diff --git a/packages/plugin-platform-visionos/src/template/package.json b/packages/plugin-platform-visionos/template/package.json similarity index 100% rename from packages/plugin-platform-visionos/src/template/package.json rename to packages/plugin-platform-visionos/template/package.json diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/project.pbxproj b/packages/plugin-platform-visionos/template/visionos/HelloWorld.xcodeproj/project.pbxproj similarity index 70% rename from packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/project.pbxproj rename to packages/plugin-platform-visionos/template/visionos/HelloWorld.xcodeproj/project.pbxproj index b7d8ff5cd..e15bcedfc 100644 --- a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/project.pbxproj +++ b/packages/plugin-platform-visionos/template/visionos/HelloWorld.xcodeproj/project.pbxproj @@ -7,13 +7,11 @@ objects = { /* Begin PBXBuildFile section */ - 00E356F31AD99517003FC87E /* HelloWorldTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* HelloWorldTests.m */; }; 0C80B921A6F3F58F76C31292 /* libPods-HelloWorld.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 767CEBBC2B582F6B000139AD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767CEBBB2B582F6B000139AD /* AppDelegate.swift */; }; 767CEBBE2B582F78000139AD /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767CEBBD2B582F78000139AD /* App.swift */; }; 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = HelloWorld/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 7699B88040F8A987B510C191 /* libPods-HelloWorld-HelloWorldTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -27,32 +25,19 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HelloWorldTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* HelloWorldTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HelloWorldTests.m; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HelloWorld/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HelloWorld/Info.plist; sourceTree = ""; }; - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorld-HelloWorldTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.debug.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.debug.xcconfig"; sourceTree = ""; }; 5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = ""; }; - 5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld-HelloWorldTests.debug.xcconfig"; path = "Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests.debug.xcconfig"; sourceTree = ""; }; 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorld.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 767CEBBB2B582F6B000139AD /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = HelloWorld/AppDelegate.swift; sourceTree = ""; }; 767CEBBD2B582F78000139AD /* App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = App.swift; path = HelloWorld/App.swift; sourceTree = ""; }; - 89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld-HelloWorldTests.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 00E356EB1AD99517003FC87E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7699B88040F8A987B510C191 /* libPods-HelloWorld-HelloWorldTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -64,15 +49,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 00E356EF1AD99517003FC87E /* HelloWorldTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* HelloWorldTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = HelloWorldTests; - sourceTree = ""; - }; 00E356F01AD99517003FC87E /* Supporting Files */ = { isa = PBXGroup; children = ( @@ -98,7 +74,6 @@ children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 5DCACB8F33CDC322A6C60F78 /* libPods-HelloWorld.a */, - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */, ); name = Frameworks; sourceTree = ""; @@ -115,7 +90,6 @@ children = ( 13B07FAE1A68108700A75B9A /* HelloWorld */, 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* HelloWorldTests */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, BBD78D7AC51CEA395F1C20DB /* Pods */, @@ -129,7 +103,6 @@ isa = PBXGroup; children = ( 13B07F961A680F5B00A75B9A /* HelloWorld.app */, - 00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */, ); name = Products; sourceTree = ""; @@ -139,8 +112,6 @@ children = ( 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */, 5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */, - 5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */, - 89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -148,27 +119,6 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* HelloWorldTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "HelloWorldTests" */; - buildPhases = ( - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, - ); - name = HelloWorldTests; - productName = HelloWorldTests; - productReference = 00E356EE1AD99517003FC87E /* HelloWorldTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; 13B07F861A680F5B00A75B9A /* HelloWorld */ = { isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "HelloWorld" */; @@ -198,10 +148,6 @@ attributes = { LastUpgradeCheck = 1210; TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; 13B07F861A680F5B00A75B9A = { LastSwiftMigration = 1120; }; @@ -221,7 +167,6 @@ projectRoot = ""; targets = ( 13B07F861A680F5B00A75B9A /* HelloWorld */, - 00E356ED1AD99517003FC87E /* HelloWorldTests */, ); }; /* End PBXProject section */ @@ -278,28 +223,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-HelloWorld-HelloWorldTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -322,23 +245,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -356,34 +262,9 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources.sh\"\n"; showEnvVarsInLog = 0; }; - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 00E356F31AD99517003FC87E /* HelloWorldTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 13B07F871A680F5B00A75B9A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -404,57 +285,6 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-HelloWorld-HelloWorldTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = HelloWorldTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HelloWorld.app/HelloWorld"; - }; - name = Debug; - }; - 00E356F71AD99517003FC87E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-HelloWorld-HelloWorldTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = HelloWorldTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HelloWorld.app/HelloWorld"; - }; - name = Release; - }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */; @@ -660,15 +490,6 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "HelloWorldTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "HelloWorld" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme b/packages/plugin-platform-visionos/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme similarity index 100% rename from packages/plugin-platform-visionos/src/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme rename to packages/plugin-platform-visionos/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/App.swift b/packages/plugin-platform-visionos/template/visionos/HelloWorld/App.swift similarity index 100% rename from packages/plugin-platform-visionos/src/template/visionos/HelloWorld/App.swift rename to packages/plugin-platform-visionos/template/visionos/HelloWorld/App.swift diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/AppDelegate.swift b/packages/plugin-platform-visionos/template/visionos/HelloWorld/AppDelegate.swift similarity index 100% rename from packages/plugin-platform-visionos/src/template/visionos/HelloWorld/AppDelegate.swift rename to packages/plugin-platform-visionos/template/visionos/HelloWorld/AppDelegate.swift diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json b/packages/plugin-platform-visionos/template/visionos/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json rename to packages/plugin-platform-visionos/template/visionos/HelloWorld/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/Contents.json b/packages/plugin-platform-visionos/template/visionos/HelloWorld/Images.xcassets/Contents.json similarity index 100% rename from packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Images.xcassets/Contents.json rename to packages/plugin-platform-visionos/template/visionos/HelloWorld/Images.xcassets/Contents.json diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Info.plist b/packages/plugin-platform-visionos/template/visionos/HelloWorld/Info.plist similarity index 100% rename from packages/plugin-platform-visionos/src/template/visionos/HelloWorld/Info.plist rename to packages/plugin-platform-visionos/template/visionos/HelloWorld/Info.plist diff --git a/packages/plugin-platform-visionos/src/template/visionos/HelloWorld/PrivacyInfo.xcprivacy b/packages/plugin-platform-visionos/template/visionos/HelloWorld/PrivacyInfo.xcprivacy similarity index 100% rename from packages/plugin-platform-visionos/src/template/visionos/HelloWorld/PrivacyInfo.xcprivacy rename to packages/plugin-platform-visionos/template/visionos/HelloWorld/PrivacyInfo.xcprivacy diff --git a/packages/plugin-platform-visionos/src/template/visionos/Podfile b/packages/plugin-platform-visionos/template/visionos/Podfile similarity index 93% rename from packages/plugin-platform-visionos/src/template/visionos/Podfile rename to packages/plugin-platform-visionos/template/visionos/Podfile index bb882f8d6..eeb846dab 100644 --- a/packages/plugin-platform-visionos/src/template/visionos/Podfile +++ b/packages/plugin-platform-visionos/template/visionos/Podfile @@ -24,11 +24,6 @@ target 'HelloWorld' do :app_path => "#{Pod::Config.instance.installation_root}/.." ) - target 'HelloWorldTests' do - inherit! :complete - # Pods for testing - end - post_install do |installer| # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( diff --git a/packages/plugin-platform-visionos/src/template/visionos/.xcode.env b/packages/plugin-platform-visionos/template/visionos/_xcode.env similarity index 100% rename from packages/plugin-platform-visionos/src/template/visionos/.xcode.env rename to packages/plugin-platform-visionos/template/visionos/_xcode.env From db8092fb873e54ac12af4e202f03452a30dc3b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 14 Dec 2024 13:28:45 +0100 Subject: [PATCH 3/9] fix version and config command that expects ios platform to be present as well --- packages/plugin-platform-visionos/template/package.json | 2 +- packages/plugin-platform-visionos/template/visionos/Podfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-platform-visionos/template/package.json b/packages/plugin-platform-visionos/template/package.json index d84622a16..c207fe17d 100644 --- a/packages/plugin-platform-visionos/template/package.json +++ b/packages/plugin-platform-visionos/template/package.json @@ -5,6 +5,6 @@ }, "devDependencies": { "@callstack/rnef-plugin-platform-visionos": "^0.0.1", - "@callstack/react-native-visionos": "^0.76.0" + "@callstack/react-native-visionos": "^0.77.0-rc.0" } } diff --git a/packages/plugin-platform-visionos/template/visionos/Podfile b/packages/plugin-platform-visionos/template/visionos/Podfile index eeb846dab..ccf7f1e3f 100644 --- a/packages/plugin-platform-visionos/template/visionos/Podfile +++ b/packages/plugin-platform-visionos/template/visionos/Podfile @@ -15,7 +15,7 @@ if linkage != nil end target 'HelloWorld' do - config = use_native_modules!(['rnef', 'config', '-p', 'visionos']) + config = use_native_modules!(['rnef', 'config']) config[:reactNativePath] = '../node_modules/@callstack/react-native-visionos' use_react_native!( From e5ce7d769157a7eb32229cd77b5a30da5ae66b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 14 Dec 2024 15:00:34 +0100 Subject: [PATCH 4/9] use cli 16 --- packages/plugin-platform-visionos/package.json | 2 +- pnpm-lock.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugin-platform-visionos/package.json b/packages/plugin-platform-visionos/package.json index 7f5b82a49..e07c0c55f 100644 --- a/packages/plugin-platform-visionos/package.json +++ b/packages/plugin-platform-visionos/package.json @@ -11,7 +11,7 @@ "publish:verdaccio": "npm publish --registry http://localhost:4873 --userconfig ../../.npmrc" }, "dependencies": { - "@react-native-community/cli-config-apple": "^15.1.2", + "@react-native-community/cli-config-apple": "^16.0.2", "tslib": "^2.3.0", "@callstack/rnef-plugin-platform-apple": "workspace:*" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f1975f260..d9afc78c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -262,8 +262,8 @@ importers: specifier: workspace:* version: link:../plugin-platform-apple '@react-native-community/cli-config-apple': - specifier: ^15.1.2 - version: 15.1.2 + specifier: ^16.0.2 + version: 16.0.2 tslib: specifier: ^2.3.0 version: 2.8.1 From 5feefef9a719bb6f6b9f6bdfd95cf28524eeedc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 14 Dec 2024 15:01:43 +0100 Subject: [PATCH 5/9] use version not workspace --- packages/plugin-platform-visionos/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-platform-visionos/package.json b/packages/plugin-platform-visionos/package.json index e07c0c55f..777e88f83 100644 --- a/packages/plugin-platform-visionos/package.json +++ b/packages/plugin-platform-visionos/package.json @@ -13,9 +13,9 @@ "dependencies": { "@react-native-community/cli-config-apple": "^16.0.2", "tslib": "^2.3.0", - "@callstack/rnef-plugin-platform-apple": "workspace:*" + "@callstack/rnef-plugin-platform-apple": "^0.0.1" }, "devDependencies": { - "@callstack/rnef-config": "workspace:*" + "@callstack/rnef-config": "^0.0.1" } } From e6ecd7ad3a28938b405a855cd7d30c76dc7dd6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 14 Dec 2024 15:03:03 +0100 Subject: [PATCH 6/9] remove assets --- packages/plugin-platform-visionos/project.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/plugin-platform-visionos/project.json b/packages/plugin-platform-visionos/project.json index 43b3ce458..2c79ff189 100644 --- a/packages/plugin-platform-visionos/project.json +++ b/packages/plugin-platform-visionos/project.json @@ -11,12 +11,7 @@ "options": { "outputPath": "packages/plugin-platform-visionos/dist", "main": "packages/plugin-platform-visionos/src/index.ts", - "tsConfig": "packages/plugin-platform-visionos/tsconfig.lib.json", - "assets": [ - "packages/plugin-platform-visionos/*.md", - "packages/plugin-platform-visionos/src/template/**/*", - "packages/plugin-platform-visionos/react-native.config.*" - ] + "tsConfig": "packages/plugin-platform-visionos/tsconfig.lib.json" } } } From d349da139e1fd52d3d8b64c737f2a80a84f76ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 14 Dec 2024 15:04:28 +0100 Subject: [PATCH 7/9] remove TestAction form xcscheme --- .../xcshareddata/xcschemes/HelloWorld.xcscheme | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packages/plugin-platform-visionos/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme b/packages/plugin-platform-visionos/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme index b57be22ab..766cb1773 100644 --- a/packages/plugin-platform-visionos/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme +++ b/packages/plugin-platform-visionos/template/visionos/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme @@ -22,24 +22,6 @@ - - - - - - - - Date: Sat, 14 Dec 2024 15:05:59 +0100 Subject: [PATCH 8/9] set files in package.json --- packages/plugin-platform-visionos/package.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/plugin-platform-visionos/package.json b/packages/plugin-platform-visionos/package.json index 777e88f83..39da2c975 100644 --- a/packages/plugin-platform-visionos/package.json +++ b/packages/plugin-platform-visionos/package.json @@ -6,6 +6,12 @@ "types": "./dist/src/index.d.ts", "import": "./dist/src/index.js" }, + "files": [ + "dist", + "src", + "template", + "react-native.config.ts" + ], "scripts": { "clean-dist": "rm -f dist/package.json", "publish:verdaccio": "npm publish --registry http://localhost:4873 --userconfig ../../.npmrc" From 2c35ca8bf3772ea942c5721757df7c53b596a849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 23 Dec 2024 21:14:07 +0100 Subject: [PATCH 9/9] update package name --- packages/plugin-platform-visionos/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-platform-visionos/package.json b/packages/plugin-platform-visionos/package.json index 39da2c975..ec641b29f 100644 --- a/packages/plugin-platform-visionos/package.json +++ b/packages/plugin-platform-visionos/package.json @@ -1,5 +1,5 @@ { - "name": "@callstack/rnef-plugin-platform-visionos", + "name": "@rnef/plugin-platform-visionos", "version": "0.0.1", "type": "module", "exports": {