-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add Swift Package Manager support and upgrade to Expo SDK 56 #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d014ec8
chore(deps): upgrade expo-modules-core, expo-module-scripts, and dev …
benjaminkomen 4b5ddc0
chore(ios): bump deployment target to iOS 16.4 and Swift 5.9 for Expo 56
benjaminkomen ba31151
feat(ios): add spm.config.json for Expo precompile pipeline
benjaminkomen f60d574
feat(ios): add Package.swift for direct Swift Package Manager consump…
benjaminkomen a613a4b
chore: ignore Swift Package Manager build artifacts
benjaminkomen 5550e69
feat(ios): add PrivacyInfo.xcprivacy manifest for App Store compliance
benjaminkomen cf12c3c
chore(example): upgrade example app to Expo SDK 56 / RN 0.85.3 / Reac…
benjaminkomen c4ebaa5
chore(example): regenerate iOS project for Expo SDK 56
benjaminkomen 4a963d1
docs: document Swift Package Manager installation
benjaminkomen e190aa4
fix(ios): align SPM scaffolding with RFC 0994 and lower podspec floor…
benjaminkomen 9bc85cb
fix(ios): wire Package.swift expo-modules-core dependency via relativ…
benjaminkomen 81d1190
fix(ios)!: align iOS deployment target across all install paths
benjaminkomen 83fa6b0
revert(ios): keep podspec swift_version at 5.4
benjaminkomen 631e81a
chore: address PR review feedback
benjaminkomen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,3 +39,9 @@ yarn-error.log | |
|
|
||
| # Expo | ||
| .expo/* | ||
|
|
||
| # Swift Package Manager | ||
| # | ||
| .build/ | ||
| .swiftpm/ | ||
| Package.resolved | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| // swift-tools-version:5.9 | ||
| // | ||
| // This Package.swift is forward-compatibility scaffolding for the React Native | ||
| // SPM migration outlined in RFC 0994: | ||
| // https://github.com/react-native-community/discussions-and-proposals/pull/994 | ||
| // | ||
| // The RN CLI's SPM autolinking (and Expo's `et prebuild` pipeline that consumes | ||
| // `spm.config.json`) is the supported install path. The expo-modules-core | ||
| // dependency below points at the standard React Native / Expo `node_modules` | ||
| // layout (`../expo-modules-core` relative to this package). That matches the | ||
| // shape RFC 0994's autolinking generates and works whenever this package is | ||
| // resolved as a local SPM package alongside a node_modules tree. | ||
| // | ||
| // As a consequence, this manifest does NOT resolve standalone via Xcode's | ||
| // "Add Package Dependencies…" flow today — `../expo-modules-core` only | ||
| // exists when the package is checked out beside an installed `node_modules/`. | ||
| // That changes once Expo / RN ship a published `ExpoModulesCore` SPM product. | ||
| // | ||
| // Platform floor is iOS 14: that is when `NWBrowser` / local network | ||
| // permission first exist. Bumping it would be an unnecessary breaking change | ||
| // for downstream apps still on the CocoaPods path. | ||
|
|
||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "ReactNativeLocalNetworkPermission", | ||
| platforms: [ | ||
| .iOS(.v14) | ||
| ], | ||
| products: [ | ||
| .library( | ||
| name: "ReactNativeLocalNetworkPermission", | ||
| targets: ["ReactNativeLocalNetworkPermission"] | ||
| ) | ||
| ], | ||
| dependencies: [ | ||
| // ⚠️ This relative path assumes a non-hoisted `node_modules/` layout where | ||
| // this package lives one level deep (e.g. `node_modules/<pkg>/Package.swift`) | ||
| // and `expo-modules-core` is a sibling. Hoisted monorepo layouts (Yarn | ||
| // workspaces, pnpm) where `expo-modules-core` resolves elsewhere will fail | ||
| // to resolve this dependency. The supported install path is RN/Expo's SPM | ||
| // autolinking, not standalone `swift package` resolution. | ||
| .package(name: "expo-modules-core", path: "../expo-modules-core") | ||
| ], | ||
| targets: [ | ||
| .target( | ||
| name: "ReactNativeLocalNetworkPermission", | ||
| dependencies: [ | ||
| .product(name: "ExpoModulesCore", package: "expo-modules-core") | ||
| ], | ||
| path: "ios", | ||
| exclude: [ | ||
| "ReactNativeLocalNetworkPermission.podspec" | ||
| ], | ||
| sources: [ | ||
| "ReactNativeLocalNetworkPermissionModule.swift", | ||
| "LocalNetworkAuthorization.swift" | ||
| ], | ||
| resources: [ | ||
| .copy("PrivacyInfo.xcprivacy") | ||
| ], | ||
| linkerSettings: [ | ||
| .linkedFramework("Network") | ||
| ] | ||
| ) | ||
| ] | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // @generated by expo-module-scripts | ||
| const { defineConfig } = require('eslint/config'); | ||
| const baseConfig = require('expo-module-scripts/eslint.config.base'); | ||
|
|
||
| module.exports = defineConfig([ | ||
| baseConfig, | ||
| { | ||
| ignores: ['build/**', 'example/**'], | ||
| }, | ||
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.