Skip to content

Developing a Maui Blazor MacCatalyst app for Apple macOS store is a terrible experienceΒ #12293

Closed

Description

@Jinjinov

Description

There are many things that could be better.

Developing a MacCatalyst app:

    <EnableCodeSigning>True</EnableCodeSigning>
    <CodesignKey>3rd Party Mac Developer Application: Jinjinov (**********)</CodesignKey>
    <EnablePackageSigning>true</EnablePackageSigning>
    <PackageSigningKey>3rd Party Mac Developer Installer: Jinjinov (**********)</PackageSigningKey>

Publishing a MacCatalyst app on Apple macOS store:

  • rejected when trying to upload with Transporter: The product archive package's signature is invalid. Ensure that it is signed with your "3rd Party Mac Developer Installer" certificate. A commented section in csproj that the developer could un-comment would be helpful here.

  • rejected when trying to upload with Transporter: The product archive is invalid. The Info.plist must contain a LSApplicationCategoryType key, whose value is the UTI for a valid category. For more details, see "Submitting your Mac apps to the App Store". Some indication in Visual Studio would be helpful here. I had to add:

	<key>LSApplicationCategoryType</key>
	<string>public.app-category.productivity</string>
  • rejected when trying to upload with Transporter: Invalid bundle. The bundle supports arm64 but not Intel-based Mac computers. Your build must include the x86_64 architecture to support Intel-based Mac computers. A commented section in csproj that the developer could un-comment would be helpful here: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers>

  • rejected when trying to upload with Transporter: Invalid Bundle. The key UIDeviceFamily in the app's Info.plist file contains one or more unsupported values '1'. (ID: e98a0fc1-d792-4b2d-854c-51a5d1649c82) I had to change

	<key>UIDeviceFamily</key>
	<array>
		<integer>1</integer>
		<integer>2</integer>
	</array>

to

	<key>UIDeviceFamily</key>
	<array>
		<integer>2</integer>
	</array>
  • rejected when trying to upload with Transporter: App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list Adding a Platforms/MacCatalyst/Entitlements.plist file and <CodesignEntitlement>Platforms/MacCatalyst/Entitlements.plist</CodesignEntitlement> inside csproj would be helpful here. I had to add:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>com.apple.security.app-sandbox</key>
    <true/>
  </dict>
</plist>

Steps to Reproduce

  1. Create a new Maui Blazor project
  2. Try to publish a Maui Blazor MacCatalyst app on Apple macOS store

Link to public reproduction project repository

https://github.com/Jinjinov/Ididit

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

macOS Ventura 13.1

Did you find any workaround?

No response

Relevant log output

No response

