Skip to content
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

Integrate uniffi-swift-helper #451

Draft
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ steps:

echo "--- :swift: Building xcframework"
make xcframework
zip -r target/libwordpressFFI.xcframework.zip target/libwordpressFFI.xcframework
zip -r target/libwordpressFFI.xcframework.zip target/libwordpressFFI/libwordpressFFI.xcframework
artifact_paths:
- target/libwordpressFFI.xcframework.zip
- native/swift/Sources/wordpress-api-wrapper/wp_api.swift
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/swift-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set -euo pipefail

export SKIP_PACKAGE_WP_API=true

echo "--- :swift: Generating Package.swift"
make generate-swift-package-manifest

function run_tests() {
local platform; platform=$1
echo "--- :swift: Testing on $platform simulator"
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/validate-cocoapods.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ Pod::Spec.new do |spec|
spec.ios.deployment_target = '13.0'
spec.osx.deployment_target = '11.0'

# zip -r swift-source-archive.zip native/swift target/libwordpressFFI.xcframework
# zip -r swift-source-archive.zip native/swift target/libwordpressFFI/libwordpressFFI.xcframework
spec.source = { :http => "http://s3.com/WordPressAPI.zip" }

spec.swift_version = '5.10'
spec.source_files = 'native/swift/Sources/**/*.{swift}'
spec.vendored_frameworks = 'target/libwordpressFFI.xcframework'
spec.vendored_frameworks = 'target/libwordpressFFI/libwordpressFFI.xcframework'

spec.pod_target_xcconfig = {
'SWIFT_PACKAGE_NAME' => 'WordPressAPI'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ xcuserdata
DerivedData
fastlane/report.xml
libwordPressFFI.xcframework*
/Package.swift
/Package.resolved

# Auto-generated Swift Files
native/swift/Sources/wordpress-api-wrapper/*.swift
Expand Down
172 changes: 145 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
"wp_derive_request_builder",
"wp_serde_helper",
"wp_uniffi_bindgen",
"xcframework",
"swift_helper_cli",
]
resolver = "2"

Expand Down Expand Up @@ -43,5 +43,9 @@ tokio = "1.42"
toml = "0.8"
trybuild = "1.0"
uniffi = "0.28"
uniffi-swift-helper = "0.1.0"
url = "2.5"
uuid = "1.11"

[patch.crates-io]
uniffi-swift-helper = { git = "https://github.com/automattic/uniffi-swift-helper.git", branch = "real-stuff" }
Loading
Loading