iOS: degrade gracefully where the Android-only native services are missing

Share/pick/sync calls and streams no longer throw MissingPluginException at
startup; upload/download/sync-now show 'X isn't available on this platform
yet'. Offline/sync mirror dir no longer uses the Android-only external dir.
Info.plist: Face ID and photo library usage strings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Ayushya Amitabh
2026-10-06 19:06:19 -04:00
co-authored by Claude Sonnet 5.5
parent 813c613249
commit d008185f98
10 changed files with 204 additions and 27 deletions
+4 -2
View File
@@ -1,4 +1,5 @@
import 'package:flutter/services.dart';
import 'native_channel.dart';
/// A file shared to Noo from another app's "Share to..." sheet, before its
/// bytes have been touched - just the `content://` Uri and whatever cheap
@@ -40,7 +41,8 @@ class ShareIntentService {
/// Whatever was shared to launch the app cold (empty if it was launched
/// normally, not via a share).
static Future<List<SharedFileRef>> getInitialShare() async {
final result = await _methodChannel.invokeMethod<List<dynamic>>(
final result = await invokeIfAvailable<List<dynamic>>(
_methodChannel,
'getInitialShare',
);
return (result ?? [])
@@ -51,7 +53,7 @@ class ShareIntentService {
/// Emits whenever another share arrives while the app is already running.
static Stream<List<SharedFileRef>> get onNewShare {
return _newShareChannel.receiveBroadcastStream().map((event) {
return quietEvents(_newShareChannel, (event) {
return (event as List<dynamic>)
.cast<Map<dynamic, dynamic>>()
.map(SharedFileRef.fromMap)