我正在尝试使用长按>在“我的应用程序”中打开来制作一个将从邮件应用程序接收媒体文件的应用程序
我无法将我想要的文件类型与我的应用程序关联起来。我正在使用统一类型标识符参考
这就是我的 info.plist 的样子:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mp3</string>
</array>
<key>CFBundleTypeName</key>
<string>MP3 Audio</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.mp3</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>avi</string>
</array>
<key>CFBundleTypeName</key>
<string>AVI movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.avi</string>
<string>video/x-msvideo</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>3gp</string>
</array>
<key>CFBundleTypeName</key>
<string>3GPP movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.3gpp</string>
<string>application/octet-stream</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mpg4</string>
<string>mp4</string>
<string>m4v</string>
</array>
<key>CFBundleTypeName</key>
<string>MPEG-4 content</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.mpeg-4</string>
<string>video/mp4</string>
<string>video/mp4v</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mov</string>
</array>
<key>CFBundleTypeName</key>
<string>QuickTime movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.quicktime-movie</string>
<string>video/quicktime</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
</array>
其中,只有 Mp3 和 AVI 显示在“我的应用程序”中打开选项。我刚刚获得将视频添加到我的相机胶卷的“保存视频”选项。我究竟做错了什么?
我要关联的格式是:AVI、3GP、MP4、M4V、MOV。
我也试过这个。它适用于 MP3、WAV、AVI、FLV,但仍然不适用于 3GP、MP4、MOV、M4V
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Audio</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Video</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.movie</string>
</array>
</dict>
</array>