Search code examples
xcodexamarinxamarin.formsxamarin.iosapp-store-connect

How to include all icons in Xamarin.iOS / Xamarin.Forms IAP for App Store app icon A/B test?


I'm trying to run app icon A/B test on App Store, but other icons are not displayed on "Product page Optimization" page.

As I see on the Internet, ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS should be turned on in Xcode to include all icons. But as for Xamarin, there is no target build setting that would help to build archive with icons included.

I tried various methods, like inserting icons manually inside ipa, adding mtouch arguments, passing --include-all-app-icons, etc...

But looks like I have to do something that would make archive include these icons. I just don't know what can help here

enter image description here

enter image description here


Solution

  • I found a hackish way to do that:

    1. Add icons you want to test alongside with other png resources in the name pattern - "{name}[email protected]" and "{name}[email protected]". See attached screenshot. enter image description here
    2. Add icons as app icon assets
    3. Compile release build.
    4. Make an Archive (I'm doing it with Rider)
    5. During the Archive build, there is a step where Resources are included, but they ignore to add our alternative icons. So we need to run this step manually, with an argument we need to add. So the command in the terminal looks like this:

    /usr/bin/xcrun actool --errors --warnings --notices --output-format xml1 --output-partial-info-plist /Users/y.babii/Documents/GitHub/WhatIsUkraine/src/WhatIsUkraine.iOS/obj/iPhone/Release/actool/partial-info.plist --app-icon AppIcon --include-all-app-icons --alternate-app-icon "AppIcon_1" --compress-pngs --target-device iphone --minimum-deployment-target 13.0 --platform iphoneos --compile /Users/y.babii/Documents/GitHub/WhatIsUkraine/src/WhatIsUkraine.iOS/obj/iPhone/Release/actool/bundle /Users/y.babii/Documents/GitHub/WhatIsUkraine/src/WhatIsUkraine.iOS/obj/iPhone/Release/actool/cloned-assets/Resources/Media.xcassets

    Note: It's ok that we only mention AppIcon_1, the rest will be included as well.

    1. Make an Archive again
    2. Open the new Archive inside Xcode. (just double click on it from Finder)
    3. Build an IPA and send it to App Store Connect via Xcode.
    4. You can check if icons are included in the build by creating a new version on App Store Connect, attaching the build and checking included assets (click on the icon, then it should open a carousel with other icons). See attached screenshot. enter image description here