flutter_pear 0.3.0
flutter_pear: ^0.3.0 copied to clipboard
Dart-idiomatic Flutter API for the Pear P2P stack (Hyperswarm, Hypercore, Hyperbee, Hyperdrive, Autobase, blind pairing) over a bundled Bare worklet.
0.3.0 #
macOS, Linux, and Windows desktop support, new in 0.3.0. flutter_pear
apps now run on desktop, not just Android/iOS — same Pear.start()/join()
API, no platform branching required. There is no BareKit build for desktop,
so each desktop host spawns the real bare CLI runtime as a subprocess and
relays raw binary IPC over its stdin/stdout instead of linking a worklet
in-process; this is transparent to app code.
Real, on-hardware validation, not just a compiling build: all three desktop
hosts booted the real committed per-OS pear-end.bundle, completed the
attach.info RPC handshake ("worklet attached"), and — through
flutter_pear_example's own real Dart PearSwarm.join() call — reached
PearSwarmState.connected against a real peer. See each platform's own
notes for exactly what's covered and what's still a documented gap (a
repeatable, gated smoke test on Windows/Linux; a fully round-tripped chat
message, not just connected, on Windows/Linux — both already confirmed on
macOS):
- macOS platform notes
- Linux platform notes
- Windows platform notes
- Desktop dev setup — the overview page linking all three, plus building an Android/iOS app from a Windows/Linux host machine.
dart run flutter_pear:doctor gained a desktop build-readiness section per
OS (toolchain presence, packaging path, the committed desktop bundle) —
not just the existing host-capability line.
No Android/iOS behavior changes. Requires flutter_pear_bare: ^0.3.0.
0.2.1 #
Version bump only, in lockstep with flutter_pear_bare/flutter_pear_test's
0.2.1 (a docs-only README fix in those two packages — this package's own
README needed no change). No code changes.
0.2.0 #
No Android behavior changes. Backed by the pack Android regression test
(pack_android_regression_test.dart, asserts Android's pack outputs cannot
drift after the iOS extension) and the locked-0.0.1 Android upgrade
fixture. Accept-and-disclose (flutter/flutter#130210):
the pub.dev download grows by flutter_pear_bare's committed iOS addon
.xcframeworks (~21 MB, measured via git ls-files + du) even for
Android-only apps, though none of it enters an Android build.
iOS support, new in 0.2.0 — SIMULATOR-VALIDATED. Enable it on an existing app in 5 steps:
flutter create --platforms=ios .— plain Flutter, nothingflutter_pear-specific.flutter pub add flutter_pear:^0.2.0— explicit, not a bareflutter pub upgrade: that command cannot cross the already-published^0.0.1caret. If you previously pinnedflutter_pear_baredirectly (a transitive dependency offlutter_pear), bump it the same way; ifpub addreports a stale lock conflict, deletepubspec.lockand re-resolve.- Paste this into
ios/Runner/Info.plist(seedoc/ios.mdfor the full symptom table if you skip this step):<key>NSLocalNetworkUsageDescription</key> <string>flutter_pear demos connect directly to your other devices over the local network to exchange chat messages and files.</string> flutter runon an iOS Simulator.- Exchange your first message with an Android peer.
iOS behavior differences from Android — see
doc/ios.md
for the full detail:
- Background execution is foreground-only (
Pear.platformInfo.backgroundExecution == PearBackgroundExecution.foregroundOnly) — a native suspend fix transitions backgrounding cleanly, but nothing keeps the worklet connected while backgrounded. - Validation tier is simulator (
Pear.platformInfo.validationTier == PearValidationTier.simulator) — physical-iPhone validation is a documented follow-up, not a release gate. - Storage roots: worklet storage lives under Application Support
(never Documents, deliberately non-configurable — an iCloud restore of
writer keys onto a second device forks cores); received files (if your
app uses
PearDrive) are a separate Documents subtree your own app code chooses to use, same as the example app's file-drop demo.
Minimums: iOS deployment target 13.0; Xcode ≥ 15.0 (Package.swift's
swift-tools-version: 5.9 requirement — the first Xcode release supporting
that Swift tools version). Expected first-build BareKit download: ~107 MB
via SwiftPM (the repacked, iOS-only BareKit.xcframework) or the same
artifact via the CocoaPods compat path — see the root README's First-build
download UX section for cache locations and force-refetch commands.
Rollback: consumers can pin back to flutter_pear: 0.0.1 in either
direction. Maintainer-side: dart pub retract the broken version, triggered
by a broken consumer build reported within the retract window.
0.2.0-dev.1 #
Prerelease of 0.2.0 above, published first so the upgrade fixtures could validate against real hosted pub.dev archives before the stable release.
0.0.1 #
- Scaffold:
Pear,PearSwarm/PearConnection,PearCrypto/PearKey, exception hierarchy, and the JSON RPC bridge over the worklet's binary IPC. Re-exportsBareWorkletfromflutter_pear_bare.