Skip to content
Merged
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 AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This file defines the architecture, coding conventions, and required workflows f
- DNS uses the system resolver and/or raw UDP queries against explicit servers, encoded/decoded by the pure-Dart `DnsPacket` wire-format codec.
- Speed test streams download/upload traffic against configurable endpoints with `SpeedTestProgress` callbacks.
- Quality scoring is a pure function (`NetworkQualityEvaluator`) over the available metrics; `QualityService` gathers them.
- Native: Android `android/src/main/kotlin/com/zerolabsco/zero_network_kit/ZeroNetworkKitPlugin.kt` (package `com.zerolabsco.zero_network_kit`); iOS `ios/Classes/ZeroNetworkKitPlugin.swift`. The native side only supplements what the system requires; keep changes minimal and matching the method channel contract.
- Native: Android `android/src/main/kotlin/com/zerolabsco/zero_network_kit/ZeroNetworkKitPlugin.kt` (package `com.zerolabsco.zero_network_kit`); iOS `ios/zero_network_kit/Sources/zero_network_kit/ZeroNetworkKitPlugin.swift`; macOS `macos/zero_network_kit/Sources/zero_network_kit/ZeroNetworkKitPlugin.swift`. iOS and macOS are dual-distributed: a CocoaPods podspec (`ios|macos/zero_network_kit.podspec`, sources under `zero_network_kit/Sources/…`) **and** a Swift Package (`ios|macos/zero_network_kit/Package.swift`). Do not move or rename `Sources/zero_network_kit/` without updating both, plus each podspec's `source_files` / `resource_bundles`. The native side only supplements what the system requires; keep changes minimal and matching the method channel contract.

## Dependencies and SDK constraints
- Dart SDK: `>=3.11.0 <4.0.0`; Flutter: `>=3.3.0` (from `pubspec.yaml`). CI pins Flutter `3.41.7` so `dart format` output is identical everywhere.
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 1.0.2

### Added / 新增

- **Swift Package Manager support** — iOS and macOS now ship a `Package.swift`
next to the CocoaPods podspec, so the plugin keeps working in projects that
have migrated to SwiftPM. Native sources moved to
`<platform>/zero_network_kit/Sources/zero_network_kit/`.
- **支持 Swift Package Manager**——iOS 与 macOS 在 CocoaPods podspec 之外新增
`Package.swift`,使插件在已迁移 SwiftPM 的工程中同样可用。原生源码移至
`<platform>/zero_network_kit/Sources/zero_network_kit/`。

### Fixed / 修复

- **Package description** — the pub.dev description still advertised only five
platforms after Web support shipped; it now lists all six.
- **包描述**——Web 支持上线后,pub.dev 上的描述仍只宣传五个平台,现已列出全部六个。
- **podspec metadata** — replaced the leftover macOS template values (placeholder
summary, `example.com` homepage, `Your Company` author) and the iOS author with
the real project metadata, and enabled the privacy manifest resource bundle on
both platforms.
- **podspec 元信息**——把 macOS 残留的模板值(占位 summary、`example.com` 主页、
`Your Company` 作者)与 iOS 的作者替换为真实项目信息,并在两个平台启用隐私清单资源包。

## 1.0.1

