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

Adding an Entitlements.plist breaks the iOS project #3715

Closed
marwalsch opened this issue Dec 9, 2021 · 6 comments
Closed

Adding an Entitlements.plist breaks the iOS project #3715

marwalsch opened this issue Dec 9, 2021 · 6 comments
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer p/3 Work that is nice to have platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst s/verified Verified / Reproducible Issue ready for Engineering Triage t/enhancement ☀️ New feature or request
Projects
Milestone

Comments

@marwalsch
Copy link

Description

Adding an Entitlements.plist into the iOS subdirectory causes the project build to fail with a "Could not find any available provisioning profiles for {project} on iOS." error for some reason. Removing it results in success.
It's also unclear whether resolving the bundle for secure access works through the same notation as in Xamarin.

<key>keychain-access-groups</key>
	<array>
		<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
	</array>

Steps to Reproduce

  1. Create an empty MAUI project;
  2. Create an Entitlements.plist inside the iOS directory.
<?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>

</dict>
</plist>
  1. Witness the build fail as it is present.

Version with bug

Preview 10 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

Latest releases shipped with VS2022 Preview 1.1

Did you find any workaround?

No response

Relevant log output

No response

@marwalsch marwalsch added the t/bug Something isn't working label Dec 9, 2021
@jsuarezruiz jsuarezruiz added this to New in Triage via automation Dec 10, 2021
@Eilon Eilon added the area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer label Dec 16, 2021
@shimingsg
Copy link
Collaborator

shimingsg commented Feb 17, 2022

Verified Repro with iPhone 13 IOs 15.2. Repro project
3715.zip

@shimingsg shimingsg added the s/verified Verified / Reproducible Issue ready for Engineering Triage label Feb 17, 2022
@mattleibow mattleibow added this to the 6.0.300 milestone Mar 22, 2022
@mattleibow mattleibow added t/enhancement ☀️ New feature or request and removed t/bug Something isn't working labels Mar 22, 2022
@mattleibow
Copy link
Member

Moving this to a feature/enhancement because the presence of an entitlement involves signing the app package. However, maybe the rules need to change to maybe first check the signing before actually adding the entitlements. However, this may result in unexpected behaviour as trying to make use of features enabled by the entitlements may not work if the app is not signed.

@Mephisztoe
Copy link

because the presence of an entitlement involves signing the app package

Just wondering:
You only need to add entitlements when the app needs them (like when configuring an app for receiving Push Notifications). In this case, it is mandatory to also create a manual provisioning profile that corresponds to these entitlements and have this profile installed on the Mac so that Visual Studio can pull it.

However, Visual Studio is per default configured for automatic provisioning and there is still no dialog for setting this up in an easy way. Maybe @marwalsch only needs to switch to manual provisioning (by adding manual to the project file) and configure both the code signing certificate and a matching provisioning profile for the respective build target...?

@davidortinau davidortinau added the p/2 Work that is important, but not critical for the release label Apr 28, 2022
@Redth Redth added p/3 Work that is nice to have and removed p/2 Work that is important, but not critical for the release labels May 3, 2022
@mattleibow mattleibow modified the milestones: 6.0.300, 6.0-servicing Aug 29, 2022
@Redth Redth modified the milestones: 6.0-servicing, Backlog Aug 30, 2022
@ghost
Copy link

ghost commented Aug 30, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@janwiebe-jump
Copy link

Hi @marwalsch
I ran into this issue as well.
I got it working,by manually editing the csproj file, and fixing the CodesignEntitlements key from

<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>

to

<CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements>

@marwalsch
Copy link
Author

marwalsch commented Sep 13, 2022

@janwiebe-jump Thanks for the suggestion.

This has apparently become a non-issue on latest MAUI builds and Visual Studio versions, thus I am closing.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer p/3 Work that is nice to have platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst s/verified Verified / Reproducible Issue ready for Engineering Triage t/enhancement ☀️ New feature or request
Projects
No open projects
Development

No branches or pull requests

8 participants