简体   繁体   中英

Xamarin.Forms can't change Application Icons in Xamarin.iOS on local device

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://docs.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:

在此处输入图像描述

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://docs.microsoft.com/en-us/xamarin/cross-platform/troubleshooting/questions/component-storage

What have I missed?

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.

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.

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?

在此处输入图像描述

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

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM