简体   繁体   English

应用未显示在 iOS8 中共享扩展的共享选项的共享菜单中

[英]App is not showing in the share menu of shared options in shared extension in iOS8

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.以下是我的共享扩展的 plist。在此处输入图片说明

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.每次我从 X-Code 运行扩展程序时,它都没有显示共享菜单,我需要转到更多选项,关闭并再次打开,然后只显示它。 Can it show every time in the share menu?它可以每次都显示在共享菜单中吗? Is there anything i'm missing in the plist or extra configuration required?我在 plist 中缺少什么或需要额外的配置吗?

I need your valuable suggestions.我需要你的宝贵建议。 Thanks in advance.提前致谢。

Update:更新:

I have checked it in iOS9.我已经在 iOS9 中检查过了。 It's working fine without any issues.它工作正常,没有任何问题。

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.就我而言,它比我的设备上的要高。

This is a bug in iOS.这是iOS中的一个错误。 There is no workaround in the current version.当前版本中没有解决方法。 File a bug report with Apple and hope that they fix it soon.向 Apple 提交错误报告,并希望他们尽快修复。

我在 iOS 14 Beta 上遇到了这个问题,通过重启设备解决了。

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 计数为 1(1 = 允许附件 1)

在此处输入图片说明

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 https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ShareSheet.html

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

http://www.appcoda.com/tag/app-extension/ 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 如何创建显示在 iOS 10 主屏幕上的小部件

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".我发现,在 Build Settings (of extension target) 字段 Wrapper Extension 是空的,而它应该被分配为“appex”。 Assigning "appex" to Wrapper Extension solved my problem.将“appex”分配给 Wrapper Extension 解决了我的问题。

扩展构建设置

I had encountered with the same problem and fixed it by changing deployment target version for the extension.我遇到了同样的问题,并通过更改扩展的部署目标版本来修复它。 In my case ios version of the device that was tested was lower than my target ios version for the extension在我的情况下,被测试设备的 ios 版本低于我的扩展目标 ios 版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM