My app is setup to add a banner to the app icon based on the configuration being build. It was done following these steps.
https://www.raywenderlich.com/105641/change-app-icon-build-time
As of Xcode 9/iOS 11, this doesn't seem to work anymore. The images are still correctly being modified and they exist in the app bundle, but they are not being used as the app icon on the device.
Is there any way to do this again?
In the Project navigator, select an asset catalog. Click the Add button (+) at the bottom of the outline view. In the pop-up menu, choose a platform, and select [OS] App Icon. Xcode creates a new app icon set with the name AppIcon .
Tap on the icon under Home Screen Name and Icon. You'll have the choice of either taking a photo, choosing a photo, or choosing a file. Assuming you've already saved an image in Photo, tap on Choose Photo and select the photo you want to use.
Here's the solution I ended up going with.
Assets.xcassets
xcassets
for each configuration that needs a custom icon. I named them AppIcon-{CONFIGUATION}.xcassets
AppIcon.xcassets
file for release builds.Excluded Source File Names
$(SRCROOT)/$(PRODUCT_NAME)/AppIcon*.xcassets
Included Source File Names
, customizing for each configuration as needed.$(SRCROOT)/$(PRODUCT_NAME)/AppIcon-Debug.xcassets
This will cause the built application to only include the app icon assets for configuration being built. This can also be extended to other assets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With