.Net MAUI app fails to deploy only to remote iPhone

Adrian Lewis 20 Reputation points
2025-03-25T14:54:13.4066667+00:00

I have a .Net Maui app (9.0.14) built in vs2022 (updated to 17.13.4 today) on WIndows 11 Pro, which works fine on local dev machine, in ios simulator, android simulator and windows machine. I'm frustrated that I can't get the app icon to display if I deploy to a local iPhone (it always shows the default purple .Net icon) even though it works fine on the simulators, as I want to demo it to some people. So I try to deploy to iphone connected to paired Mac. The device shows up correctly, but when I build in VS2022 I get the following message:

clang++ exited with code 1: ld: file is empty in '.../Program Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/9.0.3/runtimes/ios-arm64/native/libmono-component-marshal-ilgen-static.a' clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Can anyone help here? This has been happening ever since I first tried it weeks ago. I've been waiting to see whether any "updates" might fix the problem, so I'm now running Xcode 16.2, Sequoia 15.3.2 etc. However, this failure was occurring on all previous versions

I'm running VS2022 on a Surface PRO with an Intel Core Ultra 7 266V 2.20 GHz processor and Windows 11 Pro. I just spotted the "ios-arm64" part of the "empty file", and am assuming it refers to the target phone device and is not a remnant of the Snapdragon processor I used to use, but got rid of very quickly?

Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Cliff 1 Reputation point MVP Volunteer Moderator
    2025-03-26T23:26:08.72+00:00

    For the logo when you deploy from a dev machine rather than from the store/testflight the app is deployed using HotRestart and this deploys an empty shell app which is then filled with your code and app. The issue your seeing is that the shell app has the icon set to the .NET logo. You can read more here https://learn.microsoft.com/en-us/dotnet/maui/ios/hot-restart?view=net-maui-9.0


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.