App is not showing in the share menu of shared opt

2019-01-23 15:20发布

问题:

I'm developing share extension for my app. Every thing is fine, but i'm facing one main problem, my app is not in the share menu while sharing from photos app.

Below is the plist of my shared extension.

It's not showing in the list, below is the screenshot:

But when i go to more option, set the switch of my extension off and on, now it is showing in the list, But i need to do it every time, below are the screenshots:

Every time i ran the extension from X-Code, It's not showing the share menu, i need to go to more option, set the switch off and on again, then only it is showing. Can it show every time in the share menu? Is there anything i'm missing in the plist or extra configuration required?

I need your valuable suggestions. Thanks in advance.

Update:

I have checked it in iOS9. It's working fine without any issues.

回答1:

This is a bug in iOS. There is no workaround in the current version. File a bug report with Apple and hope that they fix it soon.



回答2:

For anyone having the same problem and not finding a solution, worth trying also to check "Deployment Target" of the extension.

It can be different that the main app and is setup by default when the extension is created.

In my case it was higher than what I had on my device.



回答3:

Step by step flow for creating Share Extension

Then just Run the application

Check Out Plist count to be 1 (1 = allows attachment 1) for images

Plist

<key>NSExtension</key>
    <dict>
        <key>NSExtensionAttributes</key>
        <dict>
            <key>NSExtensionActivationRule</key>
            <dict>
                <key>NSExtensionActivationSupportsImageWithMaxCount</key>
                <integer>1</integer>
            </dict>
        </dict>
        <key>NSExtensionMainStoryboard</key>
        <string>MainInterface</string>
        <key>NSExtensionPointIdentifier</key>
        <string>com.apple.ui-services</string>
    </dict>

Useful inks

https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ShareSheet.html

http://www.appcoda.com/ios8-share-extension-swift/

http://www.appcoda.com/tag/app-extension/

Sharing data from Extension to Main App information link & How to create Today's extension?

How to create widgets showing on home screen in iOS 10



回答4:

I faced the same issue. I found, that in the Build Settings (of extension target) field Wrapper Extension was empty, while it should be assigned as "appex". Assigning "appex" to Wrapper Extension solved my problem.