question

42315514 avatar image
0 Votes"
42315514 asked WenyanZhang-MSFT edited

Which icon image sizes should I add to Assets.xcassets if I want to release my game for iPhones and iPads in the Apple App Store?

I have already created different icon image(.png files) sizes with an icon generator tool. But I don't know which icon image sizes that I should add to Assets.xcassets if I only want to release my game for iPhones and iPads in the Apple App Store. In addition, I want to use my icon in LaunchScreen.storyboard.

Which icon sizes should I add to Assets.xcassets? Is it necessary to add all icon images to Assets.xcassets, even the icons for CarPlay, Apple Watch and Mac?
Which is the best icon size for LaunchScreen.storyboard? I want to place my icon in the center of the launchscreen.

My Assets.xcassets in Visual Studio for Mac:

dAv8FVm

QEVRiSA


dotnet-ios
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

WenyanZhang-MSFT avatar image
0 Votes"
WenyanZhang-MSFT answered WenyanZhang-MSFT edited

Hello,

Welcome to our Microsoft Q&A platform!

The picture you uploaded about your Assets.xcassets in Visual Studio for Mac did not load, I 'm afraid you could upload again.

Which icon sizes should I add to Assets.xcassets?

The following icon size is necessary:

  • 20 * 20 pt (20*20px , 40*40px and 60*60px)

  • 29 * 29 pt (29*29px, 58*58px and 87*87px)

  • 40 * 40 pt (40*40px, 80 *80px and 120*120 px)

  • 60 * 60 pt(120*120px and 180*180px)

  • 76 * 76 pt(76*76 px and 152*152 px)

  • 83.5* 83.5pt(167*167px)

  • 1024 * 1024pt(1024*1024px)

Please pay attention to the @1x, @2x, @3x picture and unticking the Alpha channel.

Is it necessary to add all icon images to Assets.xcassets, even the icons for CarPlay, Apple Watch and Mac?

If your app is only for iPhones and iPads, it's not necessary to add all icon images.


Which is the best icon size for LaunchScreen.storyboard? I want to place my icon in the center of the launchscreen.

If you want to add the icon into launch screen, I advice you to desigin a new size. You also could use the 1024 one, it depends on how to display.
For example, you could try to add an ImageView to the ViewController, then add constraints to the ImageView, setting centerY and centerX , setting it own aspect 1:1, setting the leading and trailing to Safe Area.
In this way, the picture will be displayed in the center with the same width and height, and the specific size of the picture depends on the size of the different screens.

For more information, you could refer to
https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/app-icons?tabs=macos https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/launch-screens?tabs=macos

Best Regards,
Wenyan Zhang


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have a few problems with the launch screen and I don't know if I set up the constraints correctly. I don't know where I can find the leading and trailing to Safe Area. Where can I find these settings?
In addition, my logo is not rotating when I switch from portrait to landscape mode in Xcode. Is it normal that the image is not rotating in Xcode when I change the orientation from portrait to landscape or are my settings not correct?
The size of my image is 320x480px.

My image constraints settings:
154438-bildschirmfoto-2021-12-02-um-144614.png
154503-bildschirmfoto-2021-12-02-um-144630.png
Image settings:
154410-bildschirmfoto-2021-12-02-um-144717.png
154521-bildschirmfoto-2021-12-02-um-144742.png


0 Votes 0 ·

This way you set is also feasible. It means that this Imageview is always 320*480 and displayed in the center.

I don't know where I can find the leading and trailing to Safe Area

In the first picture you provided, 27 means leading and trailing, 164 means top, 174 means bottom.

Is it normal that the image is not rotating in Xcode when I change the orientation from portrait to landscape or are my settings not correct?

Yes, it is nomal in this way. The width of Imageview is 320 and height is 480 when you change the orientation from portrait to landscape. I'm not sure if you want to rotate the Imageview, if so, you need to set it in another way. I'm afraid you could create a new thread for it.

Rrefer to
https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithConstraintsinInterfaceBuidler.html#//apple_ref/doc/uid/TP40010853-CH10-SW1

0 Votes 0 ·