2016-12-12 7 views
0

현재 내 iOS 앱에 파일 .ppt 개를 가져 오는 중에 문제가 있습니다. 지금까지이 UTI 중 하나 하나가 작동 중이며 해당 파일 유형을 내 앱으로 가져올 수 있습니다. 여기에는 docx, doc, xslx, xsl, pptx가 포함됩니다. 가져 오기를 거부하는 유일한 앱 (앱의 아이콘이 표시되지 않음)은 .ppt입니다. .ppt 파일을 내 iOS 앱에 가져올 수 없습니다.

가 나는 요로 감염의 애플의 공식 사이트에서 사용하고 그것은 여전히 ​​작동하지 않습니다 https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html

어떤 아이디어?

<key>CFBundleDocumentTypes</key> 
<array> 
    <dict> 
     <key>CFBundleTypeName</key> 
     <string>My Document File</string> 
     <key>CFBundleTypeRole</key> 
     <string>Viewer</string> 
     <key>LSHandlerRank</key> 
     <string>Owner</string> 
     <key>LSItemContentTypes</key> 
     <array> 
      <string>com.microsoft.word.doc</string> 
      <string>com.microsoft.word.wordml</string> 
      <string>org.openxmlformats.wordprocessingml.document</string> 
      <string>com.microsoft.excel.xls</string> 
      <string>org.openxmlformats.spreadsheetml.sheet</string> 
      <string>com.microsoft.powerpoint.​ppt</string> 
      <string>org.openxmlformats.presentationml.presentation</string> 
      <string>com.adobe.pdf</string> 
      <string>com.microsoft.bmp</string> 
      <string>public.jpeg</string> 
      <string>public.png</string> 
      <string>public.tiff</string> 
      <string>com.compuserve.gif</string> 
     </array> 
    </dict> 
</array> 
+0

명령 줄에서 PPT 파일의 UTI를 찾으려고 했습니까? UTI macOS가 무엇을보고 있는지에 대해 흥미로울 것입니다. 다음 명령을 사용하여이 작업을 수행 할 수 있습니다 :'mdls -name kMDItemContentTypeTree/path/to/file' –

+0

예, 여기 있습니다. kMDItemContentTypeTree = ( "com.microsoft.powerpoint.ppt" "public.data" "public.item" "public.presentation" "public.composite 콘텐츠" "공용. 콘텐츠 " ) – lespommes

답변

1

발견 된 이유. 그 문제에 대해 UTI를 Plist 파일이나 다른 문자열에 복사하여 붙여 넣지 마십시오. '.'문자 사이에 보이지 않는 유니 코드 문자가 있다는 것을 제외하면 똑같은 정확한 문자였습니다. 및 'ppt'. 화살표 키를 사용하여 문자열을 단계별로 살펴보면 문자가 있기 때문에 'ppt'에서 'p'를지나 이동하려면 두 번 탭해야한다는 것을 알 수 있습니다.

일단 UTI를 직접 입력하면 효과가있었습니다.