I am trying to open .obj files from iCloud drive in my app throw UIDocumentPickerViewController. I could't find standart UTi for .obj files. So, using this https://developer.apple.com/library/content/qa/qa1587/_index.html I try to add support of this file-extension for my app.
there is info.plist sections :
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>arrow1</string>
</array>
<key>CFBundleTypeName</key>
<string>OBJ model</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.giena.Interface.obj</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>OBJ model</string>
<key>UTTypeIdentifier</key>
<string>com.giena.Interface.obj</string>
<key>UTTypeSize320IconFile</key>
<string>arrow1</string>
<key>UTTypeSize64IconFile</key>
<string>arrow1</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>obj</string>
</array>
</dict>
</dict>
</array>
and there is UIDocumentPickerViewController call:
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.text"] inMode:UIDocumentPickerModeOpen];
documentPicker.delegate = self;
documentPicker.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:documentPicker animated:YES completion:nil];
When i am running app, i see popup view for file choosing, but .obj files is grey and not-selectable. What am i doing wrong?