### Added / 新增
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ micro-benchmarks — for Android, iOS, macOS, Windows, Linux and Web (partial).
[![Dart](https://img.shields.io/badge/Dart-✓-0175C2?logo=dart)](https://dart.dev)
[![Style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://pub.dev/packages/effective_dart)

> **🔔 Upgrade recommended:** `1.0.1` adds partial Web support — the plugin now compiles and runs in the browser, and the capabilities the sandbox forbids degrade gracefully instead of failing. It also fixes the speed test on the web. Upgrade to `^1.0.1`.
> **🔔 Upgrade recommended:** `1.0.2` adds Swift Package Manager support for iOS and macOS, so the plugin also works in projects that have migrated away from CocoaPods. Upgrade to `^1.0.2`.

🌐 **[Official Website](https://www.zerolabsco.com/)** &nbsp;·&nbsp; 📦 **[View on pub.dev](https://pub.dev/packages/zero_network_kit)** &nbsp;·&nbsp; 🔗 **[View on GitHub](https://github.com/zero-labsco/zero_network_kit)**

Expand Down Expand Up @@ -74,7 +74,7 @@ Design goals:

```yaml
dependencies:
zero_network_kit: ^1.0.1
zero_network_kit: ^1.0.2
```

### Android permissions
Expand Down
4 changes: 2 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[![Dart](https://img.shields.io/badge/Dart-✓-0175C2?logo=dart)](https://dart.dev)
[![Style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://pub.dev/packages/effective_dart)

> **🔔 推荐升级:** `1.0.1` 新增 Web 平台部分支持——插件现已可在浏览器中编译运行,浏览器沙箱禁止的能力会优雅降级而不会报错;同时修复了 Web 端测速失败的问题。建议升级到 `^1.0.1`。
> **🔔 推荐升级:** `1.0.2` 为 iOS 与 macOS 新增 Swift Package Manager 支持,插件因此同样适用于已从 CocoaPods 迁移走的工程。建议升级到 `^1.0.2`。

🌐 **[官方网站](https://www.zerolabsco.com/)** &nbsp;·&nbsp; 📦 **[在 pub.dev 查看](https://pub.dev/packages/zero_network_kit)** &nbsp;·&nbsp; 🔗 **[查看 GitHub 仓库](https://github.com/zero-labsco/zero_network_kit)**

Expand Down Expand Up @@ -72,7 +72,7 @@

```yaml
dependencies:
zero_network_kit: ^1.0.1
zero_network_kit: ^1.0.2
```

### Android 权限
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_network_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_network_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_network_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_network_kit/_next/static/chunks/webpack-ecae8a7b821d04b9.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/main-f01190a0229cfea1.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/pages/_app-8d9090723aec7545.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_network_kit/_next/static/x-nTvOiGfo930-2DM2DH8/_buildManifest.js" defer=""></script><script src="/zero_network_kit/_next/static/x-nTvOiGfo930-2DM2DH8/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"x-nTvOiGfo930-2DM2DH8","assetPrefix":"/zero_network_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_network_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_network_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_network_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_network_kit/_next/static/chunks/webpack-ecae8a7b821d04b9.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/main-f01190a0229cfea1.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/pages/_app-8d9090723aec7545.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_network_kit/_next/static/j1hO4dyly2im2OvPwfgSC/_buildManifest.js" defer=""></script><script src="/zero_network_kit/_next/static/j1hO4dyly2im2OvPwfgSC/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"j1hO4dyly2im2OvPwfgSC","assetPrefix":"/zero_network_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
2 changes: 1 addition & 1 deletion docs/404/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_network_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_network_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_network_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_network_kit/_next/static/chunks/webpack-ecae8a7b821d04b9.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/main-f01190a0229cfea1.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/pages/_app-8d9090723aec7545.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_network_kit/_next/static/x-nTvOiGfo930-2DM2DH8/_buildManifest.js" defer=""></script><script src="/zero_network_kit/_next/static/x-nTvOiGfo930-2DM2DH8/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"x-nTvOiGfo930-2DM2DH8","assetPrefix":"/zero_network_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_network_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_network_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_network_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_network_kit/_next/static/chunks/webpack-ecae8a7b821d04b9.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/main-f01190a0229cfea1.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/pages/_app-8d9090723aec7545.js" defer=""></script><script src="/zero_network_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_network_kit/_next/static/j1hO4dyly2im2OvPwfgSC/_buildManifest.js" defer=""></script><script src="/zero_network_kit/_next/static/j1hO4dyly2im2OvPwfgSC/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"j1hO4dyly2im2OvPwfgSC","assetPrefix":"/zero_network_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
4 changes: 2 additions & 2 deletions docs/API-Reference/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Benchmark/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Connectivity/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/DNS/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/FAQ/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Full-Report/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Getting-Started/index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/Installation/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Ping/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Platform-Support/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Ports/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Quality/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Speed-Test/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Usage/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_next/static/chunks/nextra-data-en-US.json

Large diffs are not rendered by default.

Loading
Loading