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