Skip to content

Commit

Permalink
mergingCocoaPods support
Browse files Browse the repository at this point in the history
thx @a594508257
  • Loading branch information
winddpan committed Jun 5, 2024
1 parent d169f5a commit 4db379f
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
xcuserdata/
*.xcuserdata
.DS_Store
.build/
44 changes: 44 additions & 0 deletions CodableWrapper.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Be sure to run `pod lib lint CodableWrapper.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
s.name = 'CodableWrapper'
s.version = '1.1.0'
s.summary = 'A short description of CodableWrapper.'

s.description = <<-DESC
CodableWrapper Pod
DESC

s.homepage = 'https://github.com/winddpan/CodableWrapper'
s.author = { 'winddpan' => 'https://github.com/winddpan' }
s.source = { :git => '[email protected]:winddpan/CodableWrapper.git', :tag => s.version.to_s }

s.ios.deployment_target = '13.0'

s.source_files = 'Sources/CodableWrapper/*{.swift}'
s.preserve_paths = ["Package.swift", "Sources/CodableWrapperMacros", "Tests", "Bin"]

s.pod_target_xcconfig = {
"OTHER_SWIFT_FLAGS" => "-Xfrontend -load-plugin-executable -Xfrontend $(PODS_BUILD_DIR)/CodableWrapper/release/CodableWrapperMacros#CodableWrapperMacros"
}

s.user_target_xcconfig = {
"OTHER_SWIFT_FLAGS" => "-Xfrontend -load-plugin-executable -Xfrontend $(PODS_BUILD_DIR)/CodableWrapper/release/CodableWrapperMacros#CodableWrapperMacros"
}

script = <<-SCRIPT
env -i PATH="$PATH" "$SHELL" -l -c "swift build -c release --package-path \\"$PODS_TARGET_SRCROOT\\" --build-path \\"${PODS_BUILD_DIR}/CodableWrapper\\""
SCRIPT

s.script_phase = {
:name => 'Build CodableWrapper macro plugin',
:script => script,
:execution_position => :before_compile
}
end
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| Xcode | Minimun Deployments | Version |
| --------- | ------------------- | -------------------------------------------------------------- |
| Xcode15 | >= iOS13 / macOS11 | 1.0 |
| Xcode15 | >= iOS13 / macOS11 | 1.0+ |
| < Xcode15 | < iOS13 / macOS11 | [0.3.3](https://github.com/winddpan/CodableWrapper/tree/0.3.3) |

# About
Expand All @@ -21,8 +21,8 @@ The project objective is to enhance the usage experience of the Codable protocol

## Installation

#### Cocoapods [Beta test](https://github.com/winddpan/CodableWrapper/tree/1.1.0)
``` pod 'CodableWrapper', :git => 'https://github.com/winddpan/CodableWrapper.git', :branch => '1.1.0' ```
#### Cocoapods
``` pod 'CodableWrapper' ```

#### Swift Package Manager
``` https://github.com/winddpan/CodableWrapper ```
Expand Down

0 comments on commit 4db379f

Please sign in to comment.