[TIMOB-25364] iOS: CFBundleTypeIconFiles not used in iOS11
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2019-05-06T21:48:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | ios, regression |
Reporter | Raef Akehurst |
Assignee | Unknown |
Created | 2017-10-03T03:20:14.000+0000 |
Updated | 2019-05-06T21:48:18.000+0000 |
Description
I have an app that recognizes ".picsafe" files (my own custom extension). Here is an extract from my tiapp.xml file.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>PicSafe File</string>
<key>CFBundleTypeIconFiles</key>
<array>
<string>Document-picsafe-320.png</string>
<string>Document-picsafe-64.png</string>
<string>Document-picsafe-58.png</string>
<string>Document-picsafe-29.png</string>
</array>
<key>LSItemContentTypes</key>
<array>
<string>com.picsafe.med</string>
</array>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>public.filename-extension</key>
<string>picsafe</string>
</dict>
</array>
When I build to a device running iOS 11, it does not use the image specified. It seems to use the app icon. When I build to a device running iOS 10, the correct image is displayed. See the images attached (iOS 11 is running on the device on the left and iOS 10 is running on the device on the right).
Note, I tried deleting my app on the iOS 11 device and you can see that it uses the Telegram icon, and it would appear that it is using the correct CFBundleTypeIconFiles icon for Telegram. That leads me to believe it might be a Titanium issue.
Attachments
File | Date | Size |
---|---|---|
IMG_0086.JPG | 2017-10-03T03:15:16.000+0000 | 1174618 |
IMG_0087.JPG | 2017-10-03T03:12:20.000+0000 | 1189123 |
Hey there! Although we did not change anything related to icon-files over the last months, so it might actually be change of configuration between iOS 10 and iOS 11 that you may need to change in your plist as well. We will still try to investigate it for you and come back once we know more, thanks! *EDIT*: After a quick research, you might miss required icon-sizes *or* Apple changed the way icons need to be named. You may download the Telegram IPA file and extract it to see their actual Info.plist and referenced resources. May that help?
Hi Hans. Thanks for your help with this. I have done some more research. According to the Apple documentation (https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-SW9) I have the correct file types and there is no mention of this changing for iOS 11. Again, according to the Apple documentation, you can specify the file names in the info.plist. I looked at the Telegram source code (it is open source - https://github.com/peter-iakovlev/Telegram) and they don't even use
CFBundleTypeIconFiles
, they simply fall back to using the app icon. As to why it does not go full width like mine does I don't know. Next step, I uninstalled Telegram and my app so now it tried to open my custom file in Slack. That icon also looks good. Next step. I removed the files from withinCFBundleTypeIconFiles
on my app. It places the app icon in the image ... and it looks good on iOS 11! It is not full width. Next step. I installed on a device running iOS 10 and it also looks good. Conclusion. It is not a Titanium issue, it is an Apple iOS 11 issue. I have a solution now so I think we can mark this one as closed.Closing per developer comments.