2014-09-02 46 views
0

我需要将来自附件的所有文档,图像和视频共享到我的应用程序,但不幸的是,有些文档从面板上的共享中丢失了我的应用程序。这里是我的info.plist的文档类型。无法使用我的应用程序从电子邮件附件中打开某些PowerPoint文件

<key>CFBundleDocumentTypes</key> 
<array> 
    <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>OpenDocument Presentation</string> 
      <key>LSHandlerRank</key> 
      <string>Alternate</string> 
      <key>LSItemContentTypes</key> 
      <array> 
       <string>org.oasis.opendocument.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>OpenDocument Text</string> 
      <key>LSHandlerRank</key> 
      <string>Alternate</string> 
      <key>LSItemContentTypes</key> 
      <array> 
       <string>org.oasis.opendocument.text</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> 
    <dict> 
     <key>CFBundleTypeName</key> 
     <string>Audio</string> 
     <key>CFBundleTypeRole</key> 
     <string>Viewer</string> 
     <key>LSHandlerRank</key> 
     <string>Alternate</string> 
     <key>LSItemContentTypes</key> 
     <array> 
      <string>public.audio</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> 
    <dict> 
     <key>CFBundleTypeName</key> 
     <string>Video</string> 
     <key>CFBundleTypeRole</key> 
     <string>Viewer</string> 
     <key>LSHandlerRank</key> 
     <string>Alternate</string> 
     <key>LSItemContentTypes</key> 
     <array> 
      <string>public.3gpp</string> 
      <string>public.3gpp2</string> 
      <string>public.mpeg-4</string> 
      <string>public.avi</string> 
      <string>com.apple.quicktime-movie</string> 
      <string>public.mpeg</string> 
      <string>public.movie</string> 
      <string>public.video</string> 
     </array> 
    </dict> 
    <dict> 
     <key>CFBundleTypeExtensions</key> 
     <array> 
      <string>myapp image</string> 
     </array> 
     <key>CFBundleTypeName</key> 
     <string>public.png</string> 
     <key>CFBundleTypeRole</key> 
     <string>Editor</string> 
     <key>LSHandlerRank</key> 
     <string>Alternate</string> 
     <key>LSItemContentTypes</key> 
     <array> 
      <string>public.png</string> 
      <string>public.jpeg</string> 
     </array> 
    </dict> 
</array> 

例如如果你只是想你的应用程序是列表中任何类型的文件上我不能共享this powerpoint

回答

0

,您可以使用通用的UTI public.data ...

<key>CFBundleDocumentTypes</key> 
<array> 
    <dict> 
     <key>CFBundleTypeIconFiles</key> 
     <array/> 
     <key>CFBundleTypeName</key> 
     <string>Document</string> 
     <key>LSItemContentTypes</key> 
     <array> 
      <string>public.data</string> 
     </array> 
    </dict> 
</array> 
相关问题