App unable to import files in iOS13

My app has the ability to import GPX route files. However I am getting reports from users of iOS13 that the app is no longer appearing in the list of available apps when they try to export a GPX file.


Has anyone else seen or heard of this, and does anyone know how I might get around it? As far as I know it is only the Imported UTIs that affect this - is iOS 13 more fussy about how they are specified?

I had the same issue with my app, not released yet. My mistake was that I registered the gpx type as my own. For the Types property, I had "com.myappname.gpx". Same for Identifier. This told IOS that I have invented the gpx format and it should be registered as my app's. That was completely wrong.


In fact, the gpx is an xml format. So, for me, the solution was to set the "Types" property to public.xml and the "Conforms To" property to public.text. Now my app appears in the Share menu, as Copy to AppName, and the gpx file opens properly. My app is kind of hidden under the More button, but it's there. After setting it as favorite, it's on the first page, but that's the user preference.


In my rookie mind, that would explain why everything depends on the order of installation of the apps. If all the apps register themselves as the creator of the format, the app that was installed last will work, while the others will not. If we all register our apps as opening public formats, the isuue would disappear. In theory. Not tested enough. 🙂

Yes the Safari link is broken. My app really relies on that to download propriatery plugins from a webpage. They just went ahead and broken the whole functioanlity. What a shame. Some of the brightest minds around wasting their time on Apple's GUI churn, insted of creating something of value.

Same, need this to work again as it did previous. Apple regration testing and backward compatibility lacking?

iOS13.2 and xcode 11.2 still not working

All of my export files are .plist. I changed the "Types" to public.plist and "Conforms To" property to public.text but this still doesn't work for me.


I had also upgraded to 13.2 but then had to downgrade to 13.1.2 as Xcode would no longer load files onto my device giving me the message that I needed to upgrade to the latest version of Xcode.

This is how I got it to work for me. For the file type I just made an abitrary extension to the file I was saving as an email attachment: filename.anyuniqueextension


Under Document Types I left the default value of "Damian-s.${PRODUCT_NAME:rfc1034identifier}"


Then under "UTTypeTagSpecification" change Item 0 to "anyuniqueextension"


Make sure in your app that you read and write the file extension with "anyuniqueextension"


All of my file types are .plist.

Did you add these or where they already there? I only have Document Types, I don't see UITypeTage Specification anywhere. Can you provide more detail

I replaced the types that were there.


It would be easiest to show an image but since images aren't allowed here, this is the text from the .plist file in the app:


The UITypeTage is in the UTExportedTypeDeclarations.


The extension to the email data file is "visionPF". This is added to the file name in the app when creating the email attachment.



<key>CFBundleDocumentTypes</key>

<array>

<dict>

<key>CFBundleTypeIconFiles</key>

<array>

<string> blah blah blah path to icon image </string>

<string>VisionEmailIcon.png</string>

</array>

<key>CFBundleTypeName</key>

<string>VisionFliteSettings File</string>

<key>CFBundleTypeRole</key>

<string>Editor</string>

<key>LSHandlerRank</key>

<string>Owner</string>

<key>LSItemContentTypes</key>

<array>

<string>Damian-s.${PRODUCT_NAME:rfc1034identifier}</string>

</array>

</dict>

</array>

<key>UTExportedTypeDeclarations</key>

<array>

<dict>

<key>UTTypeConformsTo</key>

<array>

<string>public.data</string>

</array>

<key>UTTypeDescription</key>

<string>VisionFliteSettings File</string>

<key>UTTypeIconFiles</key>

<array>

<string>VisionEmailIcon.png</string>

</array>

<key>UTTypeIdentifier</key>

<string>Damian-s.${PRODUCT_NAME:rfc1034identifier}</string>

<key>UTTypeTagSpecification</key>

<dict>

<key>public.filename-extension</key>

<array>

<string>visionPF</string>

</array>

</dict>

</dict>

</array>

I've solved this in may app by replacing custom UTIs with system defined ones. I used them in Info.plist in the "Document types" section and removed all exported UTIs. Now my app is back in the list of available apps.


You can get UTI for a file by using this command in Terminal (God bless Wikipedia :-)):

mdls -name kMDItemContentType -name kMDItemContentTypeTree -name kMDItemKind FILE


For GPX files the UTI is "com.apple.dt.document.gpx". Corresponing record in Info.plist should look like this:


    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array/>
        <key>CFBundleTypeName</key>
        <string>GPX record</string>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.apple.dt.document.gpx</string>
        </array>
    </dict>

Works perfect. Thanks for that elegant solution.


UTI for a .plist file:

com.apple.property-list

