我試圖做出會通過長按>打開「我的應用」副音頻和視頻類型與iPhone應用程序
我有麻煩關聯的文件類型從郵件應用程序接收媒體文件的應用程序我想用我的應用程序。我現在用的是Uniform Type Identifiers Reference
這是我的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>
我試過了你的想法,但它不起作用。我不明白打開在郵件app.I 「我的應用」 選項一起使用:\t \t \t \t \t CFBundleTypeName \t \t \t MP4 \t \t \t CFBundleTypeRole \t \t \t 瀏覽器 \t \t \t 個LSItemContentTypes \t \t \t \t \t \t \t public.mpeg -4- \t \t \t \t \t –
2012-07-22 11:12:14
其他職位中的一個顯示 CFBundleTypeName public.mpeg-4 用於該位定義。我的閱讀不是必需的,我已經看到其他例子像你的那樣設置,但是如在最後一個項目符號中那樣,該名稱可能在該插槽中是必需的。 –
2012-07-22 16:59:44
:(仍然does not工作:\t \t \t \t \t CFBundleTypeName \t \t \t public.mpeg-4 \t \t \t CFBundleTypeRole \t \t \t 瀏覽器 \t \t \t LSHandlerRank \t \t \t 替代 \t \t \t LSItemContentTypes \t \t \t \t \t \t \t public.mpeg -4- \t \t \t \t \t ..我嘗試過兩個電話和兩個mac! –
2012-07-23 07:55:04