ios - 我的 iOS 应用程序不处理所有应用程序中的图像文件类型

标签 ios

我希望我的应用在图像的“打开方式”选项中。

我在我的 Info.plist 中使用了这段代码

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Image</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.image</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>PNG image</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.png</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>JPEG image</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.jpeg</string>
        </array>
    </dict>
</array>

在应用程序“收件箱”中,在共享图像时,我可以看到我的应用程序“Quotle”:

enter image description here

但是在 Apple 的应用程序“照片”中,我没有看到我的应用程序:

enter image description here

如何才能在“照片”应用程序的共享菜单中看到我的应用程序?

最佳答案

为了在照片的共享列表中显示您的应用程序,您需要将共享扩展的新目标添加到您的项目中,请引用 document有关如何添加共享扩展的更多信息。

关于ios - 我的 iOS 应用程序不处理所有应用程序中的图像文件类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34874306/

相关文章:

ios - SpriteKit addChild(节点: SKNode) plural?

ios - 为什么 Firebase 在更新值时会制作额外的 map ?

ios - 目标 Sharpie 在使用 iPhoneos 9.3 时看不到旧版 iPhone SDK

android - 将 React Native 组件嵌入到平台原生代码中?

ios - 如果 UITableView 没有数据,如何添加 UIImage 和 UILabel

ios - 在 SWIFT 4 中将文本字段限制为仅正整数

iOS:滑动 UIView 开/关屏幕

ios - 类层次结构不适合继承模型

ios - CFStringRef 将值设置为 ""

ios - 为什么 API 拒绝我的 JSON?