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

.NET 6: add support for specifying additional partial Info.plists that are to be merged into the final Info.plist #10646

Closed
3 tasks done
Tracked by #44736
rolfbjarne opened this issue Feb 16, 2021 · 6 comments · Fixed by #12417 or #12645
Closed
3 tasks done
Tracked by #44736
Assignees
Labels
dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release feature A feature to be implemented iOS Issues affecting iOS macOS Issues affecting macOS
Milestone

Comments

@rolfbjarne
Copy link
Member

rolfbjarne commented Feb 16, 2021

It would be possible to make single-project support nicer if it was possible to generate a partial Info.plist that is to be merged into the final Info.plist (for fonts at the very least).

The idea would be to add an additional public itemgroup like the current _PartialAppManifest that is passed to the CompileAppManifest task + a target that can be used for BeforeTargets.

/cc @Redth

@rolfbjarne rolfbjarne added macOS Issues affecting macOS iOS Issues affecting iOS dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release feature A feature to be implemented labels Feb 16, 2021
@rolfbjarne rolfbjarne added this to the .NET 6 milestone Feb 16, 2021
@Redth
Copy link
Member

Redth commented Feb 18, 2021

@rolfbjarne just an update that _PartialAppManifest does indeed work, and running it after the _CompileCoreMLModels target works as well. I think this validates enough the approach of creating a public item group to add these things to before some public target name.

@AmrAlSayed0
Copy link

Yes, same with the Android Manifest. It would be near impossible to support every valid Info.plist or Android Manifest tag. I'm used to using conditional PropertyGroup so it is not a problem for me but it would be even better if it was supported from the IDE's UI.

Another thing to consider is merging with existing tags. If I wanted to add a tag that is inside the application that's inside manifest (and also possibly others) how would I set that?

@Redth
Copy link
Member

Redth commented Feb 19, 2021

@AmrAlSayed0 this isn't really the right place to discuss the android merging :) but this is already possible today and xamarini.android does use the google manifest merger tool already which actually has a rather prescriptive set of rules around merging and altering the manifest files through partial manifests.

@AmrAlSayed0
Copy link

Ok, sorry, got carried away 😅

@rolfbjarne rolfbjarne self-assigned this Aug 3, 2021
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 11, 2021
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 11, 2021
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 12, 2021
rolfbjarne added a commit that referenced this issue Aug 12, 2021
…ialAppManifest'). Fixes #10646. (#12417)

* A couple of other changes to make sure we never overwrite the
  PartialAppManifest item group (as opposed to adding to it).
* Add tests.

Fixes #10646.
@Redth
Copy link
Member

Redth commented Sep 3, 2021

@rolfbjarne looks like we still need a non private named target to be able to run before so items can make it into this list without depending on _CompileAppManifests

@rolfbjarne
Copy link
Member Author

@Redth You can now add your target to the CollectAppManifestsDependsOn property:

<PropertyGroup>
    <CollectAppManifestsDependsOn>
        $(CollectAppManifestsDependsOn);
        AddPartialAppManifestsTarget;
    </CollectAppManifestsDependsOn>
</PropertyGroup>

@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dotnet An issue or pull request related to .NET (6) dotnet-pri0 .NET 6: required for stable release feature A feature to be implemented iOS Issues affecting iOS macOS Issues affecting macOS
Projects
None yet
3 participants