Reputation: 77
In iOS device, open Files -> select more than one files from the files section -> click on share icon -> MAUI app displayed for sharing.
When i select more than one files, My MAUI ios app should not display the app from sharing.
I have added CFBundleDocumentTypes in the maui app to allow only specific document types can be shared with the mobile app. I haven't done any specific coding for this.
Any inputs for resolving this issue would be helpful.
Upvotes: 0
Views: 278
Reputation: 8245
I assume you use share extension in MAUI. You could refer to NSExtensionActivationRule . That means what you need to do is to define your own NSExtensionActivationRule in the info.plist for your Share Extension project.
A small example, if you want to limit the max supprt number to 1 file, just set NSExtensionActivationSupportsFileWithMaxCount to 1 (in the share extension's info,plist),
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsFileWithMaxCount</key>
<integer>1</integer>
</dict>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
</dict>
For more info, you may also refer to Apple docs at App Extension Programming about NSExtensionActivationRule
.
Hope it helps!
Upvotes: 0