Apples response We understand that you are having issues with your type definition for .gpx files. At this time, there is no commonly-accepted Uniform Type Identifier for .gpx files and different developers have defined their .gpx declaration differently. This means that if two apps are installed on the same device that claim to open these files with different definitions, they won't interact correctly: from the user's point of view, only one of those apps, chosen seemingly at random, will be able to open these files. Our understanding is that this format was designed by Topografix, so our current recommendation is that you redeclare support for .gpx files in your app by adding a type declaration for com.topografix.gpx that conforms to public.data and has the filename extension tag gpx. An example declaration is shown here: UTImportedTypeDeclarationsUTTypeIdentifiercom.topografix.gpxUTTypeReferenceURLhttps://www.topografix.com/gpx.aspUTTypeConformsTopublic.dataUTTypeTagSpecificationpublic.filename-extensiongpx Apple does not generally declare Uniform Type Identifiers for file types the operating system does not natively support, so this is a change that you will need to make. If you and other developers standardize on this Uniform Type Identifier, users on iOS 13 should see these apps appear in UIActivityViewController and other relevant UI locations. Such a change will also benefit users still running iOS 12 and earlier if they have multiple apps installed that can handle this file format. For more information about declaring Uniform Type Identifiers, see our documentation here: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_declare/understand_utis_declare.html While making this change in your app will not immediately fix the problem, it is a step in the right direction as other developers adopt this UTI.

Thanks for that. I can't tell if it works for me yet because I wasn't having the problem - many of the users of my app were seeing it, but not me. I will use that UTI in my next beta and see what the beta testers say.

For zip files: com.pkware.zip-archive


For gpx file: com.apple.dt.document.gpx

- still doesn't work. (no file icon either)

Apparently there isn't a UTI for a file of type text - .txt

Plain text files works in my app with UTI "public.plain-text"

I finally solved this problem for custom UTIs. First a little background. Our apps have two or three custom file types. They have been in the apps for at least five years and have always worked fine. After upgrading to iOS 13, users could no longer import their files from any source.


After trying many suggestions in this thread, I finally decided to delete the entire "Exported Type UTIs" and "Imported Type UTIs" keys from the info.plist for each app. Note that I used the property list view for all changes, not the source view. Next, I went to the target info tab and created new Exported UTIs and Imported UTIs. The identifier for each UTI was the same as before, which was the reverse company domain and the custom file extention (com.company.ext). The "conforms to" field was set to "public.data" for all. In the "additional properties" area, I added the UTTypeTagSpecification key as a dictionary and added the "public.filename-extension" key as an array. In the array I added one item which was the file extention.


UTTypeTagSpecification Dictionary

public.filename-extension Array

Item 0 String ext


Prior to these changes, I was working with the plist source to try to solve this problem. But apparently using the property gui editor changed the plist source in a way that resolved the problem. I only did a quick compare of the old file and the new and didn't see anything obvious.

Also, note that I did not make any changes to the Document Types.

Worked for me too. I worry if this is just a temporary fix, though?

DUDE!!!! You just saved me! Finally a fix!

Sadly that didn't work for me, still redirected to the home page of IOs, ans Safare crash, also tried added public.file-extension to the additional array but to no avail.


I created an entry on StackOverflow for the crash on import file thread of this topic.
https://stackoverflow.com/questions/58670089/unable-to-import-files-with-custom-uti-extension-on-ios-13

I tried you solution for GPX, but it only works directly after installing. when installing another app able to open GPX files, my app disappears from the list again - just as it did before.

This was reproducable on all iOS 13 test devices.

I filed a bug report, too, but no repsonse so far.

Is there a way to reproduce the issue reliably.

I mean make a working device have the bug.

Because a lot of solutions seem to come down to the reinstalling step updating the system list until another app update make it fails again.

"While making this change in your app will not immediately fix the problem, it is a step in the right direction as other developers adopt this UTI."


Realistically this is never going to work - there's always going to be apps that don't do this. This change in iOS13 has broken a core feature in many apps in a way that developers are unable to fix.


As per @baraupp, is everyone filing FB's on this?

Unfortunately, this does not work for me either. Did you do anything else beyond the deletion and reentry of the Exported Type UTI's? For me, I have a .csv file. So I have 2 UTTypeTagSpecification:


public.mime-type string application/myAppName

public.filename-extension Array

Item 0 String csv


Did you include a public.mime-type?


After adding this, I just restarted my app in XCode. But my app does not show up in the share menu as one of the apps to share to.

Hi, I have had this problem exporting GPX files from Gaia to Outdooractive up to 13.2. OA would not show up in the list of suggested apps. So I deleted a lot of apps that had shown up instead: Threema, Telegram, LinkedIn, DropBox, Google Drive, Komoot, Motion Control X GPS, ... Now I have only three GPS apps (which create GPX filed and can import them). Gaia, Outdooractive, Alpenvereinaktiv. Cheers

Many users report, importing GPX-files works again with iOS 13.2 - exactly like it was with iOS 12! To me, it feels like it's the majority.


BUT there are other users with 13.2 still having the same issues. Can anybody confirm this?

App unable to import files in iOS13
 
 
Q