【发布时间】:2013-06-24 21:55:45
【问题描述】:
我正在尝试在我的应用中将图片发送到 Instagram,就像现在许多照片应用一样。我遵循了一些关于从 UIDocumentInteractionController 导入文档的教程,但它不起作用。
也许是因为所有教程都是关于如何打开 PDF 文件,以及打开发送到 instagram 的 .ig 文件,我需要更多的东西吗?
无论如何,我编辑了我的 plist 以添加以下行:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>LSItemContentTypes</key>
<array>
<string>com.instagram.photo</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleTypeName</key>
<string>Ig Document</string>
<key>LSHandlerRank</key>
<string>Default</string>
</dict>
</array>
现在我的应用程序出现在 UIDocumentInteractionController 菜单中,但是当我点击“在 MyPhotoApp 中打开”时,菜单会关闭,什么也没有发生。
我尝试在方法中设置断点:(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
但它似乎从未被调用过。我错过了什么?
【问题讨论】:
标签: objective-c instagram