flutter_pear 0.4.1 copy "flutter_pear: ^0.4.1" to clipboard
flutter_pear: ^0.4.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.4.1 #

Documentation only — no code, API, or dependency change.

Both READMEs still advertised v0.3.1 and, worse, promised "no manual NDK, ABI, or Podfile edits on any platform" and "zero flutter_pear-specific build-wiring steps". 0.4.0 made that false: it raised Android's floor to minSdk 29, which every consuming app must set itself. An app that upgraded and left minSdk at Flutter's template default of 24 hit an opaque Gradle manifest-merge failure with nothing in the docs pointing at the cause.

Install now states the minSdk = 29 requirement with a copy-pasteable build.gradle.kts block, the upgrade note warns about it explicitly, and the version references and pin advice are corrected to 0.4.x.

0.4.0 #

Android's minimum API level is now 29 (Android 10) — this is a breaking change for consuming apps, and it corrects a floor that was previously wrong. flutter_pear_bare declared minSdk = 24, but the Bare Kit 2.3.0 prebuild it shipped could not load below API 31: libbare-kit.so linked libnativehelper.so and imported JNI_GetCreatedJavaVMs under the symbol version @LIBNATIVEHELPER_S, a non-weak reference whose version tag does not exist before Android 12. An app on minSdk 24–30 therefore built, installed and launched normally, then threw UnsatisfiedLinkError on the first Pear.start(). If your app targets minSdk 29 or higher, this release is the first one that actually works there; if it targets below 29, it was already broken and must now raise its floor.

Bare Kit is bumped 2.3.0 → 2.5.5, which is what makes API 29 reachable: upstream's holepunchto/bare-kit#115 ("Resolve the JVM at runtime instead of linking libnativehelper", released in 2.5.0) removed the hard libnativehelper link, and the 2.5.5 libbare-kit.so is built against API 29 (.note.android.ident = 0x1d) with no non-weak symbol that fails to resolve at that level. The bump also brings the Bare runtime to 1.33.4 and several IPC lifetime and queue-locking fixes.

No Dart API changed in this release. The pinned pear-end JS module versions are unchanged (that bump is tracked separately).

0.3.1 #

bare is now fetched automatically on all three desktop platforms — macOS, Linux, and Windows each fetch their own bare runtime on first launch (the real, published bare-runtime-<host> npm packages, checksum- verified before use and cached locally), so npm i -g bare is a manual fallback only, never a hard prerequisite. Previously this only worked reliably on macOS; Linux and Windows needed bare on PATH first. A missing/unfetchable bare now throws a typed, catchable PearException(BARE_RUNTIME_MISSING) on macOS and Linux instead of crashing; Windows currently surfaces the same scenario as a generic WORKLET_CRASHED instead of that specific code (its pre-flight check isn't as precise yet — a smaller known gap, not a regression). See ERRORS.md#BARE_RUNTIME_MISSING.

dart run flutter_pear:doctor --fix, new in 0.3.1. Applies the macOS section's three run-blocking/LAN-breaking fixes automatically instead of hand-editing XML/project settings: the App Sandbox entitlement in both macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements, Info.plist's NSLocalNetworkUsageDescription, and a below-minimum MACOSX_DEPLOYMENT_TARGET in project.pbxproj. Idempotent — a file needing no change is silently left alone. bare on PATH is a separate precondition this does not and cannot fix (installing a runtime isn't a file edit).

dart run flutter_pear:doctor fixes: --help/-h now prints usage and exits immediately instead of silently running the full diagnostic suite; a project with a real platform/packaging [FAIL] no longer prints a contradictory "All checks passed." as its last line (that verdict previously only reflected the runtime connectivity checks, blind to an earlier Dart-side failure in the same output).

Docs: the Desktop quick-start now shows dart run flutter_pear:doctor --fix as an explicit step between flutter create and flutter run, not just in trailing prose — following it top-to-bottom now avoids the raw SwiftPM requires minimum platform version 10.15.4 error entirely.

No breaking changes. Requires flutter_pear_bare: ^0.3.1.

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):

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:

  1. flutter create --platforms=ios . — plain Flutter, nothing flutter_pear-specific.
  2. flutter pub add flutter_pear:^0.2.0 — explicit, not a bare flutter pub upgrade: that command cannot cross the already-published ^0.0.1 caret. If you previously pinned flutter_pear_bare directly (a transitive dependency of flutter_pear), bump it the same way; if pub add reports a stale lock conflict, delete pubspec.lock and re-resolve.
  3. Paste this into ios/Runner/Info.plist (see doc/ios.md for 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>
    
  4. flutter run on an iOS Simulator.
  5. 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-exports BareWorklet from flutter_pear_bare.
0
likes
0
points
527
downloads

Publisher

unverified uploader

Weekly Downloads

Dart-idiomatic Flutter API for the Pear P2P stack (Hyperswarm, Hypercore, Hyperbee, Hyperdrive, Autobase, blind pairing) over a bundled Bare worklet.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

archive, crypto, flutter, flutter_pear_bare

More

Packages that depend on flutter_pear