【问题标题】:App is not showing in photo gallery on iPad应用程序未显示在 iPad 上的照片库中
【发布时间】:2015-03-17 19:36:38
【问题描述】:

我有一个用于上传文件的应用程序,我希望我的应用程序在用户点击 iPad 照片库/相机胶卷时显示出来。另外,我需要它来显示用相机拍摄的视频。任何帮助,将不胜感激。

这是我的 plist 中的 DocumentTypes 列表:

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Audio</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.mp3</string>
            <string>public.mpeg-4-audio</string>
            <string>com.apple.m4a-audio</string>
            <string>public.audio</string>
            <string>com.apple.protected-​mpeg-4-audio</string>
            <string>public.aifc-audio</string>
            <string>com.apple.coreaudio-​format</string>
            <string>public.aiff-audio</string>
            <string>com.microsoft.waveform-​audio</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Video</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.movie</string>
            <string>public.avi</string>
            <string>public.mpeg-4</string>
            <string>public.mpeg</string>
            <string>com.microsoft.windows-​media-wmv</string>
            <string>com.apple.m4v.video</string>
            <string>public.video</string>
            <string>public.3gpp2</string>
            <string>public.3gpp</string>
            <string>com.apple.quicktime-movie</string>
        </array>
    </dict>
    <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>GIF image</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.compuserve.gif</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>TIFF image</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.tiff</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>
    <dict>
        <key>CFBundleTypeName</key>
        <string>OpenDocument Spreadsheet</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>org.oasis.opendocument.spreadsheet</string>
            <string>org.oasis-open.opendocument.spreadsheet</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>OpenDocument Presentation</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>org.oasis.opendocument.presentation</string>
            <string>org.oasis-open.opendocument.presentation</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>OpenDocument Text</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>org.oasis.opendocument.text</string>
            <string>org.oasis-open.opendocument.text</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>OpenDocument Graphics</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>org.oasis.opendocument.graphics</string>
            <string>org.oasis-open.opendocument.graphics</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Microsoft PowerPoint</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.microsoft.powerpoint.ppt</string>
            <string>org.openxmlformats.presentationml.presentation</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Microsoft Excel</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>org.openxmlformats.spreadsheetml.sheet</string>
            <string>com.microsoft.excel.xls</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Microsoft Word</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.microsoft.word.doc</string>
            <string>com.microsoft.word.wordml</string>
            <string>org.openxmlformats.wordprocessingml.document</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>PDF</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.adobe.pdf</string>
        </array>
    </dict>
</array>

【问题讨论】:

  • “我希望我的应用在用户点击 iPad 照片库/相机胶卷时显示出来”是什么意思?
  • 你不应该弄乱.plist文件。您需要实现UIImagePickerViewController 委托方法。请参阅 Apple 示例代码:Using UIImagePickerController to Select Pictures and Take Photos
  • 是的,达席尔瓦。这就是我的意思。
  • Rohan-patel,我有一个可以上传文件、照片和视频的应用程序。我希望其他应用程序通过我的应用程序共享。因此,当用户单击 CameraRoll 中的共享图标时,我希望我的应用程序显示为一个选项。上面的 plist 是我想要使用的,但我的应用程序没有显示。
  • 我找到了答案。苹果不允许。 stackoverflow.com/questions/23403316/…

标签: ios iphone objective-c ipad gallery


【解决方案1】:

我找到了答案。 Apple 不允许第三方应用出现在相机胶卷中。

CFBundleDocumentTypes with Photo Library / Camera Roll

【讨论】:

  • 嗨,我可以在相机胶卷中看到几个第 3 方应用程序(Viber、Camu、KeepSafe 等)。但不知道怎么做。
【解决方案2】:

我真的不明白你在说什么。但是你可以尝试制作一张专辑。

【讨论】:

  • 我有一个可以上传文件、照片和视频的应用程序。我希望其他应用程序通过我的应用程序共享。因此,当用户单击 CameraRoll 中的共享图标时,我希望我的应用程序显示为一个选项。上面的 plist 是我正在使用的,但我的应用程序没有出现。电子邮件、Facebook 和 Flicket 出现了,但我的应用程序没有出现。如何让我的应用显示?
猜你喜欢
  • 1970-01-01
  • 2019-07-25
  • 1970-01-01
  • 1970-01-01
  • 2014-02-13
  • 1970-01-01
  • 1970-01-01
  • 2022-07-19
  • 1970-01-01
相关资源
最近更新 更多