Skip to content

Commit

Permalink
[xcode14] Bump to Xcode 14 (#15898)
Browse files Browse the repository at this point in the history
Doing a merge commit for this PR so we can revert the revert in the future for BackgroundAssets

* Apple removed BackgroundAssets 
* Apple removed macOS 13.0 SDK
* Apple Removed MacCat 16.0 SDK
  • Loading branch information
rolfbjarne committed Sep 15, 2022
2 parents 105d3eb + a2f89bd commit c629dd8
Show file tree
Hide file tree
Showing 62 changed files with 487 additions and 9,615 deletions.
10 changes: 5 additions & 5 deletions Make.config
Expand Up @@ -194,8 +194,8 @@ MACCATALYST_NUGET_VERSION_FULL=$(MACCATALYST_NUGET_VERSION_NO_METADATA)+$(NUGET_

# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=14.0
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_14_beta_6.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_14.0.0-beta6.app/Contents/Developer
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_14.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_14.0.0.app/Contents/Developer
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist 2>/dev/null || echo " $(shell tput setaf 1 2>/dev/null)The required Xcode ($(XCODE_VERSION)) is not installed in $(basename $(basename $(XCODE_DEVELOPER_ROOT)))$(shell tput sgr0 2>/dev/null)" >&2)

# Tell both Xcode and our build logic which Xcode we're using.
Expand Down Expand Up @@ -230,7 +230,7 @@ MAX_SHARPIE_VERSION=3.5.99
MIN_SHARPIE_URL=https://download.visualstudio.microsoft.com/download/pr/7336f72c-57aa-4e46-9936-cce4d1975ba9/b33be8b36a22c2cfbcbe5680f14e0901/objectivesharpie-3.5.61.pkg

# Minimum OSX versions for building XI/XM
MIN_OSX_BUILD_VERSION=12.0
MIN_OSX_BUILD_VERSION=12.5
# Minimum OSX version for executing XI/XM tooling.
MIN_OSX_VERSION_FOR_IOS=10.11
MIN_OSX_VERSION_FOR_MAC=10.11
Expand Down Expand Up @@ -276,10 +276,10 @@ MIN_TVOS_SIMULATOR_VERSION=12.4
EXTRA_SIMULATORS=com.apple.pkg.iPhoneSimulatorSDK12_4 com.apple.pkg.AppleTVSimulatorSDK12_4 com.apple.pkg.WatchSimulatorSDK6_0

INCLUDE_IOS=1
INCLUDE_MAC=1
#INCLUDE_MAC=1
INCLUDE_WATCH=1
INCLUDE_TVOS=1
INCLUDE_MACCATALYST=1
#INCLUDE_MACCATALYST=1
INCLUDE_DEVICE=1
INCLUDE_DOTNET_WATCHOS=
INCLUDE_XAMARIN_LEGACY=1
Expand Down
10 changes: 5 additions & 5 deletions Make.versions
Expand Up @@ -48,7 +48,7 @@
# line changed in git).
#

IOS_PACKAGE_VERSION=15.99.0.$(IOS_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=16.0.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=8.99.0.$(MAC_COMMIT_DISTANCE)

#
Expand All @@ -69,8 +69,8 @@ MAC_PACKAGE_VERSION=8.99.0.$(MAC_COMMIT_DISTANCE)
IOS_NUGET_OS_VERSION=16.0
TVOS_NUGET_OS_VERSION=16.0
WATCHOS_NUGET_OS_VERSION=9.0
MACOS_NUGET_OS_VERSION=13.0
MACCATALYST_NUGET_OS_VERSION=16.0
MACOS_NUGET_OS_VERSION=12.3
MACCATALYST_NUGET_OS_VERSION=15.4


# Defines the default platform version if it's not specified in the TFM. The default should not change for a given .NET version:
Expand All @@ -83,5 +83,5 @@ MACCATALYST_NUGET_OS_VERSION=16.0
DEFAULT_TARGET_PLATFORM_VERSION_IOS=16.0
DEFAULT_TARGET_PLATFORM_VERSION_TVOS=16.0
DEFAULT_TARGET_PLATFORM_VERSION_WATCHOS=9.0
DEFAULT_TARGET_PLATFORM_VERSION_MACOS=13.0
DEFAULT_TARGET_PLATFORM_VERSION_MACCATALYST=16.0
DEFAULT_TARGET_PLATFORM_VERSION_MACOS=12.3
DEFAULT_TARGET_PLATFORM_VERSION_MACCATALYST=15.4
6 changes: 3 additions & 3 deletions Versions-ios.plist.in
Expand Up @@ -126,7 +126,7 @@
<string>15.0</string>
<string>15.2</string>
<string>15.4</string>
<string>16.0</string>
<!-- <string>16.0</string> -->
</array>
</dict>
<key>MacCatalystVersionMap</key>
Expand Down Expand Up @@ -155,8 +155,8 @@
<string>12.1</string>
<key>15.4</key>
<string>12.3</string>
<key>16.0</key>
<string>13.0</string>
<!-- <key>16.0</key>
<string>13.0</string> -->
</dict>
<key>RecommendedXcodeVersion</key>
<string>@XCODE_VERSION@</string>
Expand Down
2 changes: 1 addition & 1 deletion Versions-mac.plist.in
Expand Up @@ -25,7 +25,7 @@
<string>12.0</string>
<string>12.1</string>
<string>12.3</string>
<string>13.0</string>
<!-- <string>13.0</string> -->
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
185 changes: 0 additions & 185 deletions src/backgroundassets.cs

This file was deleted.

3 changes: 0 additions & 3 deletions src/frameworks.sources
Expand Up @@ -2010,7 +2010,6 @@ MACOS_FRAMEWORKS = \
AVKit \
AVRouting \
BusinessChat \
BackgroundAssets \
CallKit \
CFNetwork \
Chip \
Expand Down Expand Up @@ -2118,7 +2117,6 @@ IOS_FRAMEWORKS = \
AudioToolbox \
AudioUnit \
AutomaticAssessmentConfiguration \
BackgroundAssets \
BackgroundTasks \
BusinessChat \
CallKit \
Expand Down Expand Up @@ -2315,7 +2313,6 @@ MACCATALYST_FRAMEWORKS = \
AudioToolbox \
AudioUnit \
AutomaticAssessmentConfiguration \
BackgroundAssets \
BackgroundTasks \
BusinessChat \
CallKit \
Expand Down
2 changes: 2 additions & 0 deletions tests/cecil-tests/AttributeTest.cs
Expand Up @@ -173,6 +173,8 @@ public override string ToString ()
[Test]
public void FindSupportedOnElementsThatDoNotExistInThatAssembly ()
{
Configuration.IgnoreIfAnyIgnoredPlatforms ();

// Dictionary of (FullName of Member) -> (Dictionary of (Actual Platform) -> Platform Claim Info)
var harvestedInfo = new Dictionary<string, Dictionary<string, PlatformClaimInfo>> ();

Expand Down
20 changes: 20 additions & 0 deletions tests/common/Configuration.cs
Expand Up @@ -851,6 +851,17 @@ public static IEnumerable<ApplePlatform> GetIncludedPlatforms (bool dotnet)
yield return ApplePlatform.WatchOS;
}

public static IEnumerable<ApplePlatform> GetAllPlatforms (bool dotnet)
{
yield return ApplePlatform.iOS;
yield return ApplePlatform.TVOS;
yield return ApplePlatform.MacOSX;
if (dotnet)
yield return ApplePlatform.MacCatalyst;
if (!dotnet)
yield return ApplePlatform.WatchOS;
}

public static string GetTargetFramework (Profile profile)
{
switch (profile) {
Expand Down Expand Up @@ -1077,6 +1088,15 @@ public static void IgnoreIfIgnoredPlatform (string platform)
}
}

public static void IgnoreIfAnyIgnoredPlatforms (bool dotnet = true)
{
var allPlatforms = GetAllPlatforms (dotnet);
var includedPlatforms = GetIncludedPlatforms (dotnet);
var notIncluded = allPlatforms.Where (v => !includedPlatforms.Contains (v));
if (notIncluded.Any ())
Assert.Ignore ($"This test requires all platforms to be included, but the following platforms aren't included: {string.Join (", ", notIncluded.Select (v => v.AsString ()))}");
}

public static string GetTestLibraryDirectory (ApplePlatform platform, bool? simulator = null)
{
string dir;
Expand Down
1 change: 1 addition & 0 deletions tests/common/ProductTests.cs
Expand Up @@ -49,6 +49,7 @@ public void MonoVersion ()
[TestCase (Profile.tvOS, MachO.LoadCommands.MintvOS, MachO.Platform.TvOS, true)]
public void MinOSVersion (Profile profile, MachO.LoadCommands load_command, MachO.Platform platform, bool device = false)
{
Configuration.IgnoreIfIgnoredPlatform (profile.AsPlatform ());
if (device)
Configuration.AssertDeviceAvailable ();

Expand Down
9 changes: 8 additions & 1 deletion tests/dotnet/UnitTests/PackTest.cs
Expand Up @@ -101,7 +101,14 @@ public void BindingXcFrameworksProject (ApplePlatform platform, bool noBindingEm
{
var project = "bindings-xcframework-test";
var assemblyName = "bindings-framework-test";
Configuration.IgnoreIfIgnoredPlatform (platform);

// This tests gets really complicated if not all platforms are included,
// because the (number of) files included in the nupkg depends not only
// on the current platform, but on the other included platforms as well.
// For example: if either macOS or Mac Catalyst is included, then some
// parts of the .xcframework will be zipped differently (due to symlinks
// in the xcframework).
Configuration.IgnoreIfAnyIgnoredPlatforms ();

var project_path = Path.Combine (Configuration.RootPath, "tests", project, "dotnet", platform.AsString (), $"{project}.csproj");
Clean (project_path);
Expand Down
1 change: 1 addition & 0 deletions tests/dotnet/UnitTests/ProjectTest.cs
Expand Up @@ -861,6 +861,7 @@ public void AppWithGenericLibraryReference (ApplePlatform platform, string runti
{
var project = "AppWithGenericLibraryReference";
Configuration.IgnoreIfIgnoredPlatform (platform);
Configuration.IgnoreIfIgnoredPlatform (ApplePlatform.MacOSX); // This test requires macOS as well, for all other platforms.

var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifiers, platform: platform, out var appPath);
Clean (project_path);
Expand Down
2 changes: 2 additions & 0 deletions tests/dotnet/UnitTests/TemplateProjectTest.cs
Expand Up @@ -91,6 +91,8 @@ public void NativeReferenceStaticLibraryForceLoad (ApplePlatform platform, bool?
[TestCase (ApplePlatform.MacCatalyst)]
public void VeryManyRegisteredAssemblies (ApplePlatform platform)
{
Configuration.IgnoreIfIgnoredPlatform (platform);

var tmpdir = Cache.CreateTemporaryDirectory ();
var assemblies = 200;

Expand Down

5 comments on commit c629dd8

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.