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

Figure out how to publish Xcode preview packages #18343

Open
2 of 3 tasks
rolfbjarne opened this issue May 25, 2023 · 3 comments
Open
2 of 3 tasks

Figure out how to publish Xcode preview packages #18343

rolfbjarne opened this issue May 25, 2023 · 3 comments
Assignees
Labels
feature A feature to be implemented
Milestone

Comments

@rolfbjarne
Copy link
Member

rolfbjarne commented May 25, 2023

We need to figure out how to publish Xcode preview packages.

In Android you'd have to do add the OS version at the end of the target framework, and set EnablePreviewFeatures=true:

TargetFramework=net8.0-android34
EnablePreviewFeatures=true

Idea 1

Use a different, preview workload.

Developer workflow:

  1. dotnet workload install ios-xcode15 (shipped with VS if using VS?, maybe an additional checkbox?)
  2. Build project

Idea 2

Author the existing workload to be capable of loading the preview packs pivoted on the OS version.

Developer workflow:

Add the version to the target framework, and enable preview features:

<TargetFramework>net7.0-ios17.0</TargetFramework>
<EnablePreviewFeatures>true</EnablePreviewFeatures>

This would be just like Android does it.

  • Add the [assembly: RequiresPreviewFeatures ("...")] when we're building preview packages. This is how Android does it.
  • Choose option 1, 2, or something else from above (trying option 2 for now)
  • Implement the chosen option.
@rolfbjarne rolfbjarne added the feature A feature to be implemented label May 25, 2023
@rolfbjarne rolfbjarne added this to the xcode15 milestone May 25, 2023
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Jun 21, 2023
…eleases. Contributes towards xamarin#18343.

Detect if we're using a non-stable Xcode, and in that case produce packages
that show an error if they're used and the EnablePreviewFeatures flag isn't
enabled.

Also add logic to set this flag for our own build, otherwise all our tests
would fail.

This is the same as Android does.

Contributes towards xamarin#18343.
rolfbjarne added a commit that referenced this issue Jun 22, 2023
…preview releases. Contributes towards #18343. (#18476)

Detect if we're using a non-stable Xcode, and in that case produce packages
that show an error if they're used and the EnablePreviewFeatures flag isn't
enabled.

Also add logic to set this flag for our own build, otherwise all our tests
would fail.

This is the same as Android does.

Contributes towards #18343.
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Jun 22, 2023
…table version of Xcode. Contributes towards xamarin#18343.

Android does the same.

Contributes towards xamarin#18343.
rolfbjarne added a commit that referenced this issue Jun 26, 2023
…ng an unstable version of Xcode. Contributes towards #18343. (#18488)

Android does the same.

Contributes towards #18343.
@rolfbjarne
Copy link
Member Author

Current plan: #18523

@rolfbjarne rolfbjarne self-assigned this Aug 25, 2023
rolfbjarne added a commit that referenced this issue Aug 31, 2023
Document the plan to:

* Compile against an earlier version of our bindings.
    * dotnet/sdk#30103
* Consume preview packages for a preview version of Xcode.
    * #18343
