mklieber
mklieber

Reputation: 192

Xamarin Forms iOS Build Release Build missing AppIcons

In my Xamarin Forms project (Visual Studio for Mac) I get the following error when I switch to Release-Build:

Error: System.IO.FileNotFoundException: /Users/mklieber/Projekte/bosig-acoustic-app/App/App.iOS/obj/iPhone/Release/actool/bundle/[email protected] does not exist

Output:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(489,3): error : System.IO.FileNotFoundException: /Users/mklieber/Projekte/bosig-acoustic-app/App/App.iOS/obj/iPhone/Release/actool/bundle/[email protected] does not exist
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(489,3): error : File name: '/Users/mklieber/Projekte/bosig-acoustic-app/App/App.iOS/obj/iPhone/Release/actool/bundle/[email protected]'
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(489,3): error :   at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x00193] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-10/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/File.cs:111 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(489,3): error :   at Xamarin.MacDev.Tasks.SmartCopyTaskBase.CopyFile (System.String source, System.String target, System.String targetItemSpec) [0x00030] in <495eb6424ad84352b6b2ce90deac218a>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(489,3): error :   at Xamarin.MacDev.Tasks.SmartCopyTaskBase.Execute () [0x000e7] in <495eb6424ad84352b6b2ce90deac218a>:0 
    0 Warnung(en)
    1 Fehler

This is the AppIcon:

AppIcon

The icon is present (third from top) and will be copied in debug build:

Release build

In release build the icon is missing:

Debug build

This is what I already tried:

Any ideas on this issue?

Upvotes: 3

Views: 1529

Answers (2)

A. Qasim
A. Qasim

Reputation: 1

In my case,

  1. I have generated App Icons using jpeg image from https://appicon.co/.
  2. When I extracted that Icon zip file, there were Icons in PNG format.
  3. After attaching these Icons in Asset Catalog file and then building source was giving me this error.
  4. I converted jpeg format to png and also changed 300 dpi to 96 dpi using photoshop.
  5. I generated Icons again using png Icon from https://appicon.co/ and tried attaching and rebuilding solution. And it worked for me.

Upvotes: 0

mklieber
mklieber

Reputation: 192

I solved the issue by recreating all app icons with the appropriate size and, very important, with a dpi of 96. The reason why the error occurs seems to cohere with the dpi of the image, some of my app icons had a dpi of 300.

Upvotes: 2

Related Questions