iVim icon indicating copy to clipboard operation
iVim copied to clipboard

:idoc can not open .c files?

Open ghost opened this issue 8 years ago • 14 comments

using :idoc files picker, most file formats are greyed out and can thus not be opened. Is there a workaround/ is it an iOS restriction?

thanks

ghost avatar Dec 22 '17 10:12 ghost

iVim should open most types of files. Plain text files (like .c) are supported well.

It may be caused by the original app (from where you are trying to pick the files) sometimes. You may try them in the Files app first. Or you may try and reboot your device.

terrychou avatar Dec 23 '17 02:12 terrychou

The issue appeared in google-drive, it works using iCloudDrive indeed.

ghost avatar Dec 23 '17 10:12 ghost

I think this might be a bug in Google Drive.

I had to work around a similar issue with Google Drive in an app I develop by using a public.data UTI to allow the opening of all files instead of the more specific (correct) ones I was using previously.

Although if I'm looking at the right bit of code, it looks like iVim already specifies public.data, so not sure what's going wrong in this instance. Does removing the public.text UTI have any effect? That should already be encompassed by public.data anyway. Or how about replacing them both with public.content?

sedm0784 avatar Jan 03 '18 10:01 sedm0784

that list has all sorts of type identifiers like public.c-source as well, which are in that iVim plist but that is just guess work at best from my side

ghost avatar Jan 03 '18 12:01 ghost

@monouser7dig The file types listed in UTExportedTypeDeclarations in the Info.plist aren't the ones used for declaring which types to enable in the Document picker. (Unless I'm misremembering how this works,) this line just before the Document Picker is displayed is the one where the types are specified.

sedm0784 avatar Jan 03 '18 15:01 sedm0784

so maybe all the other .c-source and shell and so on would help if they were added?

ghost avatar Jan 03 '18 15:01 ghost

No, they should all be covered by the public.data/public.text UTIs already specified. See the documentation for conformance for the gory details.

My hunch (based on prior experience) is that Google Drive is somehow declaring the file to actually be something other than a public.c-source file. It's only a hunch though, because I don't know by what mechanism they could be specifying this, and indeed what other UTI they could be declaring that file to be that doesn't conform to the existing public.data UTI in the code.

Perhaps someone with more experience in this area (because I'm pretty sure the answer doesn't lie in Apple's documentation) will chime in with a definitive answer of what is really happening and whether it's something iVim can workaround.

sedm0784 avatar Jan 03 '18 15:01 sedm0784

See the documentation for conformance for the gory details.

yes I see, suspected something like this to be the case

I'm pretty sure the answer doesn't lie in the documentation) will chime in with a definitive answer of what is really happening and whether it's something iVim can workaround.

solid access to source code files would certainly be a win (or vin) 😄

ghost avatar Jan 03 '18 16:01 ghost

I can’t open .kt(kotlin source) in iCloud. Do you have any sugesstions?

eigoninaritai-naokichi avatar Jan 28 '18 17:01 eigoninaritai-naokichi

Yes, files behave weirdly in iCloud Drive. This will be fixed in update.

terrychou avatar Jan 30 '18 08:01 terrychou

Thanks for replying. I am looking forward to be updated it.

eigoninaritai-naokichi avatar Feb 01 '18 03:02 eigoninaritai-naokichi

Is this problem solved in the latest update?

terrychou avatar Mar 10 '18 07:03 terrychou

it's not fixed for google drive at least, but maybe that was expected

ghost avatar Mar 10 '18 07:03 ghost

It’s fixes for iCloud drive at least. Thanks for fixing!

eigoninaritai-naokichi avatar Mar 10 '18 08:03 eigoninaritai-naokichi