rolfbjarne added a commit that referenced this issue Sep 5, 2023
…eting. (#18896)

Multi targetting is described here:
https://github.com/xamarin/xamarin-macios/blob/main/docs/multi-target-framework.md

This PR implements support building using the latest .NET 7 packages
we're shipping, by specifying the OS version in the target framework.

It does so by:

* Renaming the ref, sdk and runtime packs to contain the target
framework and
  the target platfrom version, so the packages will now be named:

	* iOS

		* Microsoft.iOS.Sdk.net7.0_16.4
		* Microsoft.iOS.Ref.net7.0_16.4
		* Microsoft.iOS.Runtime.ios-arm64.net7.0_16.4
		* Microsoft.iOS.Runtime.iossimulator-arm64.net7.0_16.4
		* Microsoft.iOS.Runtime.iossimulator-x64.net7.0_16.4

	* tvOS

		* Microsoft.tvOS.Sdk.net7.0_16.4
		* Microsoft.tvOS.Ref.net7.0_16.4
		* Microsoft.tvOS.Runtime.ios-arm64.net7.0_16.4
		* Microsoft.tvOS.Runtime.iossimulator-arm64.net7.0_16.4
		* Microsoft.tvOS.Runtime.iossimulator-x64.net7.0_16.4

	* Mac Catalyst

		* Microsoft.MacCatalyst.Sdk.net7.0_16.4
		* Microsoft.MacCatalyst.Ref.net7.0_16.4
		* Microsoft.MacCatalyst.Runtime.maccatalyst-x64.net7.0_16.4
		* Microsoft.MacCatalyst.Runtime.maccatalyst-arm64.net7.0_16.4

	* macOS
		* Microsoft.macOS.Sdk.net7.0_13.3
		* Microsoft.macOS.Ref.net7.0_13.3
		* Microsoft.macOS.Runtime.osx-x64.net7.0_13.3
		* Microsoft.macOS.Runtime.osx-arm64.net7.0_13.3

* Note that the workloads are also updated in this PR.

Contributes towards:

* #18790.
* dotnet/sdk#30103.
* #18343.
rolfbjarne added a commit that referenced this issue Sep 5, 2023
…geting (#18884)

Multi targetting is described here:
https://github.com/xamarin/xamarin-macios/blob/main/docs/multi-target-framework.md

This PR implements support building using the initial .NET 7 macOS and
Mac Catalyst packages we shipped, by adding "net7.0-maccatalyst15.4" or
"net7.0-macos12.3" as a target framework.

It does so by:

* Renaming the ref, sdk and runtime packs to contain the target
framework and the target platfrom version, so the packages will now be
named:

	* Microsoft.MacCatalyst.Sdk.net7.0_15.4
	* Microsoft.MacCatalyst.Ref.net7.0_15.4
	* Microsoft.MacCatalyst.Runtime.maccatalyst-x64.net7.0_15.4
	* Microsoft.MacCatalyst.Runtime.maccatalyst-arm64.net7.0_15.4

	* Microsoft.macOS.Sdk.net7.0_12.3
	* Microsoft.macOS.Ref.net7.0_12.3
	* Microsoft.macOS.Runtime.osx-x64.net7.0_12.3
	* Microsoft.macOS.Runtime.osx-arm64.net7.0_12.3

* Only publish the above packages to NuGet (i.e. _not_ publish the template
   pack, nor the workload pack). This is because we don't need to publish
   any new templates/workloads, we only need to support being included in a
   newer   workload.

* Note that the workloads are also updated in this PR: these workloads will
  never be published, but it's to keep the tests working.

Contributes towards:

* #18790.
* dotnet/sdk#30103.
* #18343.
rolfbjarne added a commit that referenced this issue Sep 5, 2023
…ting (#18891)

Multi targetting is described here:
https://github.com/xamarin/xamarin-macios/blob/main/docs/multi-target-framework.md

This PR implements support building using the initial .NET 7 macOS and
Mac Catalyst packages we shipped, by adding "net7.0-ios16.0" or
"net7.0-tvos16.0" as a target framework.

It does so by:

* Renaming the ref, sdk and runtime packs to contain the target framework
  and the target platfrom version, so the packages will now be named:

	* Microsoft.iOS.Sdk.net7.0_16.0
	* Microsoft.iOS.Ref.net7.0_16.0
	* Microsoft.iOS.Runtime.ios-arm64.net7.0_16.0
	* Microsoft.iOS.Runtime.iossimulator-arm64.net7.0_16.0
	* Microsoft.iOS.Runtime.iossimulator-x64.net7.0_16.0

	* Microsoft.tvOS.Sdk.net7.0_16.0
	* Microsoft.tvOS.Ref.net7.0_16.0
	* Microsoft.tvOS.Runtime.ios-arm64.net7.0_16.0
	* Microsoft.tvOS.Runtime.iossimulator-arm64.net7.0_16.0
	* Microsoft.tvOS.Runtime.iossimulator-x64.net7.0_16.0

* Only publish the above packages to NuGet (i.e. _not_ publish the template
  pack, nor the workload pack). This is because we don't need to publish any
  new templates/workloads, we only need to support being included in a
  newer workload.

* Note that the workloads are also updated in this PR: these workloads will
  never be published, but it's to keep the tests working.

Contributes towards:

* #18790.
* dotnet/sdk#30103.
* #18343.

This PR is best reviewed commit-by-commit.
rolfbjarne added a commit that referenced this issue Sep 6, 2023
Multi targetting is described here:
https://github.com/xamarin/xamarin-macios/blob/main/docs/multi-target-framework.md

This change implements support for:

* Building using the first .NET 7 packages we shipped.
* Building using the last .NET 7 packages we've shipped.

In both cases by specifying the OS version in the target framework.

Additionally adding support for any other API/OS version is trivial: it's just
a matter of listing the corresponding versions in a few files (this is
particularly interesting to add support for preview versions).

It does so by:

* Renaming the ref, sdk and runtime packs to contain the target framework and
  the target platfrom version, so the packages will now be named:

    * iOS

        * Microsoft.iOS.Sdk.net8.0_16.4
        * Microsoft.iOS.Ref.net8.0_16.4
        * Microsoft.iOS.Runtime.ios-arm64.net8.0_16.4
        * Microsoft.iOS.Runtime.iossimulator-arm64.net8.0_16.4
        * Microsoft.iOS.Runtime.iossimulator-x64.net8.0_16.4

    * tvOS

        * Microsoft.tvOS.Sdk.net8.0_16.4
        * Microsoft.tvOS.Ref.net8.0_16.4
        * Microsoft.tvOS.Runtime.ios-arm64.net8.0_16.4
        * Microsoft.tvOS.Runtime.iossimulator-arm64.net8.0_16.4
        * Microsoft.tvOS.Runtime.iossimulator-x64.net8.0_16.4

    * Mac Catalyst

        * Microsoft.MacCatalyst.Sdk.net8.0_16.4
        * Microsoft.MacCatalyst.Ref.net8.0_16.4
        * Microsoft.MacCatalyst.Runtime.maccatalyst-x64.net8.0_16.4
        * Microsoft.MacCatalyst.Runtime.maccatalyst-arm64.net8.0_16.4

    * macOS

        * Microsoft.macOS.Sdk.net8.0_13.3
        * Microsoft.macOS.Ref.net8.0_13.3
        * Microsoft.macOS.Runtime.osx-x64.net8.0_13.3
        * Microsoft.macOS.Runtime.osx-arm64.net8.0_13.3

* Updating the WorkloadManifest.json and WorkloadManifest.targets files to
  load the correct packs according to the TargetFramework in the developer's
  project.

* We're also now giving a better error message for invalid/unsupported/eol'ed
  target frameworks. Fixes #18790.

* Add a few tests.

Fixes:
* #18790.
* dotnet/sdk#30103.
* #16802.

Contributes towards:

* #18343.
@rolfbjarne rolfbjarne modified the milestones: xcode15, xcode16 Oct 17, 2023
@rolfbjarne
Copy link
Member Author

We figured this out, but didn't have time to fully finish the implementation for .NET 8 / Xcode 15, so postponing until Xcode 16.

@rolfbjarne
Copy link
Member Author

We tried doing this for Xcode 16, but ran into a few issues + CI troubles + vacation, so in the end we weren't able to release any previews. So postponing until Xcode 17.

@rolfbjarne rolfbjarne modified the milestones: xcode16, xcode17 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature to be implemented
Projects
None yet
Development

No branches or pull requests

1 participant