-
Notifications
You must be signed in to change notification settings - Fork 66
feat: SPM compatibility #779
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
10 commits
Select commit
Hold shift + click to select a range
b83d99f
feat: spm compatibility
hejsztynx 562f7cf
feat: testing example app
hejsztynx 3600ad2
fix: package.swift tweaks
hejsztynx 836ca64
refactor: generalized the source list in package.swift
hejsztynx 288ec66
docs: docs update
hejsztynx 08e96f5
refactor: cleanup Package.swift
hejsztynx 145c668
feat: drop react-native-spm-prefix.h
hejsztynx 3a30c5a
docs: revert the spm suppport mention
hejsztynx 9cfad53
fix: code left from local testing
hejsztynx c036cd5
chore: revert image-picker strip
hejsztynx 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 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,63 @@ | ||
| // swift-tools-version: 6.0 | ||
|
|
||
| import PackageDescription | ||
|
|
||
| let headerSearchPaths: [String] = [ | ||
| "cpp/GumboParser", | ||
| "cpp/parser", | ||
| "ios", | ||
| "ios/config", | ||
| "ios/enrichedInputTextView", | ||
| "ios/enrichedTextTextView", | ||
| "ios/extensions", | ||
| "ios/generated/ReactCodegen/ReactNativeEnrichedSpec", | ||
| "ios/htmlParser", | ||
| "ios/inputAttributesManager", | ||
| "ios/inputHtmlParser", | ||
| "ios/interfaces", | ||
| "ios/internals", | ||
| "ios/textHtmlParser", | ||
| "ios/utils", | ||
| ".", | ||
| ] | ||
|
|
||
| let cSettings: [CSetting] = headerSearchPaths.map { .headerSearchPath($0) } | ||
| let cxxSettings: [CXXSetting] = headerSearchPaths.map { .headerSearchPath($0) } + [ | ||
| .define("DEBUG", .when(configuration: .debug)), | ||
| .define("NDEBUG", .when(configuration: .release)), | ||
| ] | ||
|
|
||
| let package = Package( | ||
| name: "ReactNativeEnrichedHtml", | ||
| platforms: [.iOS(.v15)], | ||
| products: [ | ||
| .library(name: "ReactNativeEnrichedHtml", targets: ["ReactNativeEnrichedHtml"]), | ||
| ], | ||
| dependencies: [ | ||
| .package(name: "ReactNative", path: "../../../../xcframeworks"), | ||
| .package(name: "React-GeneratedCode", path: "../../../ios"), | ||
| ], | ||
| targets: [ | ||
| .target( | ||
| name: "ReactNativeEnrichedHtml", | ||
| dependencies: [.product(name: "ReactHeaders", package: "ReactNative"), .product(name: "ReactNativeHeaders", package: "ReactNative"), .product(name: "ReactNativeDependenciesHeaders", package: "ReactNative"), .product(name: "ReactAppHeaders", package: "React-GeneratedCode")], | ||
| path: ".", | ||
| exclude: [ | ||
| "node_modules", | ||
| "android", | ||
| "lib", | ||
| "src", | ||
| ], | ||
| sources: [ | ||
|
szydlovsky marked this conversation as resolved.
|
||
| "cpp/GumboParser", | ||
| "cpp/parser", | ||
| "ios" | ||
| ], | ||
| publicHeadersPath: "ios", | ||
| cSettings: cSettings, | ||
| cxxSettings: cxxSettings, | ||
| linkerSettings: [.linkedFramework("UIKit"), .linkedFramework("Foundation"), .linkedFramework("CoreGraphics")] | ||
| ), | ||
| ], | ||
| cxxLanguageStandard: .cxx20 | ||
| ) | ||
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
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
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
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
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 |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| #import <Foundation/Foundation.h> | ||
|
|
||
| @interface WeakBox : NSObject | ||
| @property(nonatomic, weak) id value; | ||
| @end |
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 |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ | |
| "android", | ||
| "ios", | ||
| "cpp", | ||
| "Package.swift", | ||
| "*.podspec", | ||
| "react-native.config.js", | ||
| "!ios/build", | ||
|
|
||
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.