注册应用以从Safari的“共享”或“在...中打开”对话框打开无法正常工作。(尽管可以从其他应用程序使用)

NHDaly

当用户单击任何html网页上的共享按钮时,我试图注册我的应用程序以显示在Safari的“打开...”对话框中。

正如许多答案中所建议的那样,我已经将public.html(并且public.data很好地)将内容类型添加到Xcode的文档类型中:(请参阅此问题此问题此Apple文档。)

而且,它似乎有效。如果我在Safari中打开.pdf,则顶部会显示“在我的应用程序中打开”对话框。我还可以使用其他应用程序中的“在...中打开”对话框来与“我的应用程序”共享文档。

为了测试它,我按照此答案中的建议构建了DocInteraction,如果创建了html文件,则“我的应用程序”将显示在共享对话框中。

但是,“我的应用”仍未显示在Safari的共享对话框中。当我在iOS模拟器上的iOS7中运行它时,只会显示Mail,Twitter和Facebook:

任何地方都没有我的应用程序的迹象!

在真实的iOS设备上进行测试时也是如此:

悲伤的Safari无法找到“我的应用”

但是,我想请您注意,这确实有可能!请看上面的屏幕截图。某种程度上,微博管理了这一壮举。我不知道如何,但是由于某些原因,即使我的应用程序没有显示,微博仍会出现在此列表中。

而且,实际上,鉴于有多少应用程序可以打开html页面,因此这种说法很有意义。这是在我的iOS设备上运行的DocInteraction,试图共享html页面:

每个人都想要一些.html动作!

在那里!我的应用程式!(实际上称为“ Wulu Podify”)。但是有太多渴望.html页面的应用程序,我想Safari认为提供所有这些应用程序可能有点不堪重负。

但是,这仍然是个问题,微博是如何进入榜单的?但是,进一步的挖掘似乎表明,实际上,微博似乎已经跻身每一个榜单。

微博无法打开什么?

我不确定他们是如何管理的,但也许他们的做法有所不同。

微博的“我将打开任何文档给我看”的方法也许可以解决此问题,但这并不理想。我真的只想打开html页面。

So. I guess my questions is three-fold:

  1. Is there a way to actually have my app show up in Safari's "Open In..." dialog?
  2. If not, how can I achieve what Weibo achieved, and show up in ALL the dialogs?
  3. Should I want to do that? It seems like it might be a bad idea.

Thanks for any help! I've been at this for a while!!


Update:

So, actually, I didn't realize it but I think Weibo might be a built-in option just like Facebook and Twitter. I assumed it was just there because I have it installed on my phone, but maybe it was one of the iOS6 defaults. I say that because when I test on the iOS6.0 Simulator, I suddenly see Weibo show up in the share screen, even though I definitely haven't installed it on my simulator.

所有人的微博! :( 悲伤的脸。

So maybe there is no way around this except for having it built in to Safari by apple..

tomf

我知道这是几年后的事,但是如果有人遇到这个老问题,那么从IOS 8开始,Apple现在允许应用程序创建者进行“扩展”,这确实允许您将应用程序添加到共享菜单。

这里是一些文档:

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

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

Related 相关文章

热门标签

归档