flutter_pear 0.2.0-dev.1
flutter_pear: ^0.2.0-dev.1 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.2.0-dev.1 #
Prerelease of the 0.2.0 entry below, published first so the upgrade fixtures can validate against real hosted pub.dev archives before the stable release.
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.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.