Platform
Any iOS device
Plugin
share_plus
Version
9.0.0
Flutter SDK
3.19.6
Steps to reproduce
I have an iOS device with the Telegram application installed, but I haven’t created an account or logged in. Despite this, when attempting to share a file through Telegram, my phone freezes. The issue arises due to the absence of a logged-in account within Telegram. Upon encountering this problem, the following log is displayed in the console:
“[NSExtension] Extension request contains input items but the extension point does not specify a set of allowed payload classes. The extension point’s NSExtensionContext subclass must implement +_allowedItemPayloadClasses. This must return the set of allowed NSExtensionItem payload classes. In future, this request will fail with an error.”
On Android devices, however, sharing a file via Telegram without a prior logged-in account does not result in any errors or phone freezes. The share operation returns a success status, with the raw result being returned as com.google.android.gm/com.google.android.gm.ComposeActivityGmailExternal.”
Steps to reproduce:
- Log out from any desired social media platform (e.g., Instagram, Telegram).
- Select any file to share and optionally add a caption.
- Attempt to share the file using the social media platform from which you’ve fully logged out.
Code Sample:
Future<void> sharePlus(String path) async{
print('LOOK: STARTED');
try{
final result = await Share.shareXFiles(
[XFile(path)],
text: null, //LocaleKeys.receipt.tr(),
);
switch(result.status){
case ShareResultStatus.success:
print('LOOK: SUCCESS: ${result.raw}');
case ShareResultStatus.dismissed:
print('LOOK: DISMISSED: ${result.raw}');
case ShareResultStatus.unavailable:
print('LOOK: UNAVAILABLE: ${result.raw}');
}
} catch(e){
print('LOOK: ERROR = $e');
}
}
Logs:
[NSExtension] Extension request contains input items but the extension point does not specify a set of allowed payload classes. The extension point’s NSExtensionContext subclass must implement +_allowedItemPayloadClasses. This must return the set of allowed NSExtensionItem payload classes. In future, this request will fail with an error.
I’ve Googled for the solution, and end up with the following issue: link to the issue. However, I couldn’t realize how to implement it since the problem is arising inside the plugin. Is there anyway to somehow handle it?