in my case, just adding a JS file with " NSExtensionJavaScriptPreprocessingFile " did not solve the problem.
<key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>NSExtensionJavaScriptPreprocessingFile</key> <string>Action</string> <key>NSExtensionActivationRule</key> <dict> <key>NSExtensionActivationSupportsText</key> <true/> <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> <integer>1</integer> </dict> </dict> <key>NSExtensionMainStoryboard</key> <string>MainInterface</string> <key>NSExtensionPointIdentifier</key> <string>com.apple.share-services</string> </dict>
It is also necessary to add:
<key>NSExtensionActivationSupportsText</key> <true/>
Currently, I do not know why.
I found this in the official documentation: NSExtensionActivationSupportsText . Enable this key to indicate to the system and other applications supported by your application.
Thank you very much.
source share