I have been implementing a share extension for my app and have added the activation rule NSExtensionActivationSupportsImageWithMaxCount.
While testing I've noticed that my app will appear in the Share Sheet as a viable target when the max count is exceeded by up to 2 additional photos. For example if I set max to 4 then my app will appear in the share sheet when the user is sharing 1-6 images.
On its own this wouldn't be too problematic, I figured I could put some validation in the extension that specifies the user has exceeded the allowed number. But while debugging the extension under this scenario I noticed that the inputItems array on the NSExtensionContext will only contain the number of items I've defined as the max, and silently drop the extra items. I'm sure users will see this as a bug with my app "losing" the extra images since the OS/Share Sheet provides my app as a valid target.
My entire Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>4</integer>
</dict>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).ShareViewController</string>
</dict>
</plist>
Entire code implementation of the extension
class ShareViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
if let extensionContext {
debugPrint(extensionContext)
}
}
}
Edit:
I've been testing on iOS 26.5 with a minimum deployment of iOS 26.0