Platform
Ios 16.2
Plugin
share_plus
Version
11.1.0
Flutter SDK
3.32.6
Steps to reproduce
I created a new project named hello using flutter create hello. Then, I added a new button with the following code:
SharePlus.instance.share(
ShareParams(text: 'check out my website https://example.com'),
);
When I try to run it on an iOS simulator, I get the following error.
Semantic Issue (Xcode): Use of undeclared identifier 'UIActivityTypeAddToHomeScreen'
/Users/kaguya/.pub-cache/hosted/pub.dev/share_plus-11.1.0/ios/share_plus/Sources/share_plus/FPPSharePlusPlugin.m:80:42
I'm sure that version 11.0.0 did not have this issue."
Code Sample
TextButton(
onPressed: () {
SharePlus.instance.share(
ShareParams(text: 'check out my website https://example.com'),
);
},
child: const Text('share'),
),
Logs
Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Xcode build done. 10.6s
Failed to build iOS app
Semantic Issue (Xcode): Use of undeclared identifier 'UIActivityTypeAddToHomeScreen'
/Users/kaguya/.pub-cache/hosted/pub.dev/share_plus-11.1.0/ios/share_plus/Sources/share_plus/FPPSharePlusPlugin.m:80:42
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
Exited (1).
Flutter Doctor
kaguya@kaguya-MacBookPro hello % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.32.6, on macOS 12.7.6 21H1320 darwin-x64, locale en-HK)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1)
[!] Xcode - develop for iOS and macOS (Xcode 14.2)
! Flutter recommends a minimum Xcode version of 15.
Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.1)
[✓] VS Code (version 1.103.1)
[✓] Proxy Configuration
[✓] Connected device (3 available)
[✓] Network resources
! Doctor found issues in 1 category.
Checklist before submitting a bug
Platform
Ios 16.2
Plugin
share_plus
Version
11.1.0
Flutter SDK
3.32.6
Steps to reproduce
I created a new project named
hellousingflutter create hello. Then, I added a new button with the following code:When I try to run it on an iOS simulator, I get the following error.
I'm sure that version
11.0.0did not have this issue."Code Sample
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgradeflutter clean