I found that the AppIcon of Xcode14 is more convenient. So I want to use SwiftUI to test it in the Xcode14.
- Interface: SwiftUI
- Language: Swift
- Xcode: 14
We can found that when we click the button, the icon changes.
In the picture we can see that there is only 1024*1024px
in AppIcon of Xcode14. Wow, that’s so easily in the Xcode14. So now we only need to prepare a few 1024*1024px
pictures. Just like this:
But if we want to use multiple AppIcons, we need modify the setting in the Build Setting
. In the Search Bar filled the text: include all
. Then we can see Key: Include All App Icon Assets, make it as Yes.
Then we begin to write the code. All my code is in the picture. And you can also copy the code directory in the bottom.
Why did I add an alert in the last Text? When an error window pop up, you can customize the message content.
If your system is not in English, you will find that the pop-up message is always in English. So we need to set internationalization. In the TARGETS, then go to Info, add a Key: Localized resources can be mixed, Value: YES.
|
|