Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25364] iOS: CFBundleTypeIconFiles not used in iOS11

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionNot Our Bug
Resolution Date2019-05-06T21:48:18.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsios, regression
ReporterRaef Akehurst
AssigneeUnknown
Created2017-10-03T03:20:14.000+0000
Updated2019-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

FileDateSize
IMG_0086.JPG2017-10-03T03:15:16.000+00001174618
IMG_0087.JPG2017-10-03T03:12:20.000+00001189123

Comments

  1. Hans Knöchel 2017-10-03

    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?
  2. Raef Akehurst 2017-10-03

    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 within CFBundleTypeIconFiles 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.
  3. Alan Hutton 2019-05-06

    Closing per developer comments.

JSON Source