Icon not showing in for Custom Uniform Type Identifier (UTI) in iOS/Swift project

1awuesterose Source

I successfully created a custom Uniform Type Identifier (UTI) for my iOS 11 / Swift 4 / iPad only application with the help of Technical Q&A QA1587. I am able to open the file with my app through the following function in the AppDelegate class: optional func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool

By default, the icon for files of this type is the App icon: e.g when using the Documents app, the icon is displayed correctly. However, the icon is not displayed in the AirDrop dialog. Instead the 'blank white sheet' icon is used:

enter image description here

How can I set the App icon (or some other custom icon) to be displayed in the AirDrop dialog? I know about the CFBundleDocumentTypes -> CFBundleTypeIconFile property of the Info.plist file. But I didn't manage to specify the icon so that it is reflected on the device.



comments powered by Disqus