Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

CodesignEntitlements doesn't seem to work in project #23045

Closed
thedee opened this issue Jun 13, 2024 · 4 comments
Closed

CodesignEntitlements doesn't seem to work in project #23045

thedee opened this issue Jun 13, 2024 · 4 comments
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/iOS 🍎 s/needs-attention Issue has more information and needs another look t/bug Something isn't working

Comments

@thedee
Copy link

thedee commented Jun 13, 2024

Description

When trying to set the entitlements in the project the build pipeline doesn't seem to pick it up. What happens is I get the error:
"This app cannot be installed because its integrity could not be verfied"

In my Maui project I have this:

<PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
	<CodesignEntitlements>Platforms/iOS/Entitlements.prod.plist</CodesignEntitlements>
	<CodesignKey>iPhone Distribution: XXX (XXXXXXXX)</CodesignKey>
	<CodesignProvision>AdHoc Distribution</CodesignProvision>
	<UseInterpreter>true</UseInterpreter>
	<MtouchLink>SdkOnly</MtouchLink>
</PropertyGroup>

and in my pipeline I have this:

- task: CmdLine@2
    displayName: 'Build project'
    inputs:
      script: 'dotnet publish -f net8.0-ios -c Release'

The ipa gets created but I get the error I listed above.

If I change my pipleline to this it works and runs property on the device:

- task: CmdLine@2
    displayName: 'Build project'
    inputs:
      script: 'dotnet publish -f net8.0-ios -c Release -p:CodesignEntitlements=Platforms/iOS/Entitlements.prod.plist'

Why doesn't the build pickup the project properties at build time if they are not being passed as a param on the publish?

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@thedee thedee added the t/bug Something isn't working label Jun 13, 2024
Copy link
Contributor

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!

Open similar issues:

Closed similar issues:

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

@drasticactions
Copy link
Contributor

@thedee Can you try doing this in a standalone iOS app? You can make one with dotnet new ios.

I have a feeling you'll hit the same issue outside of the MAUI UI tooling.

@drasticactions drasticactions added the s/needs-info Issue needs more info from the author label Jun 17, 2024
@thedee
Copy link
Author

thedee commented Jun 18, 2024

@thedee Can you try doing this in a standalone iOS app? You can make one with dotnet new ios.

I have a feeling you'll hit the same issue outside of the MAUI UI tooling.

I am having issues doing it this way due to the way we are setup.

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Jun 18, 2024
@PureWeen PureWeen added the area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) label Jun 20, 2024
@PureWeen
Copy link
Member

@rolfbjarne any thoughts?

@dotnet dotnet locked and limited conversation to collaborators Jun 28, 2024
@PureWeen PureWeen converted this issue into discussion #23341 Jun 28, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) platform/iOS 🍎 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants