dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.98k stars 1.71k forks source link

Can not launch app after adding Entitlements.plist for MacCataylst #23548

Open Onotseike opened 1 month ago

Onotseike commented 1 month ago

Description

Hello, I added an Entitlements.plist in accordance with the directions in this Add Entitlement to MacCatalyst. However, I could not use the VS for Mac since it is deprecated. I added the following code to my csproj file

 <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-maccatalyst|AnyCPU'">
      <EnableCodeSigning>True</EnableCodeSigning>
      <CodesignKey>Apple Development: onotseike@outlook.com (6SQ97WKYTS)</CodesignKey>
      <CodesignProvision>Automatic</CodesignProvision>
      <CodesignEntitlements>Platforms\MacCatalyst\Entitlements.plist</CodesignEntitlements>
 </PropertyGroup>

But when I try to run my code I get the following error:

MAUI/bin/Debug/net8.0-maccatalyst/maccatalyst-arm64/MoonLight.MAUI.app The application cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x6000016b4450 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}

I am unsure of how to proceed and could the documentation for MacCatalyst be updated to reflect the current state of how to add a custom entitlement for maccatalyst?

I have attached my csproj in zipped file MoonLight.MAUI.csproj.zip

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 1 month ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

kevinxufei commented 3 weeks ago

Hi,@Onotseike I'm sorry that I can't repeat your question according to this operation. Could you please upload a sample project for our investigation? Looking forward to your reply. Thank you!

jfversluis commented 4 days ago

Yeah these docs still need updating, see here.

Could you try to make the path just <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>?

Onotseike commented 16 hours ago

Yeah these docs still need updating, see here.

Could you try to make the path just <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>?

Thank you, that worked.