feat: add Swift Package Manager support for iOS and macOS - #2
Merged
Merged
Conversation
iOS and macOS now ship a Package.swift alongside the CocoaPods podspec, so the plugin keeps working in projects that have migrated to SwiftPM. Native sources moved to Sources/zero_network_kit/ under each platform directory, and both podspecs point at the new paths. Also fixes the pub.dev description to list all six platforms, and replaces the leftover macOS podspec template metadata plus the iOS author with the real project values, enabling the privacy manifest resource bundle on both platforms. Bump version to 1.0.2 and update README, CHANGELOG and AGENTS accordingly.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary / 摘要
Adds Swift Package Manager support for iOS and macOS and releases the package as
1.0.2. + 为 iOS 与 macOS 增加 Swift Package Manager 支持,并发布1.0.2。Changes / 变更
Package.swiftfor iOS and macOS so the plugin resolves in SwiftPM-based projects; native sources moved toios|macos/zero_network_kit/Sources/zero_network_kit/and both podspecs were repointed at the newsource_files/resource_bundles. / 新增 iOS 与 macOS 的Package.swift,使插件可在 SwiftPM 工程中解析;原生源码移至ios|macos/zero_network_kit/Sources/zero_network_kit/,两个 podspec 的source_files与resource_bundles同步指向新路径。pub.devdescription — it still advertised five platforms after Web support shipped; it now lists all six. / 修复pub.dev描述——Web 支持上线后仍只宣传五个平台,现列出全部六个。example.comhomepage,Your Companyauthor) and the iOS author, and enabled the privacy manifest resource bundle on both platforms. / 修复 macOS podspec 残留的模板值(占位 summary、example.com主页、Your Company作者)与 iOS 作者信息,并在两个平台启用隐私清单资源包。1.0.2acrosspubspec.yaml, both podspecs,README.md,README_zh.md,CHANGELOG.mdand the example lockfile;docs/was rebuilt by the pre-commit sync hook. / 在pubspec.yaml、两个 podspec、README.md、README_zh.md、CHANGELOG.md与 example lockfile 中统一升级到1.0.2;docs/由 pre-commit 同步钩子重建。AGENTS.mdand corrected the stale native source paths. / 在AGENTS.md中记录「CocoaPods + SwiftPM 双发布」布局,并修正已失效的原生源码路径。Context / 背景
Projects that have migrated away from CocoaPods could not resolve the plugin at all, since only a podspec shipped. Adding a Swift Package manifest next to the existing podspec keeps both integration paths working without touching the public Dart API, so this is a patch release rather than a minor one. The doc/metadata fixes are bundled because both podspecs had to be edited anyway. / 已从 CocoaPods 迁移走的工程此前完全无法解析本插件(只提供了 podspec)。在保留 podspec 的同时新增 Swift Package 清单,两条集成路径都能工作,且未改动公开 Dart API,因此按补丁版本发布而非次版本。文档与元信息修复随本次一并提交,因为两个 podspec 本就需要改动。
Checklist / 检查项
Test plan
flutter pub get,flutter analyze(no issues),dart format --set-exit-if-changed .(0 changed),flutter test(49/49 passed). / 本地四项校验全绿。getPlatformVersion/getNetworkDetailsrespond over the method channel. / 在纯 SwiftPM 的 iOS/macOS 工程中解析插件,确认方法通道可正常返回。Analyze & Test,Pana Score Check,Check PR Title (Conventional Commits). / 确认三项必需检查全部通过。🤖 Generated with Zero Buddy