Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Icon not visible on macOS version < 10.11 #4588

Closed
hadihashem opened this issue Aug 7, 2018 · 12 comments
Closed

App Icon not visible on macOS version < 10.11 #4588

hadihashem opened this issue Aug 7, 2018 · 12 comments
Labels
macOS Issues affecting Xamarin.Mac support The issue is related to support
Milestone

Comments

@hadihashem
Copy link

Steps to Reproduce

  1. Unzip and open the attached project
  2. Generate package file
  3. Install and run the package file on macOS 10.10 then on 10.13

You can also use the attached package file
HijriMiladi.zip

Expected Behavior

See the same App Icon in all macOS versions at least macOS 10.10 and macOS 10.13

Actual Behavior

The App Icon on 10.10 doesn't show-up and the default Blanc Project App Icon is shown instead
The problem doesn't show-up on macOS versions > 10.10

Environment

=== Visual Studio Enterprise 2017 for Mac ===

Version 7.5.4 (build 3)
Installation UUID: 5096a32d-26a8-484d-afb9-bd8de58a300f
Runtime:
	Mono 5.10.1.57 (2017-12/ea8a24b1bbf) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)

	Package version: 510010057

=== NuGet ===

Version : 4.3.1.4445

=== .NET Core ===

Runtime : /usr/local/share/dotnet/dotnet
Version du runtime : 2.1.1
SDK : /usr/local/share/dotnet/sdk/2.1.301/Sdks
Version du SDK : 2.1.301
SDK MSBuild : /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version : 1.6.2
Emplacement : /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.4.1 (14161)
Build 9F2000

=== Xamarin.Mac ===

Version: 4.4.1.193 (Visual Studio Enterprise)

=== Xamarin.iOS ===

Version: 11.12.0.4 (Visual Studio Enterprise)
Hash: 64fece5f
Branch: d15-7
Build date: 2018-05-29 20:00:44-0400

=== Xamarin.Android ===

Non installé

=== Xamarin Inspector ===

Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 705040003
Git revision: 6ae731889c896d6733efb8ff5117f5bf5b17b509
Build date: 2018-07-19 13:07:45-04
Xamarin addins: 417fed09624e1e1f76ab0a11e8b97ffd8bbf91e1
Build lane: monodevelop-lion-d15-7

=== Operating System ===

Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
    Thu Jun 21 22:53:14 PDT 2018
    root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

Build Logs

build log.txt

Example Project (If Possible)

HijriMiladi.macOS.zip

Result on macOS 10.10
screenshot 10 10

Result on macOS 10.13
screenshot 10 13

@chamons
Copy link
Contributor

chamons commented Aug 7, 2018

When I launch the application on my VM it crashes right away:

$ /Applications//HijriMiladi.app/Contents/MacOS/HijriMiladi 
2018-08-07 10:43:16.117 HijriMiladi[435:5108] 
Unhandled Exception:
System.InvalidOperationException: You MUST invoke LoadApplication () before calling base.FinishedLaunching ()
  at Xamarin.Forms.Platform.MacOS.FormsApplicationDelegate.DidFinishLaunching (Foundation.NSNotification notification) [0x00036] in <809f13ed1a394bccbc4370f307bd5c6d>:0 
  at HijriMiladi.AppDelegate.DidFinishLaunching (Foundation.NSNotification notification) [0x00022] in <3a055d71ae4a494da227eae5b2ad77ab>:0 
  at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain(int,string[])

Maybe that's causing the issue? Can you produce a copy that doesn't crash on launch?

@chamons chamons added the need-info Waiting for more information before the bug can be investigated label Aug 7, 2018
@hadihashem
Copy link
Author

hadihashem commented Aug 7, 2018

Hi @chamons
I had to downgrade my app by hiding all features, in order to create the Sample project
That's why it is crashing down
I confirm that the issue is only with the App icon (therefore build procedure) and not related to the App execution

@VincentDondain VincentDondain added this to the Future milestone Aug 7, 2018
@chamons
Copy link
Contributor

chamons commented Aug 7, 2018

Could you create a new Xamarin.Mac application and configure the icons to be the same as your application?

Without a non-crashing sample, or an idea how you are setting up icons, it will be extremely difficult to pin this down.

@hadihashem
Copy link
Author

I set the icons the same was as it is described here:
https://docs.microsoft.com/en-us/xamarin/mac/deploy-test/app-icon

But I recreated a non-crashing sample for you
Hopefully this will help

Project:
HijriMiladi.macOS.zip

Package:
HijriMiladi.pkg.zip

App:
HijriMiladi.zip

Build Log:
Build Log.txt

@chamons
Copy link
Contributor

chamons commented Aug 7, 2018

I do not believe you are following the steps listed here:

https://docs.microsoft.com/en-us/xamarin/mac/deploy-test/app-icon#packaging-the-icon-resources

as I opened up your project and the Assets.xcassets is empty and there is a Resources\AppIcon folder ?!

@hadihashem
Copy link
Author

actually Assets.xcassets is not empty but it contains only the Mac related icons
the folder Resources\AppIcon is simply a backup folder

zwischenablage01

@chamons
Copy link
Contributor

chamons commented Aug 8, 2018

Hmm, that's strange. It appears when I open your Assets.xcassets it doesn't open the AppIcon section by default and it shows up blank.

In any case, you should exclude the Resources\AppIcon folder and rebuild. That made it work for me.

@hadihashem
Copy link
Author

Does the icon appear on macos 10.10 after you rebuild?

@chamons
Copy link
Contributor

chamons commented Aug 8, 2018

I wouldn't have suggested the fix otherwise :)

screen shot 2018-08-08 at 11 26 28 am

@hadihashem
Copy link
Author

Okay will do so
Thank you

@chamons
Copy link
Contributor

chamons commented Aug 8, 2018

Please try it and if it works close this issue. If it doesn't, attach your new project.

@hadihashem
Copy link
Author

I confirm that excluding folder Resources\AppIcon or simply renaming it solved the issue
Thanks !!

@spouliot spouliot added the macOS Issues affecting Xamarin.Mac label Aug 20, 2018
@rolfbjarne rolfbjarne added support The issue is related to support and removed need-info Waiting for more information before the bug can be investigated labels Sep 3, 2018
@xamarin xamarin locked as resolved and limited conversation to collaborators May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
macOS Issues affecting Xamarin.Mac support The issue is related to support
Projects
None yet
Development

No branches or pull requests

5 participants