2

I have followed both the guide from Microsoft and the upvoted answer on SO to change my iOS Application Icons but it does not work for me.

https://learn.microsoft.com/en-gb/xamarin/ios/app-fundamentals/images-icons/app-icons?tabs=windows

https://stackoverflow.com/a/54806603/3850405

To replicate I have used Visual Studio 2019 16.9.2 -> new project Mobile App (Xamarin.Forms) with these settings:

enter image description here

After this I deployed to my local device, iPhone 12 Pro Max first using software version 14.4.1 and then 14.4.2.

The only Mac I have is an old Macbook Pro 13" mid 2012 with 2,5GHz Dual-Core Intel Core i5. It does have macOS Catalina 10.15.7 and working Xcode version but running an iPhone simulator is extremely slow and hard to test on. If I do use the simulator it will work on simulated iPhone 12 Pro Max iOS 14.4.

I have then replaced every image via file system or the GUI in Visual Studio for Asset Catalogs -> Assets (File system: Assets.xcassets\AppIcon.appiconset). When this did not work I added a new Asset Catalog and deleted the old one but it did not work either.

Info.plist says correct source under Visual Assets and App Icons.

If I change Application Name or Bundle Identifier in Info.plist the value is updated correctly. However If I try to edit Launch Screen under Launch Images that value is not updated either and only shows Xamarin original.

Even after creating a new project I have tried to clean the solution and remove every bin and obj folder for the projects.

Given that it happens in a new project I don't think cache has anything to do with it but I have tried to clear these folders already:

Windows comupter:

%LocalAppData%\Xamarin\

Mac:

~/Library/Caches/Xamarin/

When I cleared these folders I even had to log back in to Apple and get a new certificate via Automatic provisioning but I still don't get an updated icon.

https://learn.microsoft.com/en-us/xamarin/cross-platform/troubleshooting/questions/component-storage

What have I missed?

Ogglas
  • 62,132
  • 37
  • 328
  • 418
  • Hi, do you mean that changing application icon only works in simulator? – Junior Jiang Mar 30 '21 at 02:11
  • @JuniorJiang Yes – Ogglas Mar 30 '21 at 05:03
  • Did you try to uninstall the application then reinstall it on your device ? – Leo Zhu Mar 30 '21 at 07:24
  • @LeoZhu-MSFT Yes several times. Also tried to reboot the phone and downgrade Xamarin.Forms NuGet – Ogglas Mar 30 '21 at 07:39
  • @Ogglas It was probably an issue with the environment(Mac), if you could use other Macs to try, that will be better. https://stackoverflow.com/questions/61895597/xamarin-forms-ios-wrong-task-icon – Junior Jiang Mar 30 '21 at 08:16
  • @JuniorJiang I don't have access to another Mac but I installed `macOS Big Sur 11.0.1` as a virtual machine and the same things happens there. Seems to be something else. – Ogglas Mar 30 '21 at 16:05
  • I am currently encountering the same issue, the appicon changes fine and shows on a simulator, however, debugging to a phone doesn't change from the default app icon. Does anyone have a solution? – Reza Nov 08 '21 at 05:43
  • I have changed all the png and ico files in the Assets.xcassets and Resources folders. My Info.plist says the App Icons Source is Applcon and when I use the Solution Explorer to open the Assets catalog Applcon I was able to set the 3x icons to my icons, although I am not sure that is correct because the subtitle says iOS 5-12 and I am on iOS 15.1. Despite all this the app icon is still the default Xamarin icon and the same goes for the launch image. Surely there must be an easy way to manage this or at least some up-to-date documentation! Can anyone help? Thanks. – charles young Jan 09 '22 at 13:47

2 Answers2

1

This question describes my quandary except that instead of a new project I have finished an iOS project and am ready to deploy it to the app store. One of the last things I need to do is change the default Xamarin app icon to my own icon. I have studied the links of proposed solutions supplied in the question without success. I also find the proposed answer from Vladimir too inconvenient to try. There should be a solution that only involves VS on Windows. I am currently using VS 2022.

Update with success: It turns out that Vladimir's answer was on the right track after all! It was even harder that I thought though. I had an ancient Mac mini that my wife had discarded so I wiped it clean and installed the latest Mac OS, Xcode, and Visual Studio for Mac. Then began a more than week-long saga of trying to get the app provisioned, certificates installed in the keychain, and fighting many, many vague compiler and deployment errors.

If there was some simple advice to give I would say to use the Automatic Provisioning option in the Info.plist and also insure that the Bundle Identifier matches the name of the bundle created by the compiler, e.g. your project (iOS) name. With the Automatic Provisioning you don't have to create the certificate, the id, nor the profile on the developer.apple.com website. This feature will do that automatically.

After I finally got the app to deploy from my Mac the app icon and the launch screen are now correct! I am guessing that there is no real need for it to be anything but the Xamarin icon on the Windows side because it cannot be published without moving it to a Mac anyway. I just wish I had discovered that before wasting so many hours trying to get it to work with my phone plugged into the Windows laptop. The moral of the story is that for an iOS app the sooner you move to the Mac the better. What follows is the description of my original problem.

So here are images of my current setup where I have attempted to integrate my icon, both for the app icon and the launch screen. However, the Xamarin image stubbornly persists. See my γDog app in the lower right corner of the iPhone image.

Where is the Xamarin icon coming from? Is this perhaps just a debugging "feature" that will disappear when the app is deployed to the app store?

enter image description here

And here are the images of my settings and Info.plist

enter image description here

enter image description here

enter image description here

charles young
  • 2,269
  • 2
  • 23
  • 38
  • I have since followed the procedure for iOS in this video: https://www.youtube.com/watch?v=tbKrbv9h_ZE. Now all of the icons in the AppIcon asset are converted to my icon but it makes no difference. – charles young Jan 14 '22 at 16:39
0

If someone still need it. I solved it by following the next steps:

  1. Get any machine running MacOS (it would be easier if you have at least Mac Mini) - install XCode. 1a) IT IS IMPORTANT! Launch a dummy project on XCode. 2). Install Visual Studio 2019 on Mac. 3!!) If you are planning to develop your Xamarin project on PC then you also need to get PC. If not, just use Mac
  2. Install VS 2019 on PC and create Xamarin app. Launch it.
  3. Copy your Xamarin app on Mac and open on Visual Studio
  4. NOW, try to change your icons in Info.plist. (App icon and Loading screen). You must be asked to open the XCode for editing.