Activity

  1. akhanalcs commented on Dec 24, 2022

    @akhanalcs

    Microsoft should document all the issues and solutions you figured out. And hopefully make the whole experience better.
    This was a great post. Thank you!

  2. added
    area-publishingIssues with the app packaging/publishing process (ipk/apk/msix/trimming)
    and removed
    area-blazorBlazor Hybrid / Desktop, BlazorWebView
    on Dec 27, 2022
  3. added
    p/1Work that is important, and has been scheduled for release in this or an upcoming sprint
    and removed
    p/1Work that is important, and has been scheduled for release in this or an upcoming sprint
    on Feb 3, 2023
  4. added this to the Backlog milestone on Feb 17, 2023
  5. rachelkang commented on Feb 17, 2023

    @rachelkang
    Member

    @rolfbjarne thoughts on any of these issues here?

  6. rolfbjarne commented on Feb 22, 2023

    @rolfbjarne
    Member

    This is great feedback! Thanks a lot!

    • adding signing to csproj results in error MSB6006: "codesign" exited with code 3.

    I'm not sure what caused this, a binlog would likely be nice to diagnose.

    Publishing a MacCatalyst app on Apple macOS store:

    • rejected when trying to upload with Transporter: Invalid bundle. The bundle supports arm64 but not Intel-based Mac computers. Your build must include the x86_64 architecture to support Intel-based Mac computers. A commented section in csproj that the developer could un-comment would be helpful here: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers>

    Mac Catalyst will default to a universal (arm64+x64) build when building for a Release configuration (and just x64 for all other configurations).

    But yes, we can add a comment to the templates as well.

    For most of the other publishing issues I filed dotnet/macios#17591 to improve our templates and build logic. @rachelkang you might want to update your MAUI templates as well.

  7. brightertools commented on Mar 1, 2023

    @brightertools

    I am also trying to deploy to macOs and get things running.

    This issue has helped me sign and get the app into TestFlight and distribute for testing.
    dotnet/docs-maui#1187

    Our app is a .net7.0, (non Blazor) MAUI app for windows/macOs, compiled on Monterey Intel mac and but crashes on another machine (Ventura M1 arm mac), this is all I have to test at the mo, so trying to work that out.

  8. 72 remaining items

  9. mike3sullivan commented on Jul 10, 2023

    @mike3sullivan

    Apparently there is a bug in ILStrip on MacOS that can affect some functions (a DateTime.TryParse in my case).
    dotnet/runtime#85414 (comment)

    The workaround is to disable ILStrip via the project file:
    false

    Include this until they fix the problem, or who knows what might not work properly.

  10. brightertools commented on Jul 10, 2023

    @brightertools

    Apparently there is a bug in ILStrip on MacOS that can affect some functions (a DateTime.TryParse in my case). dotnet/runtime#85414 (comment)

    The workaround is to disable ILStrip via the project file: false

    Include this until they fix the problem, or who knows what might not work properly.

    Hi @mike3sullivan

    I have tried this via TestFlight, upload no. 59 :) but unfortunately hasn't had any visible results in this case, I do appreciate your reply and is good to know for future ref (and leaving it in for now)

    I am contemplating making the repo public, and hesitant to reach out to individuals, I appreciate these are not all your problems....but certainly running out of logical options...

    I can outline a few things in the app that might highlight anything to check:

    1. Connects to a WebAPI
    2. Settings are retrieved/saved via IPreferences
    3. Using SignalR
    4. Using Community Toolkit MVVM
    5. Using a Telerik RadItemsControl with a standard custom ContentView
    6. Using Telerik RadComboBox
    7. Using gradients in the UI
    8. Using images in the UI
    9. Using IDeviceInfo
    10. Using IDeviceDisplay
    11. Using IFileSaver (community toolkit)
    12. Using IFolderPicker (community toolkit)
    13. Using NLog Maui (and sending logs via email as I don't know where the Maui logs go)
    14. All Work on Windows, released to Windows Store

    (issues existed before Telerik controls added)

  11. modified the milestones: .NET 8, .NET 8 GA on Jul 12, 2023
  12. dustin-wojciechowski commented on Jul 27, 2023

    @dustin-wojciechowski
    Contributor

    @brightertools Would you mind making a new issue (if you haven't already) for your issue with the XAML page not rendering so that we can take a look at it a bit more closely?

  13. brightertools commented on Jul 30, 2023

    @brightertools

    I started removing a load of things from the UI, until I remove all the Telerik Controls, I was using the latest version of the controls, but had to set a specific MAUI version in the project file. I was then able to see the UI, although still had issues with data loading etc..

    It turns out Windows is much more forgiving when it comes to the ViewModel reference and bindings, I had to specifically set page/controls names, data types etc and carefully look at all the bindings. Also loading images (in my case via url) in item lists views (built in MAUI or Telerik controls) uses loads of memory, so watch image size served form the web.

    I still have issues with the file selection and saving, still looking at that and have no idea where MAUI specific Nlog Logs go, but used an email target to debug (via testflight) which worked better than nothing.

  14. dustin-wojciechowski commented on Sep 20, 2023

    @dustin-wojciechowski
    Contributor

    Hello,

    We have tried our best to alleviate as much of these issues as we had in our power to do. I encourage all developers developing Maui Blazor applications for MacCatalyst for the Apple MacOS store to give publishing another shot with the upcoming .NET 8 release. And of course, if any problems occur, please feel free to create a new issue so we can look at it.

    Happy developing!

  15. Jinjinov commented on Sep 20, 2023

    @Jinjinov
    Author

    Hello @dustin-wojciechowski

    Thank you for looking into this. I gave up trying to publish with .NET 7 and it was my intention to try again with .NET 8 so your announcement is really welcome.

    I will give it another try with .NET 8

  16. brightertools commented on Sep 20, 2023

    @brightertools

    Hello,

    We have tried our best to alleviate as much of these issues as we had in our power to do. I encourage all developers developing Maui Blazor applications for MacCatalyst for the Apple MacOS store to give publishing another shot with the upcoming .NET 8 release. And of course, if any problems occur, please feel free to create a new issue so we can look at it.

    Happy developing!

    This is appreciated and will certainly try this..

    To get the MacOs working has been very time consuming, We are developing for both MacOs and Windows desktop.. learning that Visual Studio Mac is going to be discontinued was pretty bad news since we use Visual studio for both Mac and Windows on this project. I fear more time will be spent trying to re-discover what doesnt work in VS-Code and who knows how seamless the migration will be, not to mention now having to work with either VS-Code for Mac and Visual Studio for windows or having to start setting up and using VS-Code for windows to make that seamless... its just feels like the MacOs 'terrible experience' is going to continue for some time?

    Please consider the migration paths to XCode and also working on the same project with XCode and Visual Studio. Thanks.

    which makes me thinks, is XCode going to replace Visual Studio on PC as well, at some point?

  17. ghost locked as resolved and limited conversation to collaborators on Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

User StoryA single user-facing feature. Can be grouped under an epic.area-publishingIssues with the app packaging/publishing process (ipk/apk/msix/trimming)p/1Work that is important, and has been scheduled for release in this or an upcoming sprintpartner/maciosIssues for the Mac / iOS SDKplatform/macosmacOS / Mac Catalystt/bugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions