From 8f06dd2782c023510bc29d95985ba4be880e2240 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Fri, 28 Aug 2026 11:50:17 +0200 Subject: [PATCH 1/3] =?UTF-8?q?feat(=F0=9F=8D=8F):=20Swift=20Package=20Man?= =?UTF-8?q?ager=20support=20for=20iOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit React Native 0.87 ships preview SwiftPM support, and CocoaPods trunk goes read-only in December 2026. A library that ships its own Package.swift is referenced verbatim by autolinking, so this is additive: SwiftPM ignores the podspec and CocoaPods ignores Package.swift. Autolinking exposes the library through a symlink under the app's build directory and resolves the manifest's relative paths against it, so the two React Native package paths are fixed for every standard app. Skia's binaries stay out of the package. The manifest prefers the react-native-skia-apple-ios copy npm already installs for the CocoaPods build and falls back to the published Swift package, so a checkout that has run `yarn install` builds without network access. Two defines the podspec never needed: CocoaPods forces RCT_NEW_ARCH_ENABLED and RCT_REMOVE_LEGACY_ARCH project-wide, and the SwiftPM path defines neither, yet Skia's Apple sources still gate on both. Co-Authored-By: Claude Opus 5 (1M context) --- packages/skia/Package.swift | 117 ++++++++++++++++++++++++ packages/skia/include/ReactNativeSkia.h | 6 ++ packages/skia/package.json | 3 + packages/skia/react-native.config.js | 5 + 4 files changed, 131 insertions(+) create mode 100644 packages/skia/Package.swift create mode 100644 packages/skia/include/ReactNativeSkia.h create mode 100644 packages/skia/react-native.config.js diff --git a/packages/skia/Package.swift b/packages/skia/Package.swift new file mode 100644 index 0000000000..b6c6b9a9cc --- /dev/null +++ b/packages/skia/Package.swift @@ -0,0 +1,117 @@ +// swift-tools-version: 6.0 +// +// SwiftPM manifest for @shopify/react-native-skia. iOS, Ganesh. +// Additive: the CocoaPods podspec remains the supported default. +// +// React Native 0.87+ references a library that ships its own Package.swift +// through a symlink at /ios/build/generated/autolinking/libs/, and +// resolves the relative paths below against that symlink. They are the same +// for every standard app, because the symlink location is. + +import Foundation +import PackageDescription + +// Skia's xcframeworks are ~200MB and are not carried in this package. They come +// from the react-native-skia-apple-ios npm package, which @shopify/react-native-skia +// depends on, so a checkout that has installed its dependencies builds offline. +// Xcode passes the symlink as the package directory, hence resolvingSymlinks. +let packageRoot = URL(fileURLWithPath: Context.packageDirectory) + .resolvingSymlinksInPath().path + +let binariesPath = [ + "../../react-native-skia-apple-ios", // consumer: sibling in node_modules + "../../node_modules/react-native-skia-apple-ios", // this monorepo +] +.map { "\(packageRoot)/\($0)" } +.first { FileManager.default.fileExists(atPath: "\($0)/Package.swift") } + +guard let binariesPath else { + // Reached when the package was skipped at install time (`--omit=optional`, + // or a non-Apple `os` filter), which SwiftPM would otherwise report as an + // unresolvable dependency path. + fatalError( + """ + react-native-skia-apple-ios was not found next to @shopify/react-native-skia. \ + It ships the prebuilt Skia binaries this package links against. Reinstall \ + dependencies without --omit=optional, on macOS. + """) +} + +let package = Package( + name: "ReactNativeSkia", + platforms: [.iOS(.v15)], + products: [ + // Autolinking looks this name up verbatim; react-native.config.js pins it. + .library(name: "ReactNativeSkia", targets: ["ReactNativeSkia"]) + ], + dependencies: [ + .package(name: "React-GeneratedCode", path: "../../../ios"), + .package(name: "ReactNative", path: "../../../../xcframeworks"), + .package(path: binariesPath), + ], + targets: [ + .target( + name: "ReactNativeSkia", + dependencies: [ + .product(name: "ReactHeaders", package: "ReactNative"), + .product(name: "ReactNativeHeaders", package: "ReactNative"), + .product(name: "ReactNativeDependenciesHeaders", package: "ReactNative"), + .product(name: "ReactAppHeaders", package: "React-GeneratedCode"), + .product(name: "react-native-skia-apple-ios", package: "react-native-skia-apple-ios"), + ], + // apple/ and cpp/ have no common ancestor below the package root, and + // .headerSearchPath cannot escape the target path. + path: ".", + exclude: [ + "cpp/rnskia/RNDawnWindowContext.cpp", // Graphite only + "cpp/rnskia/RNDawnInterop.cpp", // Graphite only + ], + // Explicit, so SwiftPM never walks node_modules, lib, android, or the + // headers-only cpp/skia — which carries x86 AVX skcms sources that + // cannot build for arm64. + sources: [ + "apple", + "cpp/api", + "cpp/jsi", + "cpp/rnskia", + "cpp/utils", + // libskottie.a needs skjson and Apple builds no libskjson archive. + // CocoaPods compiles this via its cpp/**/*.cpp glob. + "cpp/skia/modules/jsonreader/SkJSONReader.cpp", + ], + cxxSettings: [ + // Replaces the podspec's recursive cpp/** glob, which expands to 90. + .headerSearchPath("cpp"), // "api/…", "jsi/…", "utils/…" + .headerSearchPath("cpp/skia"), // "include/core/…", "modules/…", "src/…" + .headerSearchPath("cpp/rnskia"), // apple/ uses bare "RNSkView.h" + .headerSearchPath("cpp/utils"), // apple/ uses bare "RNSkLog.h" + + // CocoaPods forces both project-wide; the SwiftPM path defines neither. + // Skia's Apple sources still gate on them: without them RNSkiaModule's + // legacy branch fails to compile and -getTurboModule: is dropped, so + // the JSI bindings never install. + .define("RCT_NEW_ARCH_ENABLED", to: "1"), + .define("RCT_REMOVE_LEGACY_ARCH", to: "1"), + + .define("SK_METAL", to: "1"), + .define("SK_GANESH", to: "1"), + .define("SK_IMAGE_READ_PIXELS_DISABLE_LEGACY_API", to: "1"), + .define("SK_DISABLE_LEGACY_SHAPER_FACTORY", to: "1"), + + // React's prebuilt C++ ABI is NDEBUG-gated, and Skia derives + // SK_RELEASE from it. Omitting either breaks the Release link. + .define("DEBUG", .when(configuration: .debug)), + .define("NDEBUG", .when(configuration: .release)), + ], + linkerSettings: [ + .linkedFramework("MetalKit"), + .linkedFramework("AVFoundation"), + .linkedFramework("AVKit"), + .linkedFramework("CoreMedia"), + ] + ) + ], + // React Native's headers need C++20, and so does Skia m152: SkMathPriv.h + // calls std::countl_zero, std::countr_zero and std::popcount. + cxxLanguageStandard: .cxx20 +) diff --git a/packages/skia/include/ReactNativeSkia.h b/packages/skia/include/ReactNativeSkia.h new file mode 100644 index 0000000000..7a6c49d136 --- /dev/null +++ b/packages/skia/include/ReactNativeSkia.h @@ -0,0 +1,6 @@ +#pragma once + +// Umbrella header for the SwiftPM target's publicHeadersPath. Nothing outside +// this package includes Skia or RNSkia headers — React Native resolves the +// Fabric component and TurboModule by class name — so the public surface is +// deliberately empty. diff --git a/packages/skia/package.json b/packages/skia/package.json index 999c56c467..605aa28a00 100644 --- a/packages/skia/package.json +++ b/packages/skia/package.json @@ -32,6 +32,9 @@ "cpp/**/*.{h,cpp}", "apple/**", "react-native-skia.podspec", + "Package.swift", + "include/**", + "react-native.config.js", "dist/**", "libs/.graphite" ], diff --git a/packages/skia/react-native.config.js b/packages/skia/react-native.config.js new file mode 100644 index 0000000000..9892e6fecf --- /dev/null +++ b/packages/skia/react-native.config.js @@ -0,0 +1,5 @@ +// Pins the SwiftPM target name. Without it the name is derived — today from the +// npm name (ReactNativeSkia), but an in-flight React Native change derives it +// from the podspec instead (react-native-skia). The name is also the header +// import prefix, so it must not move. +module.exports = {spm: {name: 'ReactNativeSkia'}}; From a197edded296f4ab5a78b38c61c335b283231968 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Tue, 8 Sep 2026 13:02:11 +0200 Subject: [PATCH 2/3] =?UTF-8?q?docs(=F0=9F=8D=8F):=20document=20the=20Swif?= =?UTF-8?q?tPM=20build=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Covers the React Native 0.87 floor, how autolinking resolves the manifest's relative paths, the two architecture defines CocoaPods supplies but SwiftPM does not, where the binaries come from, and the stale Package.resolved pin that silently keeps the previous binary source when switching between them. Co-Authored-By: Claude Opus 5 (1M context) --- packages/skia/CONTRIBUTING.md | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/packages/skia/CONTRIBUTING.md b/packages/skia/CONTRIBUTING.md index b7efb5ee90..dbb176150c 100644 --- a/packages/skia/CONTRIBUTING.md +++ b/packages/skia/CONTRIBUTING.md @@ -129,6 +129,43 @@ The npm packages this library consumes (`react-native-skia-android`, `react-nati Back in this repo, bump the prebuilt binary versions in `packages/skia/package.json` (`react-native-skia-android` and `react-native-skia-apple-*`) to the versions you just published, run `yarn`, and re-run `pod install` in the example app so it consumes the released binaries. Drop the throwaway `node_modules` and `libs/ios/.version` edits from step 3. +### Swift Package Manager (preview) + +CocoaPods stays the default. `Package.swift` is additive: SwiftPM ignores the +podspec, and CocoaPods ignores `Package.swift`. + +SwiftPM support requires **React Native 0.87 or newer** — earlier releases ship +no `scripts/spm`. `apps/example` is on an older version, so it cannot exercise +this path. + +Autolinking references the library through a symlink at +`/ios/build/generated/autolinking/libs/ReactNativeSkia`, and SwiftPM +resolves the manifest's relative paths against that symlink rather than against +`packages/skia`. The two React Native package paths are therefore identical for +every standard app. The target name is pinned in `react-native.config.js`; +without it a future React Native release would derive it from the podspec +instead and change the header import prefix. + +Skia's Apple sources still gate on `RCT_NEW_ARCH_ENABLED` and +`RCT_REMOVE_LEGACY_ARCH`. CocoaPods forces both project-wide; the SwiftPM path +defines neither, so `Package.swift` defines them itself. + +#### Binaries + +The manifest links the `react-native-skia-apple-ios` npm package, the same one +the CocoaPods build uses, so no network is needed once dependencies are +installed. It is resolved by path, from either a sibling in `node_modules` or +this monorepo's root, and the manifest fails with an explanatory message when +neither exists — which is what an `--omit=optional` install looks like. + +Fetching the binaries from a released Swift package instead is future work; it +becomes useful only once the binary npm packages are no longer dependencies. See +[wcandillon/react-native-skia-binaries](https://github.com/wcandillon/react-native-skia-binaries). + +After changing which binaries a checkout uses, delete +`ios/.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved` +— a stale pin silently keeps the previous source. + ### Publishing - Run the commands in the [Building](#building) section From d2133b6015c5a6701ba83e7e78f68f2337aaf645 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Fri, 28 Aug 2026 11:50:29 +0200 Subject: [PATCH 3/3] =?UTF-8?q?test(=F0=9F=8D=8F):=20minimal=20SwiftPM=20e?= =?UTF-8?q?xample=20app=20and=20CI=20job?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A bare React Native 0.87.1 app that consumes @shopify/react-native-skia through Swift Package Manager, with no CocoaPods, plus the CI job that builds it. It is the only thing that exercises packages/skia/Package.swift. Ships no lockfile, so CI installs with `npm install`; react and react-native are pinned exactly. Co-Authored-By: Claude Opus 5 (1M context) Co-Authored-By: Claude Fable 5.1 --- .github/workflows/ci.yml | 36 + packages/skia/CONTRIBUTING.md | 12 + spm-example/.eslintrc.js | 4 + spm-example/.gitignore | 78 +++ spm-example/.prettierrc.js | 5 + spm-example/.watchmanconfig | 1 + spm-example/App.tsx | 20 + spm-example/README.md | 60 ++ spm-example/app.json | 4 + spm-example/babel.config.js | 3 + spm-example/index.js | 9 + spm-example/ios/.gitignore | 6 + spm-example/ios/.xcode.env | 11 + spm-example/ios/Podfile | 11 + .../SpmExample.xcodeproj/.spm-injected.json | 187 ++++++ .../ios/SpmExample.xcodeproj/project.pbxproj | 619 ++++++++++++++++++ .../xcschemes/SpmExample.xcscheme | 294 +++++++++ spm-example/ios/SpmExample/AppDelegate.swift | 48 ++ .../AppIcon.appiconset/Contents.json | 53 ++ .../SpmExample/Images.xcassets/Contents.json | 6 + spm-example/ios/SpmExample/Info.plist | 59 ++ .../ios/SpmExample/LaunchScreen.storyboard | 47 ++ .../ios/SpmExample/PrivacyInfo.xcprivacy | 37 ++ spm-example/metro.config.js | 26 + spm-example/package.json | 34 + spm-example/tsconfig.json | 5 + 26 files changed, 1675 insertions(+) create mode 100644 spm-example/.eslintrc.js create mode 100644 spm-example/.gitignore create mode 100644 spm-example/.prettierrc.js create mode 100644 spm-example/.watchmanconfig create mode 100644 spm-example/App.tsx create mode 100644 spm-example/README.md create mode 100644 spm-example/app.json create mode 100644 spm-example/babel.config.js create mode 100644 spm-example/index.js create mode 100644 spm-example/ios/.gitignore create mode 100644 spm-example/ios/.xcode.env create mode 100644 spm-example/ios/Podfile create mode 100644 spm-example/ios/SpmExample.xcodeproj/.spm-injected.json create mode 100644 spm-example/ios/SpmExample.xcodeproj/project.pbxproj create mode 100644 spm-example/ios/SpmExample.xcodeproj/xcshareddata/xcschemes/SpmExample.xcscheme create mode 100644 spm-example/ios/SpmExample/AppDelegate.swift create mode 100644 spm-example/ios/SpmExample/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 spm-example/ios/SpmExample/Images.xcassets/Contents.json create mode 100644 spm-example/ios/SpmExample/Info.plist create mode 100644 spm-example/ios/SpmExample/LaunchScreen.storyboard create mode 100644 spm-example/ios/SpmExample/PrivacyInfo.xcprivacy create mode 100644 spm-example/metro.config.js create mode 100644 spm-example/package.json create mode 100644 spm-example/tsconfig.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f10fa0ac16..f1b0b2ebce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -464,3 +464,39 @@ jobs: # - name: Build example for macOS Catalyst # working-directory: apps/example/ios # run: xcodebuild -workspace example.xcworkspace -scheme ReactTestApp -destination 'platform=macOS,arch=arm64,variant=Mac Catalyst' -configuration Debug build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO + + build-test-ios-spm: + if: ${{ github.repository == 'shopify/react-native-skia' }} + runs-on: macos-latest-xlarge + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5.0.0 + with: + submodules: recursive + + - name: Setup + uses: ./.github/actions/setup + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + # spm-example sits outside the yarn workspace so its React Native can + # differ from the one apps/example pins. It ships no lockfile; react and + # react-native are pinned exactly in its package.json. + - name: Install spm-example dependencies + working-directory: spm-example + run: npm install + + # The .xcodeproj is committed already injected, so this refreshes the + # injection, runs codegen and downloads the React Native artifacts. It + # exits 2 if a linked library ships no Package.swift. + - name: Set up Swift Package Manager + working-directory: spm-example/ios + run: npx react-native spm update + + - name: Build spm-example for iOS + working-directory: spm-example/ios + run: | + xcodebuild -project SpmExample.xcodeproj -scheme SpmExample \ + -configuration Debug -sdk iphonesimulator \ + -destination 'generic/platform=iOS Simulator' \ + CODE_SIGNING_ALLOWED=NO build diff --git a/packages/skia/CONTRIBUTING.md b/packages/skia/CONTRIBUTING.md index dbb176150c..e15faa525d 100644 --- a/packages/skia/CONTRIBUTING.md +++ b/packages/skia/CONTRIBUTING.md @@ -138,6 +138,18 @@ SwiftPM support requires **React Native 0.87 or newer** — earlier releases shi no `scripts/spm`. `apps/example` is on an older version, so it cannot exercise this path. +The harness is `spm-example/` at the repo root, deliberately outside the yarn +workspace so its React Native does not collide with the workspace's. Its +[README](../../spm-example/README.md) covers the details; the short form is: + +```sh +cd spm-example && npm install +cd ios && npx react-native spm update +xcodebuild -project SpmExample.xcodeproj -scheme SpmExample \ + -configuration Debug -sdk iphonesimulator \ + -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build +``` + Autolinking references the library through a symlink at `/ios/build/generated/autolinking/libs/ReactNativeSkia`, and SwiftPM resolves the manifest's relative paths against that symlink rather than against diff --git a/spm-example/.eslintrc.js b/spm-example/.eslintrc.js new file mode 100644 index 0000000000..187894b6af --- /dev/null +++ b/spm-example/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '@react-native', +}; diff --git a/spm-example/.gitignore b/spm-example/.gitignore new file mode 100644 index 0000000000..16f8be3ae5 --- /dev/null +++ b/spm-example/.gitignore @@ -0,0 +1,78 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +**/.xcode.env.local + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml +*.hprof +.cxx/ +*.keystore +!debug.keystore +.kotlin/ + +# node.js +# +node_modules/ +# Not committed: package.json pins react and react-native exactly, and CI +# installs with `npm install`. +package-lock.json +npm-debug.log +yarn-error.log + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output + +# Bundle artifact +*.jsbundle + +# Ruby / CocoaPods +**/Pods/ +/vendor/bundle/ + +# Temporary files created by Metro to check the health of the file watcher +.metro-health-check* + +# testing +/coverage + +# Yarn +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/spm-example/.prettierrc.js b/spm-example/.prettierrc.js new file mode 100644 index 0000000000..06860c8d1b --- /dev/null +++ b/spm-example/.prettierrc.js @@ -0,0 +1,5 @@ +module.exports = { + arrowParens: 'avoid', + singleQuote: true, + trailingComma: 'all', +}; diff --git a/spm-example/.watchmanconfig b/spm-example/.watchmanconfig new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/spm-example/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/spm-example/App.tsx b/spm-example/App.tsx new file mode 100644 index 0000000000..25cbc935c2 --- /dev/null +++ b/spm-example/App.tsx @@ -0,0 +1,20 @@ +import React from 'react'; +import {StyleSheet, View} from 'react-native'; +import {Canvas, Circle, Fill} from '@shopify/react-native-skia'; + +export default function App() { + return ( + + + + + + + + ); +} + +const styles = StyleSheet.create({ + container: {flex: 1, alignItems: 'center', justifyContent: 'center'}, + canvas: {width: 320, height: 320}, +}); diff --git a/spm-example/README.md b/spm-example/README.md new file mode 100644 index 0000000000..1244b07326 --- /dev/null +++ b/spm-example/README.md @@ -0,0 +1,60 @@ +# SpmExample + +A minimal React Native app that consumes `@shopify/react-native-skia` through +**Swift Package Manager** instead of CocoaPods. It exists to prove +`packages/skia/Package.swift` actually builds and renders, and it is what the +`build-test-ios-spm` CI job runs. + +iOS only, and Ganesh only. CocoaPods remains the supported default for this +library; see the Swift Package Manager section of +[`packages/skia/CONTRIBUTING.md`](../packages/skia/CONTRIBUTING.md) for the +design notes. + +## Why it sits outside the yarn workspace + +Swift Package Manager support requires **React Native 0.87 or newer** — earlier +releases ship no `scripts/spm`. `apps/example` is pinned to an older version, so +this app keeps its own `node_modules` and installs with npm. It ships no +lockfile: `react` and `react-native` are pinned exactly in `package.json`. + +`@shopify/react-native-skia` is linked from the workspace with +`file:../packages/skia`, so it builds the working tree, not a published release. + +## Build and run + +```sh +npm install +cd ios +npx react-native spm add --deintegrate # injects the Swift packages into the .xcodeproj + +xcodebuild -project SpmExample.xcodeproj -scheme SpmExample \ + -configuration Release -sdk iphonesimulator \ + -destination 'generic/platform=iOS Simulator' \ + -derivedDataPath build/dd-release CODE_SIGNING_ALLOWED=NO build +``` + +Release embeds its own JS bundle, so it needs no Metro. For Debug, run +`npm start` first. + +## Gotchas + +- **Stale `Package.resolved`.** Xcode caches package pins in + `ios/SpmExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved`. + When switching the Skia binaries between the npm-installed copy and a released + Swift package, delete it first or the old source is silently kept. +- **`spm update` re-adds an absolute `HERMES_CLI_PATH`.** On React Native + 0.87.1 the injector writes this machine's own path to `hermesc` into + `project.pbxproj` and `.spm-injected.json`. The build does not need it, so it + is deliberately not committed. Strip it again before committing: + ```sh + sed -i '' '/HERMES_CLI_PATH = /d' ios/SpmExample.xcodeproj/project.pbxproj + sed -i '' '/^ "HERMES_CLI_PATH",$/d' ios/SpmExample.xcodeproj/.spm-injected.json + ``` + react/react-native#58292 proposes removing the write upstream. Until that is + in a React Native release, the strip stays necessary on every commit. +- **The Podfile is not for CocoaPods.** React Native's CLI finds the iOS + project by searching for a Podfile, so an SwiftPM-only app still has to ship + one. It installs nothing and raises if `pod install` is ever run. +- **Two React copies.** `metro.config.js` forces `react` and `react-native` to + this app's own copies. Without that, Skia's components resolve the workspace + root's React and hooks fail. diff --git a/spm-example/app.json b/spm-example/app.json new file mode 100644 index 0000000000..8a50fdcba5 --- /dev/null +++ b/spm-example/app.json @@ -0,0 +1,4 @@ +{ + "name": "SpmExample", + "displayName": "SpmExample" +} diff --git a/spm-example/babel.config.js b/spm-example/babel.config.js new file mode 100644 index 0000000000..f7b3da3b33 --- /dev/null +++ b/spm-example/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ['module:@react-native/babel-preset'], +}; diff --git a/spm-example/index.js b/spm-example/index.js new file mode 100644 index 0000000000..9b73932914 --- /dev/null +++ b/spm-example/index.js @@ -0,0 +1,9 @@ +/** + * @format + */ + +import { AppRegistry } from 'react-native'; +import App from './App'; +import { name as appName } from './app.json'; + +AppRegistry.registerComponent(appName, () => App); diff --git a/spm-example/ios/.gitignore b/spm-example/ios/.gitignore new file mode 100644 index 0000000000..c1e540af82 --- /dev/null +++ b/spm-example/ios/.gitignore @@ -0,0 +1,6 @@ + +# SPM – auto-generated at build time (do not commit) +Package.resolved +build/generated/ +build/xcframeworks/ +.build/ diff --git a/spm-example/ios/.xcode.env b/spm-example/ios/.xcode.env new file mode 100644 index 0000000000..3d5782c715 --- /dev/null +++ b/spm-example/ios/.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/spm-example/ios/Podfile b/spm-example/ios/Podfile new file mode 100644 index 0000000000..0dc443295d --- /dev/null +++ b/spm-example/ios/Podfile @@ -0,0 +1,11 @@ +# This app builds with Swift Package Manager, not CocoaPods. The Podfile is +# still required: React Native's CLI locates the iOS project by searching for +# one (see @react-native-community/cli-config-apple), and without it +# `react-native spm` and the Xcode autolinking phase both fail with +# "CLI config did not provide project.ios.sourceDir". +# +# Nothing ever installs it — only CocoaPods evaluates this file, so the raise +# below turns an accidental `pod install` into a clear message instead of +# silently re-integrating CocoaPods and breaking the Swift package graph. +raise 'SpmExample builds with Swift Package Manager. Do not run `pod install` ' \ + 'here: it would re-integrate CocoaPods and break the Swift package graph.' diff --git a/spm-example/ios/SpmExample.xcodeproj/.spm-injected.json b/spm-example/ios/SpmExample.xcodeproj/.spm-injected.json new file mode 100644 index 0000000000..bd553e5ca7 --- /dev/null +++ b/spm-example/ios/SpmExample.xcodeproj/.spm-injected.json @@ -0,0 +1,187 @@ +{ + "rootUuid": "83CBB9F71A601CBA00E9B192", + "target": "SpmExample", + "targetUuid": "13B07F861A680F5B00A75B9A", + "injectedUuids": [ + "17CA21E30A8FFCB9D0FC1E35", + "27BDE9D743CB351F53154525", + "3AFDEFB917B01458307FDE0A", + "3F1E298E4A2D7CA403A328B5", + "50A8621D202A6CFB97E2C1B5", + "512EBECF5434FD7A6AF7C967", + "658A88AFBFD620F8BC6F91BA", + "69A7AB74931112BD2779B631", + "8332BE36B9C49BD2E49347C1", + "920F69A9DF98D37C8308D020", + "947DD5EF3BE079FB7F5AFF87", + "94F7C9B714A718310DA6BE9C", + "A700952B9A737913514EB28F", + "B174F870C259554596A4373B", + "C2FECF1430FDAAE3BF355839", + "D6BD17EA9023C9F39246B71F", + "F3857EDDA38AFC0011322D6D" + ], + "createdArrayFields": [ + { + "container": "project", + "key": "packageReferences" + }, + { + "container": "target", + "key": "packageProductDependencies" + } + ], + "buildSettingChanges": [ + { + "configUuid": "13B07F941A680F5B00A75B9A", + "createdArrayKeys": [ + "HEADER_SEARCH_PATHS", + "SWIFT_ACTIVE_COMPILATION_CONDITIONS", + "FRAMEWORK_SEARCH_PATHS" + ], + "appendedArrayValues": { + "OTHER_LDFLAGS": [ + "\"$(RN_SPM_REACT_BINARY)\"", + "\"$(RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY)\"", + "\"$(RN_SPM_HERMES_BINARY)\"" + ] + }, + "createdScalars": [ + "CLANG_CXX_LANGUAGE_STANDARD", + "REACT_NATIVE_PATH", + "RN_SPM_FLAVOR", + "\"RN_SPM_REACT_FRAMEWORK[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_BINARY[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_SEARCH_PATH[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_FRAMEWORK[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_BINARY[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_SEARCH_PATH[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_FRAMEWORK[sdk=macosx*]\"", + "\"RN_SPM_REACT_BINARY[sdk=macosx*]\"", + "\"RN_SPM_REACT_SEARCH_PATH[sdk=macosx*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=appletvos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=appletvos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=appletvos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=appletvsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=appletvsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=appletvsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=macosx*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=macosx*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=macosx*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=xros*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=xros*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=xros*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=xrsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=xrsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=xrsimulator*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=appletvos*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=appletvos*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=appletvos*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=appletvsimulator*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=appletvsimulator*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=appletvsimulator*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=iphoneos*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=iphoneos*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=iphoneos*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=iphonesimulator*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=iphonesimulator*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=iphonesimulator*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=macosx*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=macosx*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=macosx*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=xros*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=xros*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=xros*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=xrsimulator*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=xrsimulator*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=xrsimulator*]\"" + ], + "replacedScalars": {} + }, + { + "configUuid": "13B07F951A680F5B00A75B9A", + "createdArrayKeys": [ + "HEADER_SEARCH_PATHS", + "FRAMEWORK_SEARCH_PATHS" + ], + "appendedArrayValues": { + "OTHER_LDFLAGS": [ + "\"$(RN_SPM_REACT_BINARY)\"", + "\"$(RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY)\"", + "\"$(RN_SPM_HERMES_BINARY)\"" + ] + }, + "createdScalars": [ + "CLANG_CXX_LANGUAGE_STANDARD", + "REACT_NATIVE_PATH", + "RN_SPM_FLAVOR", + "\"RN_SPM_REACT_FRAMEWORK[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_BINARY[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_SEARCH_PATH[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_FRAMEWORK[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_BINARY[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_SEARCH_PATH[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_FRAMEWORK[sdk=macosx*]\"", + "\"RN_SPM_REACT_BINARY[sdk=macosx*]\"", + "\"RN_SPM_REACT_SEARCH_PATH[sdk=macosx*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=appletvos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=appletvos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=appletvos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=appletvsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=appletvsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=appletvsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=iphoneos*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=iphonesimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=macosx*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=macosx*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=macosx*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=xros*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=xros*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=xros*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=xrsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=xrsimulator*]\"", + "\"RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=xrsimulator*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=appletvos*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=appletvos*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=appletvos*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=appletvsimulator*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=appletvsimulator*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=appletvsimulator*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=iphoneos*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=iphoneos*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=iphoneos*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=iphonesimulator*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=iphonesimulator*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=iphonesimulator*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=macosx*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=macosx*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=macosx*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=xros*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=xros*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=xros*]\"", + "\"RN_SPM_HERMES_FRAMEWORK[sdk=xrsimulator*]\"", + "\"RN_SPM_HERMES_BINARY[sdk=xrsimulator*]\"", + "\"RN_SPM_HERMES_SEARCH_PATH[sdk=xrsimulator*]\"" + ], + "replacedScalars": {} + } + ], + "generatedSources": {}, + "scriptPhases": {}, + "artifactsVersionOverride": null, + "configCommand": null, + "scheme": { + "file": "SpmExample.xcscheme", + "created": false + } +} diff --git a/spm-example/ios/SpmExample.xcodeproj/project.pbxproj b/spm-example/ios/SpmExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..1fc008cf83 --- /dev/null +++ b/spm-example/ios/SpmExample.xcodeproj/project.pbxproj @@ -0,0 +1,619 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; }; + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + 94F7C9B714A718310DA6BE9C /* ReactHeaders in Frameworks */ = {isa = PBXBuildFile; productRef = 512EBECF5434FD7A6AF7C967 /* ReactHeaders */;}; + 17CA21E30A8FFCB9D0FC1E35 /* ReactNativeHeaders in Frameworks */ = {isa = PBXBuildFile; productRef = 920F69A9DF98D37C8308D020 /* ReactNativeHeaders */;}; + 69A7AB74931112BD2779B631 /* ReactNativeDependenciesHeaders in Frameworks */ = {isa = PBXBuildFile; productRef = 8332BE36B9C49BD2E49347C1 /* ReactNativeDependenciesHeaders */;}; + D6BD17EA9023C9F39246B71F /* Autolinked in Frameworks */ = {isa = PBXBuildFile; productRef = 3AFDEFB917B01458307FDE0A /* Autolinked */;}; + 3F1E298E4A2D7CA403A328B5 /* ReactCodegen in Frameworks */ = {isa = PBXBuildFile; productRef = 947DD5EF3BE079FB7F5AFF87 /* ReactCodegen */;}; + 50A8621D202A6CFB97E2C1B5 /* ReactAppDependencyProvider in Frameworks */ = {isa = PBXBuildFile; productRef = F3857EDDA38AFC0011322D6D /* ReactAppDependencyProvider */;}; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 13B07F961A680F5B00A75B9A /* SpmExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpmExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SpmExample/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = SpmExample/Info.plist; sourceTree = ""; }; + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = SpmExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; + 761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = SpmExample/AppDelegate.swift; sourceTree = ""; }; + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = SpmExample/LaunchScreen.storyboard; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 94F7C9B714A718310DA6BE9C /* ReactHeaders in Frameworks */, + 17CA21E30A8FFCB9D0FC1E35 /* ReactNativeHeaders in Frameworks */, + 69A7AB74931112BD2779B631 /* ReactNativeDependenciesHeaders in Frameworks */, + D6BD17EA9023C9F39246B71F /* Autolinked in Frameworks */, + 3F1E298E4A2D7CA403A328B5 /* ReactCodegen in Frameworks */, + 50A8621D202A6CFB97E2C1B5 /* ReactAppDependencyProvider in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 13B07FAE1A68108700A75B9A /* SpmExample */ = { + isa = PBXGroup; + children = ( + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 761780EC2CA45674006654EE /* AppDelegate.swift */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */, + ); + name = SpmExample; + sourceTree = ""; + }; + 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + ); + name = Libraries; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* SpmExample */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 83CBBA001A601CBA00E9B192 /* Products */, + 2D16E6871FA4F8E400B85C8A /* Frameworks */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* SpmExample.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 13B07F861A680F5B00A75B9A /* SpmExample */ = { + packageProductDependencies = ( + 512EBECF5434FD7A6AF7C967 /* ReactHeaders */, + 920F69A9DF98D37C8308D020 /* ReactNativeHeaders */, + 8332BE36B9C49BD2E49347C1 /* ReactNativeDependenciesHeaders */, + 3AFDEFB917B01458307FDE0A /* Autolinked */, + 947DD5EF3BE079FB7F5AFF87 /* ReactCodegen */, + F3857EDDA38AFC0011322D6D /* ReactAppDependencyProvider */, + ); + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "SpmExample" */; + buildPhases = ( + 658A88AFBFD620F8BC6F91BA /* Sync SPM Autolinking */, + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + B174F870C259554596A4373B /* Embed React Native Flavored Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SpmExample; + productName = SpmExample; + productReference = 13B07F961A680F5B00A75B9A /* SpmExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + packageReferences = ( + 27BDE9D743CB351F53154525 /* XCLocalSwiftPackageReference "build/xcframeworks" */, + C2FECF1430FDAAE3BF355839 /* XCLocalSwiftPackageReference "build/generated/autolinking" */, + A700952B9A737913514EB28F /* XCLocalSwiftPackageReference "build/generated/ios" */, + ); + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1210; + TargetAttributes = { + 13B07F861A680F5B00A75B9A = { + LastSwiftMigration = 1120; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "SpmExample" */; + compatibilityVersion = "Xcode 12.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* SpmExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, + 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=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"\\\"$WITH_ENVIRONMENT\\\" \\\"$REACT_NATIVE_XCODE\\\"\"\n"; + }; + 658A88AFBFD620F8BC6F91BA /* Sync SPM Autolinking */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Sync SPM Autolinking"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\n# ---------------------------------------------------------------------------\n# Resolve a node binary and the react-native package dir at BUILD TIME.\n# ---------------------------------------------------------------------------\nNODE_BINARY=\"${NODE_BINARY:-}\"\nif [ -z \"$NODE_BINARY\" ]; then\n # Source RN's standard app-local node-path files. They reference vars that\n # may be unset and may return non-zero, so relax nounset AND errexit while\n # sourcing — a buggy user .xcode.env must degrade to PATH-based node\n # resolution below, not silently abort every build.\n set +eu\n if [ -f \"$SRCROOT/.xcode.env\" ]; then\n . \"$SRCROOT/.xcode.env\"\n fi\n if [ -f \"$SRCROOT/.xcode.env.local\" ]; then\n . \"$SRCROOT/.xcode.env.local\"\n fi\n set -eu\n NODE_BINARY=\"${NODE_BINARY:-}\"\nfi\nif [ -z \"$NODE_BINARY\" ]; then\n NODE_BINARY=\"$(command -v node 2>/dev/null || true)\"\nfi\n\n# Resolve react-native's dir FROM THE APP (require.resolve), not a\n# generation-time baked path — the baked path goes stale in pnpm / hoisted\n# stores. Fall back to the baked path if resolution fails or the resolved dir\n# has no setup-apple-spm.js.\nRN_DIR=\"\"\nif [ -n \"$NODE_BINARY\" ]; then\n RN_DIR=\"$(cd \"$SRCROOT\" && \"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native/package.json'))\" 2>/dev/null || true)\"\nfi\nif [ -z \"$RN_DIR\" ] || [ ! -f \"$RN_DIR/scripts/setup-apple-spm.js\" ]; then\n RN_DIR=\"../node_modules/react-native\"\nfi\n\nSTAMP=\"$SRCROOT/build/generated/autolinking/.spm-sync-stamp\"\nSTALE=0\n\n# Find project root (where package.json lives — may be an ancestor of SRCROOT)\nPROJECT_ROOT=\"$SRCROOT\"\nwhile [ \"$PROJECT_ROOT\" != \"/\" ] && [ ! -f \"$PROJECT_ROOT/package.json\" ]; do\n PROJECT_ROOT=\"$(dirname \"$PROJECT_ROOT\")\"\ndone\nif [ ! -f \"$PROJECT_ROOT/package.json\" ]; then\n PROJECT_ROOT=\"$SRCROOT\"\nfi\n\n# Check 1: dependency inputs (covers app projects after any package manager install)\nfor INPUT in \\\n \"$PROJECT_ROOT/package.json\" \\\n \"$PROJECT_ROOT/react-native.config.js\"; do\n if [ -f \"$INPUT\" ] && [ \"$INPUT\" -nt \"$STAMP\" ]; then\n STALE=1\n break\n fi\ndone\n\n# Check workspace lockfiles and package-manager metadata. These cover package\n# managers that do not reliably bump node_modules mtimes, and Yarn PnP projects\n# that do not have node_modules at all.\nif [ \"$STALE\" -eq 0 ]; then\n DIR=\"$PROJECT_ROOT\"\n while [ \"$DIR\" != \"/\" ]; do\n for INPUT in \\\n \"$DIR/package-lock.json\" \\\n \"$DIR/npm-shrinkwrap.json\" \\\n \"$DIR/yarn.lock\" \\\n \"$DIR/pnpm-lock.yaml\" \\\n \"$DIR/bun.lock\" \\\n \"$DIR/bun.lockb\" \\\n \"$DIR/.pnp.cjs\" \\\n \"$DIR/.pnp.loader.mjs\"; do\n if [ -f \"$INPUT\" ] && [ \"$INPUT\" -nt \"$STAMP\" ]; then\n STALE=1\n break\n fi\n done\n if [ \"$STALE\" -eq 1 ]; then\n break\n fi\n DIR=\"$(dirname \"$DIR\")\"\n done\nfi\n\n# Check node_modules mtime. In monorepos, node_modules may be hoisted to any\n# ancestor between the app package and the workspace root.\nif [ \"$STALE\" -eq 0 ]; then\n DIR=\"$PROJECT_ROOT\"\n while [ \"$DIR\" != \"/\" ]; do\n NM_DIR=\"$DIR/node_modules\"\n if [ -d \"$NM_DIR\" ] && [ \"$NM_DIR\" -nt \"$STAMP\" ]; then\n STALE=1\n break\n fi\n DIR=\"$(dirname \"$DIR\")\"\n done\nfi\n\n# Also check the app root directly when SRCROOT is not the package root.\nif [ \"$STALE\" -eq 0 ] && [ \"$SRCROOT\" != \"$PROJECT_ROOT\" ]; then\n if [ -d \"$SRCROOT/node_modules\" ] && [ \"$SRCROOT/node_modules\" -nt \"$STAMP\" ]; then\n STALE=1\n fi\nfi\n\n# Check 1.5: watched paths (mixed dirs AND files). Dirs catch add/remove of\n# source files in spm.modules and autolinked deps (dir mtime updates on both);\n# files catch edits to a dep's checked-in Package.swift / plugin manifests that\n# would not bump any parent dir mtime. A path that has VANISHED (renamed/moved\n# module root) forces a re-sync so the autolinker surfaces the real, actionable\n# config error rather than the build failing later on dangling-symlink noise.\nWATCH_FILE=\"$SRCROOT/build/generated/autolinking/.spm-sync-watch-paths\"\nif [ \"$STALE\" -eq 0 ] && [ -f \"$WATCH_FILE\" ]; then\n while IFS= read -r P; do\n [ -z \"$P\" ] && continue\n if [ -d \"$P\" ]; then\n if [ -n \"$(find \"$P\" -newer \"$STAMP\" -print -quit 2>/dev/null)\" ]; then\n STALE=1\n break\n fi\n elif [ -f \"$P\" ]; then\n if [ \"$P\" -nt \"$STAMP\" ]; then\n STALE=1\n break\n fi\n else\n STALE=1\n break\n fi\n done < \"$WATCH_FILE\"\nfi\n\n# Check 2: codegen spec files changed via git (covers monorepo after git pull)\nif [ \"$STALE\" -eq 0 ] && [ -f \"$STAMP\" ]; then\n STAMP_TIME=$(stat -f %m \"$STAMP\" 2>/dev/null || stat -c %Y \"$STAMP\" 2>/dev/null || echo 0)\n LATEST_SPEC_COMMIT=$(git -C \"$SRCROOT\" log -1 --format=%ct -- '*.js' '*.ts' 2>/dev/null || echo 0)\n if [ \"$LATEST_SPEC_COMMIT\" -gt \"$STAMP_TIME\" ]; then\n STALE=1\n fi\nfi\n\nif [ ! -f \"$STAMP\" ]; then\n STALE=1\nfi\n\n# Re-sync codegen + autolinking when a dependency input changed. Runtime\n# framework slots and Xcode linker settings are only changed by spm update.\nif [ \"$STALE\" -eq 1 ]; then\n echo \"SPM sync inputs changed — re-syncing (codegen + autolinking)...\"\n\n WITH_ENVIRONMENT=\"$RN_DIR/scripts/xcode/with-environment.sh\"\n\n if [ -f \"$WITH_ENVIRONMENT\" ]; then\n # with-environment.sh references PODS_ROOT and $1, which may be unset.\n # Temporarily disable nounset to avoid failures when sourcing.\n export PODS_ROOT=\"${PODS_ROOT:-$SRCROOT}\"\n set +u\n . \"$WITH_ENVIRONMENT\"\n set -u\n fi\n\n cd \"$SRCROOT\"\n # `|| RC=$?` so a non-zero exit is CAPTURED rather than aborting the phase\n # under `set -e` — the whole point is to branch on the code below (2 = fail\n # the build with a scaffold hint; other non-zero = warn but don't break).\n RC=0\n if [ -n \"$NODE_BINARY\" ] && [ -f \"$RN_DIR/scripts/setup-apple-spm.js\" ]; then\n # Direct, dependency-free dispatch (no `npx react-native`, which needs\n # @react-native-community/cli).\n \"$NODE_BINARY\" \"$RN_DIR/scripts/setup-apple-spm.js\" sync || RC=$?\n elif command -v npx >/dev/null 2>&1; then\n npx react-native spm sync || RC=$?\n else\n echo \"warning: node/npx not found — skipping SPM sync\"\n fi\n if [ \"$RC\" -eq 2 ]; then\n # Exit 2 = an autolinked community dependency has no Package.swift. The\n # autolinker already printed an `error:` line per dep (so Xcode shows them\n # and the fix). Fail the build — the developer must run\n # `npx react-native spm scaffold` from a terminal to generate the manifest.\n exit 1\n elif [ \"$RC\" -ne 0 ]; then\n echo \"warning: SPM sync failed — build may use stale codegen/autolinking\"\n fi\nfi\n\n"; + }; + B174F870C259554596A4373B /* Embed React Native Flavored Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "$(SRCROOT)/build/xcframeworks/.artifact-stamp", + "$(RN_SPM_REACT_FRAMEWORK)", + "$(RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK)", + "$(RN_SPM_HERMES_FRAMEWORK)", + ); + name = "Embed React Native Flavored Frameworks"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(TARGET_BUILD_DIR)/$(FRAMEWORKS_FOLDER_PATH)/React.framework", + "$(TARGET_BUILD_DIR)/$(FRAMEWORKS_FOLDER_PATH)/ReactNativeDependencies.framework", + "$(TARGET_BUILD_DIR)/$(FRAMEWORKS_FOLDER_PATH)/hermesvm.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -euo pipefail\n\ndestination=\"$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH\"\nmkdir -p \"$destination\"\n\nvalidate_framework() {\n source=\"$1\"\n name=\"$2\"\n if [ -z \"$source\" ] || [ ! -d \"$source\" ]; then\n echo \"error: React Native SwiftPM framework '$name' is unavailable for configuration '$CONFIGURATION' and SDK '$SDK_NAME': $source\"\n exit 1\n fi\n binary=\"${name%.framework}\"\n if [ ! -e \"$source/$binary\" ] && [ ! -e \"$source/Versions/Current/$binary\" ]; then\n echo \"error: React Native SwiftPM framework '$name' is invalid for configuration '$CONFIGURATION': expected $source/$binary or $source/Versions/Current/$binary\"\n exit 1\n fi\n}\n\ncopy_and_sign() {\n source=\"$1\"\n name=\"$2\"\n /usr/bin/rsync -a --delete \"$source/\" \"$destination/$name/\"\n if [ \"${CODE_SIGNING_ALLOWED:-YES}\" != \"NO\" ]; then\n identity=\"${EXPANDED_CODE_SIGN_IDENTITY:--}\"\n if [ \"$identity\" = \"-\" ]; then\n /usr/bin/codesign --force --sign - --timestamp=none --preserve-metadata=identifier,entitlements,flags \"$destination/$name\"\n else\n /usr/bin/codesign --force --sign \"$identity\" --preserve-metadata=identifier,entitlements,flags \"$destination/$name\"\n fi\n fi\n}\n\nvalidate_framework \"${RN_SPM_REACT_FRAMEWORK:-}\" \"React.framework\"\nvalidate_framework \"${RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK:-}\" \"ReactNativeDependencies.framework\"\nvalidate_framework \"${RN_SPM_HERMES_FRAMEWORK:-}\" \"hermesvm.framework\"\ncopy_and_sign \"${RN_SPM_REACT_FRAMEWORK:-}\" \"React.framework\"\ncopy_and_sign \"${RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK:-}\" \"ReactNativeDependencies.framework\"\ncopy_and_sign \"${RN_SPM_HERMES_FRAMEWORK:-}\" \"hermesvm.framework\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + "RN_SPM_HERMES_SEARCH_PATH[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64_x86_64-simulator"; + "RN_SPM_HERMES_BINARY[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64_x86_64-simulator/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64_x86_64-simulator/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64"; + "RN_SPM_HERMES_BINARY[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-maccatalyst"; + "RN_SPM_HERMES_BINARY[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-maccatalyst/hermesvm.framework/Versions/1/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-maccatalyst/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-simulator"; + "RN_SPM_HERMES_BINARY[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-simulator/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-simulator/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64"; + "RN_SPM_HERMES_BINARY[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64_x86_64-simulator"; + "RN_SPM_HERMES_BINARY[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64_x86_64-simulator/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64_x86_64-simulator/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64"; + "RN_SPM_HERMES_BINARY[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64/hermesvm.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64_x86_64-simulator"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64_x86_64-simulator/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64_x86_64-simulator/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-maccatalyst"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-maccatalyst/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-maccatalyst/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-simulator"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-simulator/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-simulator/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64_x86_64-simulator"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64_x86_64-simulator/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64_x86_64-simulator/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64/ReactNativeDependencies.framework"; + "RN_SPM_REACT_SEARCH_PATH[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-maccatalyst"; + "RN_SPM_REACT_BINARY[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-maccatalyst/React.framework/React"; + "RN_SPM_REACT_FRAMEWORK[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-maccatalyst/React.framework"; + "RN_SPM_REACT_SEARCH_PATH[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-simulator"; + "RN_SPM_REACT_BINARY[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-simulator/React.framework/React"; + "RN_SPM_REACT_FRAMEWORK[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-simulator/React.framework"; + "RN_SPM_REACT_SEARCH_PATH[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64"; + "RN_SPM_REACT_BINARY[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64/React.framework/React"; + "RN_SPM_REACT_FRAMEWORK[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64/React.framework"; + RN_SPM_FLAVOR = debug; + REACT_NATIVE_PATH = "../node_modules/react-native"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(RN_SPM_REACT_SEARCH_PATH)", + "$(RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH)", + "$(RN_SPM_HERMES_SEARCH_PATH)", + ); + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)", + DEBUG, + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/build/generated/autolinking/headers", + ); + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = SpmExample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + "$(RN_SPM_REACT_BINARY)", + "$(RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY)", + "$(RN_SPM_HERMES_BINARY)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = SpmExample; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + "RN_SPM_HERMES_SEARCH_PATH[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64_x86_64-simulator"; + "RN_SPM_HERMES_BINARY[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64_x86_64-simulator/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64_x86_64-simulator/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64"; + "RN_SPM_HERMES_BINARY[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/xros-arm64/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-maccatalyst"; + "RN_SPM_HERMES_BINARY[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-maccatalyst/hermesvm.framework/Versions/1/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-maccatalyst/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-simulator"; + "RN_SPM_HERMES_BINARY[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-simulator/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64_x86_64-simulator/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64"; + "RN_SPM_HERMES_BINARY[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/ios-arm64/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64_x86_64-simulator"; + "RN_SPM_HERMES_BINARY[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64_x86_64-simulator/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64_x86_64-simulator/hermesvm.framework"; + "RN_SPM_HERMES_SEARCH_PATH[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64"; + "RN_SPM_HERMES_BINARY[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64/hermesvm.framework/hermesvm"; + "RN_SPM_HERMES_FRAMEWORK[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/hermes-engine.xcframework/tvos-arm64/hermesvm.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64_x86_64-simulator"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64_x86_64-simulator/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=xrsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64_x86_64-simulator/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=xros*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/xros-arm64/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-maccatalyst"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-maccatalyst/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-maccatalyst/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-simulator"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-simulator/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64_x86_64-simulator/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/ios-arm64/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64_x86_64-simulator"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64_x86_64-simulator/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=appletvsimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64_x86_64-simulator/ReactNativeDependencies.framework"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64/ReactNativeDependencies.framework/ReactNativeDependencies"; + "RN_SPM_REACT_NATIVE_DEPENDENCIES_FRAMEWORK[sdk=appletvos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/ReactNativeDependencies.xcframework/tvos-arm64/ReactNativeDependencies.framework"; + "RN_SPM_REACT_SEARCH_PATH[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-maccatalyst"; + "RN_SPM_REACT_BINARY[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-maccatalyst/React.framework/React"; + "RN_SPM_REACT_FRAMEWORK[sdk=macosx*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-maccatalyst/React.framework"; + "RN_SPM_REACT_SEARCH_PATH[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-simulator"; + "RN_SPM_REACT_BINARY[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-simulator/React.framework/React"; + "RN_SPM_REACT_FRAMEWORK[sdk=iphonesimulator*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64_x86_64-simulator/React.framework"; + "RN_SPM_REACT_SEARCH_PATH[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64"; + "RN_SPM_REACT_BINARY[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64/React.framework/React"; + "RN_SPM_REACT_FRAMEWORK[sdk=iphoneos*]" = "$(SRCROOT)/build/xcframeworks/$(RN_SPM_FLAVOR)/React.xcframework/ios-arm64/React.framework"; + RN_SPM_FLAVOR = release; + REACT_NATIVE_PATH = "../node_modules/react-native"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(RN_SPM_REACT_SEARCH_PATH)", + "$(RN_SPM_REACT_NATIVE_DEPENDENCIES_SEARCH_PATH)", + "$(RN_SPM_HERMES_SEARCH_PATH)", + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/build/generated/autolinking/headers", + ); + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + INFOPLIST_FILE = SpmExample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + "$(RN_SPM_REACT_BINARY)", + "$(RN_SPM_REACT_NATIVE_DEPENDENCIES_BINARY)", + "$(RN_SPM_HERMES_BINARY)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = SpmExample; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + 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 = 15.1; + 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 = 15.1; + 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 */ + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "SpmExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "SpmExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ +/* Begin XCLocalSwiftPackageReference section */ + 27BDE9D743CB351F53154525 /* XCLocalSwiftPackageReference "build/xcframeworks" */ = {isa = XCLocalSwiftPackageReference; relativePath = build/xcframeworks;}; + C2FECF1430FDAAE3BF355839 /* XCLocalSwiftPackageReference "build/generated/autolinking" */ = {isa = XCLocalSwiftPackageReference; relativePath = build/generated/autolinking;}; + A700952B9A737913514EB28F /* XCLocalSwiftPackageReference "build/generated/ios" */ = {isa = XCLocalSwiftPackageReference; relativePath = build/generated/ios;}; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 512EBECF5434FD7A6AF7C967 /* ReactHeaders */ = {isa = XCSwiftPackageProductDependency; package = 27BDE9D743CB351F53154525 /* XCLocalSwiftPackageReference "build/xcframeworks" */; productName = ReactHeaders;}; + 920F69A9DF98D37C8308D020 /* ReactNativeHeaders */ = {isa = XCSwiftPackageProductDependency; package = 27BDE9D743CB351F53154525 /* XCLocalSwiftPackageReference "build/xcframeworks" */; productName = ReactNativeHeaders;}; + 8332BE36B9C49BD2E49347C1 /* ReactNativeDependenciesHeaders */ = {isa = XCSwiftPackageProductDependency; package = 27BDE9D743CB351F53154525 /* XCLocalSwiftPackageReference "build/xcframeworks" */; productName = ReactNativeDependenciesHeaders;}; + 3AFDEFB917B01458307FDE0A /* Autolinked */ = {isa = XCSwiftPackageProductDependency; package = C2FECF1430FDAAE3BF355839 /* XCLocalSwiftPackageReference "build/generated/autolinking" */; productName = Autolinked;}; + 947DD5EF3BE079FB7F5AFF87 /* ReactCodegen */ = {isa = XCSwiftPackageProductDependency; package = A700952B9A737913514EB28F /* XCLocalSwiftPackageReference "build/generated/ios" */; productName = ReactCodegen;}; + F3857EDDA38AFC0011322D6D /* ReactAppDependencyProvider */ = {isa = XCSwiftPackageProductDependency; package = A700952B9A737913514EB28F /* XCLocalSwiftPackageReference "build/generated/ios" */; productName = ReactAppDependencyProvider;}; +/* End XCSwiftPackageProductDependency section */ + + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/spm-example/ios/SpmExample.xcodeproj/xcshareddata/xcschemes/SpmExample.xcscheme b/spm-example/ios/SpmExample.xcodeproj/xcshareddata/xcschemes/SpmExample.xcscheme new file mode 100644 index 0000000000..02052e4b00 --- /dev/null +++ b/spm-example/ios/SpmExample.xcodeproj/xcshareddata/xcschemes/SpmExample.xcscheme @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spm-example/ios/SpmExample/AppDelegate.swift b/spm-example/ios/SpmExample/AppDelegate.swift new file mode 100644 index 0000000000..eefddcb3b0 --- /dev/null +++ b/spm-example/ios/SpmExample/AppDelegate.swift @@ -0,0 +1,48 @@ +import UIKit +import React +import React_RCTAppDelegate +import ReactAppDependencyProvider + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? + + var reactNativeDelegate: ReactNativeDelegate? + var reactNativeFactory: RCTReactNativeFactory? + + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil + ) -> Bool { + let delegate = ReactNativeDelegate() + let factory = RCTReactNativeFactory(delegate: delegate) + delegate.dependencyProvider = RCTAppDependencyProvider() + + reactNativeDelegate = delegate + reactNativeFactory = factory + + window = UIWindow(frame: UIScreen.main.bounds) + + factory.startReactNative( + withModuleName: "SpmExample", + in: window, + launchOptions: launchOptions + ) + + return true + } +} + +class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate { + 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/spm-example/ios/SpmExample/Images.xcassets/AppIcon.appiconset/Contents.json b/spm-example/ios/SpmExample/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..81213230de --- /dev/null +++ b/spm-example/ios/SpmExample/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/spm-example/ios/SpmExample/Images.xcassets/Contents.json b/spm-example/ios/SpmExample/Images.xcassets/Contents.json new file mode 100644 index 0000000000..2d92bd53fd --- /dev/null +++ b/spm-example/ios/SpmExample/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/spm-example/ios/SpmExample/Info.plist b/spm-example/ios/SpmExample/Info.plist new file mode 100644 index 0000000000..9065468f9d --- /dev/null +++ b/spm-example/ios/SpmExample/Info.plist @@ -0,0 +1,59 @@ + + + + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + SpmExample + 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 + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/spm-example/ios/SpmExample/LaunchScreen.storyboard b/spm-example/ios/SpmExample/LaunchScreen.storyboard new file mode 100644 index 0000000000..8af2d8a45a --- /dev/null +++ b/spm-example/ios/SpmExample/LaunchScreen.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spm-example/ios/SpmExample/PrivacyInfo.xcprivacy b/spm-example/ios/SpmExample/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..41b8317f06 --- /dev/null +++ b/spm-example/ios/SpmExample/PrivacyInfo.xcprivacy @@ -0,0 +1,37 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/spm-example/metro.config.js b/spm-example/metro.config.js new file mode 100644 index 0000000000..dae22e9c4d --- /dev/null +++ b/spm-example/metro.config.js @@ -0,0 +1,26 @@ +const path = require('path'); +const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); + +// @shopify/react-native-skia is symlinked to ../packages/skia, so Metro must +// watch the monorepo root. React and React Native have to be forced to this +// app's copies: the workspace root carries different versions, and two React +// instances make hooks resolve against a null module inside Skia's components. +const monorepoRoot = path.resolve(__dirname, '..'); +const appModules = path.resolve(__dirname, 'node_modules'); +const singletons = ['react', 'react-native']; + +module.exports = mergeConfig(getDefaultConfig(__dirname), { + watchFolders: [monorepoRoot], + resolver: { + nodeModulesPaths: [appModules, path.resolve(monorepoRoot, 'node_modules')], + resolveRequest: (context, moduleName, platform) => { + const name = singletons.find( + s => moduleName === s || moduleName.startsWith(`${s}/`), + ); + const target = name + ? path.join(appModules, name, moduleName.slice(name.length)) + : moduleName; + return context.resolveRequest(context, target, platform); + }, + }, +}); diff --git a/spm-example/package.json b/spm-example/package.json new file mode 100644 index 0000000000..442b222407 --- /dev/null +++ b/spm-example/package.json @@ -0,0 +1,34 @@ +{ + "name": "SpmExample", + "version": "0.0.1", + "private": true, + "scripts": { + "ios": "react-native run-ios", + "lint": "eslint .", + "start": "react-native start" + }, + "dependencies": { + "@shopify/react-native-skia": "file:../packages/skia", + "react": "19.2.3", + "react-native": "0.87.1" + }, + "devDependencies": { + "@babel/core": "^7.25.2", + "@babel/preset-env": "^7.25.3", + "@babel/runtime": "^7.25.0", + "@react-native-community/cli": "20.2.0", + "@react-native-community/cli-platform-android": "20.2.0", + "@react-native-community/cli-platform-ios": "20.2.0", + "@react-native/babel-preset": "0.87.1", + "@react-native/eslint-config": "0.87.1", + "@react-native/metro-config": "0.87.1", + "@react-native/typescript-config": "0.87.1", + "@types/react": "^19.2.0", + "eslint": "^8.19.0", + "prettier": "2.8.8", + "typescript": "^6.0.3" + }, + "engines": { + "node": ">= 22.11.0" + } +} diff --git a/spm-example/tsconfig.json b/spm-example/tsconfig.json new file mode 100644 index 0000000000..c41b7e2014 --- /dev/null +++ b/spm-example/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "@react-native/typescript-config", + "include": ["**/*.ts", "**/*.tsx"], + "exclude": ["**/node_modules", "**/Pods"] +}