-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Platform
iOS26
Plugin
share_plus
Version
11.0.0
Flutter SDK
3.32.4
Steps to reproduce
- Call the
SharePlus.instance.share
method with the await keyword. - On iOS 26 devices only, the share method does not return a value or throw an exception.
Code Sample
import 'package:flutter/material.dart';
import 'package:share_plus/share_plus.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
bool _isSharing = false;
Future<void> _share() async {
if (_isSharing) return;
setState(() => _isSharing = true);
try {
// ! On iOS 26, the share method doesn't return a result or throw exceptions
final result = await SharePlus.instance.share(
ShareParams(text: 'dummy share text'),
);
print('Share result: $result');
} catch (e) {
print('Error sharing file: $e');
} finally {
setState(() => _isSharing = false);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text('share_plus bug report.'),
_isSharing
? const CircularProgressIndicator()
: const Text('Press the button to share.'),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _share,
tooltip: 'Share',
child: const Icon(Icons.share_outlined),
),
);
}
}
Logs
[ +1 ms] Flutter run key commands.
[ ] r Hot reload. 🔥🔥🔥
[ ] R Hot restart.
[ ] h List all available interactive commands.
[ ] d Detach (terminate "flutter run" but leave application running).
[ ] c Clear the screen
[ ] q Quit (terminate the application on the device).
[ ] A Dart VM Service on iPhone 16 is available at: http://127.0.0.1:55420/y3JOO7nd-SU=/
[ +3 ms] executing: sw_vers -productName
[ +37 ms] Exit code 0 from: sw_vers -productName
[ ] macOS
[ ] executing: sw_vers -productVersion
[ +23 ms] Exit code 0 from: sw_vers -productVersion
[ ] 15.5
[ ] executing: sw_vers -buildVersion
[ +26 ms] Exit code 0 from: sw_vers -buildVersion
[ ] 24F74
[ ] executing: uname -m
[ +9 ms] Exit code 0 from: uname -m
[ ] arm64
[ +18 ms] The Flutter DevTools debugger and profiler on iPhone 16 is available at: http://127.0.0.1:9103?uri=http://127.0.0.1:55420/y3JOO7nd-SU=/
[ +22 ms] [ERROR:flutter/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm(129)] Could not register as server for FlutterDartVMServicePublisher, permission denied. Check your 'Local Network' permissions for this app in the Privacy section of the system
Settings.
[ +15 ms] [ERROR:flutter/shell/platform/darwin/ios/framework/Source/FlutterDartVMServicePublisher.mm(129)] Could not register as server for FlutterDartVMServicePublisher, permission denied. Check your 'Local Network' permissions for this app in the Privacy section of the system
Settings.
Flutter Doctor
[✓] Flutter (Channel stable, 3.32.4, on macOS 15.5 24F74 darwin-arm64, locale ja-JP) [1,885ms]
• Flutter version 3.32.4 on channel stable at /Users/user/.asdf/installs/flutter/3.32.4-stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 6fba2447e9 (6 weeks ago), 2025-06-12 19:03:56 -0700
• Engine revision 8cd19e509d
• Dart version 3.8.1
• DevTools version 2.45.1
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [3.6s]
• Android SDK at /Users/user/Library/Android/sdk
• Platform android-35, build-tools 35.0.1
• ANDROID_HOME = /Users/user/Library/Android/sdk
• Java binary at: /Users/user/Library/Java/JavaVirtualMachines/jbr-17.0.14/Contents/Home/bin/java
This JDK is specified in your Flutter configuration.
To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment JBR-17.0.14+1-1367.22-nomod (build 17.0.14+1-b1367.22)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [5.5s]
• Xcode at /Applications/Xcode16.3.app/Contents/Developer
• Build 16E140
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [13ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.3) [12ms]
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.5+-13047016-b750.29)
[✓] VS Code (version 1.102.1) [10ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.114.0
[✓] Connected device (4 available) [9.8s]
• iPhone 16 (mobile) • ED9F0C82-08AC-4C78-87D9-B8890D97ACAF • ios • com.apple.CoreSimulator.SimRuntime.iOS-26-0 (simulator)
• iPhone 16 Pro (mobile) • 99687215-1CAC-490C-9AE7-D709BDAC384F • ios • com.apple.CoreSimulator.SimRuntime.iOS-18-4 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 15.5 24F74 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 138.0.7204.169
[✓] Network resources [312ms]
• All expected network resources are available.
• No issues found!
Checklist before submitting a bug
- I searched issues in this repository and couldn't find such bug/problem
- I Google'd a solution and I couldn't find it
- I searched on StackOverflow for a solution and I couldn't find it
- I read the README.md file of the plugin
- I'm using the latest version of the plugin
- All dependencies are up to date with
flutter pub upgrade
- I did a
flutter clean
- I tried running the example project
tentenponce, babyMilo37, luisburgos, sebroehl and Marceeelll