How to create custom Document Icon in iOS 14 apps

0 votes

I am trying to create a custom document icon for my multi-platform (iOS 14 - macOS Big Sur) app.

So, for macOS, it's pretty easy, I can either attach a legacy icon, or better, supply a combination of background, image and text, to composite a document icon, as described in macOS Document Icon Human Interface Guidelines.

So, in Info.plist, the UTExportedTypeDeclarations would contain a UTTypeIcons key like the following:

        <key>UTTypeIcons</key>
        <dict>
            <key>UTTypeIconBackgroundName</key>
            <string>Icon Fill</string>
            <key>UTTypeIconBadgeName</key>
            <string>Icon Image</string>
            <key>UTTypeIconText</key>
            <string>Dapka</string>
        </dict>

Now, the real challenge is in the iOS document icon. First, there are no updated documentation. Second, I couldn't do it like I did with macOS. Here, I should only supply one image, so I uploaded it as PNG in Resources folder, and then modified the UTExportedTypeDeclarations in Info.plist as following:

        <key>UTTypeIconFiles</key>
        <array>
            <string>Document Icon</string>
        </array>

But, the icon didn't appear correctly, it appeared as a centered image with white background, and no text.

Any ideas?


 

Nov 30, 2022 in Mobile Development by gaurav
• 23,260 points
488 views

1 answer to this question.

0 votes
Tap Add to Home Screen and select the icon next to your shortcut under Home Screen Name and Icon. In the pop-up window that appears, select File, Photo, or Take Photo. You can crop an image to customize what will show, but happily, the image needn't be square or a specific size. Tap Add > Done.
answered Dec 15, 2022 by gaurav
• 23,260 points

Related Questions In Mobile Development

0 votes
0 answers
0 votes
0 answers

How to draw heart shape in UIView (iOS)?

I want to create different shapes. Below ...READ MORE

Nov 10, 2022 in Mobile Development by gaurav
• 23,260 points
464 views
0 votes
0 answers

How to fetch the width and height of a programatically added view in Swift/ iOS?

I have added a UIView and a ...READ MORE

Nov 10, 2022 in Mobile Development by gaurav
• 23,260 points
821 views
0 votes
0 answers

How to get original image when we zoom in and zoom out the image in ios

Hi i am beginner in ios and ...READ MORE

Nov 17, 2022 in Mobile Development by gaurav
• 23,260 points
510 views
0 votes
1 answer

Get User Group in Swift using AWS Cognito

The groups are exposed in the ID ...READ MORE

answered Nov 12, 2018 in AWS by Priyaj
• 58,090 points
1,389 views
0 votes
1 answer

URL Scheme for iOS Home App

I think you could try doing it ...READ MORE

answered Nov 16, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
998 views
0 votes
1 answer

iOS App : Porting Code to App

If you make a post, missing parameters ...READ MORE

answered Jan 18, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
462 views
0 votes
1 answer

swift for windows? xcode on windows? ?

Hi, @Aminegac, If you’re a little more technically ...READ MORE

answered Dec 4, 2020 in Others by Nikita
1,483 views
0 votes
1 answer

How to get the user's country calling code in iOS?

Import Statement : #import<CoreTelephony/CTCarrier.h> #import <CoreTelephony/CTTelephonyNetworkInfo.h> you can get country ...READ MORE

answered Dec 15, 2022 in Mobile Development by gaurav
• 23,260 points
915 views
0 votes
1 answer

Flutter project in iOS emulator takes forever to run, but its worked on Android emulator

Try flutter clean and flutter build ios ...READ MORE

answered Nov 18, 2022 in Mobile Development by gaurav
• 23,260 points
463 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP