-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Maui Rc1 and .net 7 app crashes if you have entitlements #17714
Comments
Are the entitlements matched in the provisioning profile? |
yes. they do . but I might be missing a step and I just want to make sure - what I am doing is correct.
How do I check that they match.. I am asking the obvious in case I am missing the obvious many thanks |
You can run |
Just confirming, this is an issue on an iPhone plugged into a Windows PC? Or is this the Pair to Mac deploy? |
@rolfbjarne Does the hot restart app support custom entitlements? |
@mattleibow its an iPhone plugged to a windows pc |
Hi wondering if this gets any attention - how can we possible work in a debug environment ? This is very basic requirement. |
No, as far as I can tell Hot Restart doesn't support custom entitlements. CC @emaf do we have an issue for supporting custom entitlements with Hot Restart elsewhere? |
@rolfbjarne We do execute |
What about plists in the app? |
The entitlements are used when signing the app: but Hot Restart aren't using them when signing for Hot Restart: |
@rolfbjarne The codesign code is internally looking for the entitlement file saved into the pre-built app bundle which is where the CompileEntitlements task is saving the compiled entitlements file. There sill be a bug but it looks everything needed for this to work is there. @gabsamples6 Could you share device logs after reproducing the app crash? You can open the device logs from |
@emaf <key>aps-environment</key>
<string>development</string> or with <key>get-task-allow</key>
<false/> log will say " a valid provisioning profile was not found "
however if have the following full mapped and get-task-allow=true it will compile and run <dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<string>*</string>
<key>application-identifier</key>
<string>xxxxx.uk.co.mycompany.demo</string>
<key>keychain-access-groups</key>
<array>
<string>xxxxxxx.*</string>
<string>com.apple.token</string>
</array>
<key>get-task-allow</key>
<true/>
<key>com.apple.developer.team-identifier</key>
<string>xxxxx</string>
</dict> This might all down to me not understanding how it should work. To clarify when debugging do I need an entitlement file with all the stuff above in order to work? I dont think this was the behavior in xamarin but happy to be just told how is meant to work. But then when deploying for real my pipeline has to change the aps-environment to Production and get-task-allow to false. hope that helps and will close or you close , but please clarify for me. thank you very much |
@gabsamples6 I think most of those should be automatically added to the final entitlements file by the build process based on the information on your provisioning profile, so it should not be necessary for you to add things like the team identifier. Please @rolfbjarne correct me if I'm wrong. @gabsamples6 Could you leave on your entitlement just the aps-environment entry, reproduce the deployment error, and then attach the Entitlements.plist located under |
I believe this is correct, these are the entitlements that can be automatically added from a provisioning profile (which are added depends on the provisioning profile in question, but I believe application-identifier and team-identifier are always there): https://github.com/xamarin/xamarin-macios/blob/d7b35c2dc32830d96203ccaf29dfabfc8962c2c6/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileEntitlementsTaskBase.cs#L17-L43. |
Hi @gabsamples6. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
Description
Added anything inside the Entitlement crashes the app and you can no longer debug (windows pc - hotrestart)
Am I missing something obvious?
Attached file below
MauiWithEntitlements.zip
Steps to Reproduce
Remove any text from entitlements and it builds and deploy..
Link to public reproduction project repository
see below
Version with bug
8.0.0-rc.1.9171
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
VS 2022 any version
Did you find any workaround?
no
adding below did not help
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-ios|AnyCPU'"> <CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-ios|AnyCPU'"> <CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements> </PropertyGroup>
Relevant log output
No response
The text was updated successfully, but these errors were encountered: