Search code examples
iosuti

Opening Custom UTI in App not working in iOS13


I have been using AirDrop for ages now to allow a document to be passed from/to iPhone users from within my App. The App generates a straightforward CSV file which is then AirDropped (or could be emailed too) to another machine, where my App can open it and import it (the UTI is registered for the csv file type). This has been working fine for a long time, but I now see that devices running iOS13 no longer list my App as being able to import the file. If I run the same code on iOS12.4 (or earlier) it works fine, but on iOS13.1 my App is no longer registered to receive the data. The device can AirDrop to another device perfectly, and provided the destination is not iOS13 the import works fine. Whenever the destination is iOS13 my App simply is not listed as being available to receive. I can't see what might have changed.

The info settings (that work perfectly up until iOS13) are:

enter image description here

I cannot see anything in the iOS release notes that would suggest this has changed at all. Can anybody help with this?


Solution

  • Since you and your app didn't invent the CSV file type, you should use a standard UTI for CSV and not invent your own.

    This means you should use the Imported UTIs section to declare the CSV UTI. The Export UTIs section should only be used by new UTIs that are unique to your app.

    Here is my Imported UTI for CSV:

    enter image description here

    Here is my Document Type for CSV:

    enter image description here

    I have no trouble sending CSV files to my app under iOS 13 with these in place.


    Also keep in mind that under iOS 13, you may need to tap on the "More" icon at the end of the list in the share sheet to see your app (and possibly others) as a choice.