


Open the screenshot in Preview, toggle edit mode and use the rectangle select to draw a rectangle over your app icon. Once the app is running and you can see your app icon displayed on the screen, take a screenshot of the simulator. I am running on an iPad so I have a display big enough to fit the entire app icon on the screen.
USING APPICON IN XCODE PRO
Modify your Swift UI app to simply display only your app icon and run your app on the iPad Pro simulator. At the time of writing, running a live preview in Xcode will not provide a surface with the fixed width and height layout we have set, so we will need to run this on an iPad simulator. Now that we have our icon designed in Swift UI, we need to create an image asset which can be sized appropriately for our icons. Import SwiftUI struct AppIcon : View Create the reference icon image We will setup a preview to display the Swift UI view at an appropriate size. Since I will be using an iPad Pro (12.9-inch) (5th generation) to render the icon for screenshotting, which is a retina 2x device, I will be using a point size of 512 for my icon size. We will first setup our preview to display a surface of an appropriate size for use to draw our app icon.Ĭreate a new Swift UI view file to serve as your app icon. We want the reference image for our app icon to be a square 1024x1024 pixels. I was unable to find a concise and complete guide, so I developed this one. When I started thinking about the app icon I was inspired by the UI I was working on, and I started searching for a way to create an app icon using Swift UI. I have been developing my app, Paraideas, exclusively in Swift UI and I created some nice custom view components that look beautiful on the iPhone. Why use Swift UI to create your app iconĪs a developer, I have been getting joy from learning Swift UI and trying out a new framework. It’s very easy to create an app icon for your iOS app using Swift UI, but this process is not a native part of Apple development and you will need to use a few tricks to get image assets that can be used for you Xcode project and the App Store.
