Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,19 @@ MACCATALYST_NUGET_VERSION_NO_METADATA=$(MACCATALYST_NUGET_VERSION)-$(NUGET_PRERE
MACCATALYST_NUGET_VERSION_FULL=$(MACCATALYST_NUGET_VERSION_NO_METADATA)+$(NUGET_BUILD_METADATA)

# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=12.3
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_12.3.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_12.3.0.app/Contents/Developer
XCODE_VERSION=12.5
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_12.5_beta.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_12.5.0-beta.app/Contents/Developer
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist)

# Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk
include $(TOP)/mk/mono.mk
MONO_HASH := $(NEEDED_MONO_VERSION)

# Minimum Mono version for building XI/XM
MIN_MONO_VERSION=6.12.0.39
MIN_MONO_VERSION=6.12.0.114
MAX_MONO_VERSION=6.12.99
MIN_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2020-02/41/338349925cd380cad2d19c6c15184cf22cf14800/MonoFramework-MDK-6.12.0.39.macos10.xamarin.universal.pkg
MIN_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2020-02/121/5e9cb6d1c1de430965312927d5aed7fcb27bfa73/MonoFramework-MDK-6.12.0.114.macos10.xamarin.universal.pkg

# Minimum Mono version for Xamarin.Mac apps using the system mono
MIN_XM_MONO_VERSION=6.4.0.94
Expand All @@ -152,7 +152,7 @@ MAX_SHARPIE_VERSION=3.5.99
MIN_SHARPIE_URL=https://download.visualstudio.microsoft.com/download/pr/83e81fcc-39cd-4c2d-b906-ea635f424aaa/2cd8d79588fbb61fa0f4594c85cccfe6/objectivesharpie-3.5.38.pkg

# Minimum OSX versions for building XI/XM
MIN_OSX_BUILD_VERSION=10.15.4
MIN_OSX_BUILD_VERSION=11.0
# Minimum OSX version for executing XI/XM tooling.
MIN_OSX_VERSION_FOR_IOS=10.11
MIN_OSX_VERSION_FOR_MAC=10.11
Expand Down
14 changes: 7 additions & 7 deletions Make.versions
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
# line changed in git).
#

IOS_PACKAGE_VERSION=14.14.1.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=7.8.1.$(MAC_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=14.15.1.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=7.9.1.$(MAC_COMMIT_DISTANCE)

#
# ** NuGet package version numbers **
Expand All @@ -66,8 +66,8 @@ MAC_PACKAGE_VERSION=7.8.1.$(MAC_COMMIT_DISTANCE)
# WARNING: Do **not** use versions higher than the available Xcode SDK or else we will have issues with mtouch (See https://github.com/xamarin/xamarin-macios/issues/7705)
# When bumping the major macOS version in MACOS_NUGET_VERSION also update the macOS version where we execute on bots in jenkins/Jenkinsfile (in the 'node' element)

IOS_NUGET_VERSION=14.3.100
TVOS_NUGET_VERSION=14.3.100
WATCHOS_NUGET_VERSION=7.2.100
MACOS_NUGET_VERSION=11.1.100
MACCATALYST_NUGET_VERSION=14.3.100
IOS_NUGET_VERSION=14.5.100
TVOS_NUGET_VERSION=14.5.100
WATCHOS_NUGET_VERSION=7.4.100
MACOS_NUGET_VERSION=11.3.100
MACCATALYST_NUGET_VERSION=14.5.100
11 changes: 11 additions & 0 deletions Versions-ios.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
<string>14.1</string>
<string>14.2</string>
<string>14.3</string>
<string>14.4</string>
<string>14.5</string>
</array>
<key>tvOS</key>
<array>
Expand All @@ -70,6 +72,8 @@
<string>14.0</string>
<string>14.2</string>
<string>14.3</string>
<string>14.4</string>
<string>14.5</string>
</array>
<key>watchOS</key>
<array>
Expand All @@ -93,6 +97,8 @@
<string>7.0</string>
<string>7.1</string>
<string>7.2</string>
<string>7.3</string>
<string>7.4</string>
</array>
<key>MacCatalyst</key>
<array>
Expand All @@ -103,6 +109,7 @@
<string>13.5</string>
<string>14.2</string>
<string>14.3</string>
<string>14.5</string>
</array>
</dict>
<key>MacCatalystVersionMap</key>
Expand All @@ -121,6 +128,10 @@
<string>11.0</string>
<key>14.3</key>
<string>11.1</string>
<key>14.4</key>
<string>11.2</string>
<key>14.5</key>
<string>11.3</string>
</dict>
<key>RecommendedXcodeVersion</key>
<string>@XCODE_VERSION@</string>
Expand Down
2 changes: 2 additions & 0 deletions Versions-mac.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<string>10.16</string>
<string>11.0</string>
<string>11.1</string>
<string>11.2</string>
<string>11.3</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion mk/xamarin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MONO_BRANCH := $(shell cd $(MONO_PATH) 2> /dev/null && git symbolic-ref --sho
endif

ifdef ENABLE_XAMARIN
NEEDED_MACCORE_VERSION := 428964bf32f06862eb4209129c6fb5b882c3b9be
NEEDED_MACCORE_VERSION := de616ca53e22ebea66216374a15b8caf2ca77e3c
NEEDED_MACCORE_BRANCH := d16-9

MACCORE_DIRECTORY := maccore
Expand Down
6 changes: 1 addition & 5 deletions msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,6 @@ Copyright (C) 2014 Xamarin. All rights reserved.
Inputs="@(_CompileToNativeInput);@(_FileNativeReference);@(BundleDependentFiles)"
Outputs="$(_AppBundlePath)Contents\MacOS\$(_AppBundleName);$(DeviceSpecificOutputPath)bundler.stamp">

<ItemGroup>
<_FrameworkNativeReference Include="@(_FrameworkNativeReference -> '%(Identity)/%(Filename)')" Condition="'%(Extension)' == '.framework' Or '%(Extension)' == '.xcframework'" />
</ItemGroup>

<Mmp
Condition="'$(IsMacEnabled)' == 'true'"
SessionId="$(BuildSessionId)"
Expand All @@ -238,7 +234,7 @@ Copyright (C) 2014 Xamarin. All rights reserved.
I18n="$(I18n)"
Profiling="$(Profiling)"
ExtraArgs="$(_BundlerArguments)"
NativeReferences="@(NativeReference);@(_FrameworkNativeReference);@(_FileNativeReference)"
NativeReferences="@(_FrameworkNativeReference);@(_FileNativeReference)"
References="@(ReferencePath);@(_BundlerReferencePath)"
ResponseFilePath="$(IntermediateOutputPath)response-file.rsp"
SdkRoot="$(_SdkDevPath)"
Expand Down
22 changes: 11 additions & 11 deletions msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ResolveFrameworksBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public abstract class ResolveNativeReferencesBase : XamarinTask
#region Inputs

[Required]
public string Architectures { get; set; }
public string? Architectures { get; set; }

public ITaskItem [] NativeReferences { get; set; }
public ITaskItem []? NativeReferences { get; set; }

public ITaskItem[] References { get; set; }
public ITaskItem []? References { get; set; }

[Required]
public bool SdkIsSimulator { get; set; }
Expand All @@ -34,7 +34,7 @@ public abstract class ResolveNativeReferencesBase : XamarinTask
#region Outputs

[Output]
public ITaskItem[] NativeFrameworks { get; set; }
public ITaskItem []? NativeFrameworks { get; set; }

#endregion

Expand Down Expand Up @@ -122,7 +122,7 @@ public override bool Execute ()
return !Log.HasLoggedErrors;
}

protected string ResolveXCFramework (string xcframework)
protected string? ResolveXCFramework (string xcframework)
{
var platformName = PlatformFrameworkHelper.GetOperatingSystem (TargetFrameworkMoniker);
// PlatformFrameworkHelper.GetOperatingSystem returns "osx" which does not work for xcframework
Expand All @@ -132,13 +132,13 @@ protected string ResolveXCFramework (string xcframework)
var variant = SdkIsSimulator ? "simulator" : null;
try {
var plist = PDictionary.FromFile (Path.Combine (xcframework, "Info.plist"));
var dir = ResolveXCFramework (plist, platformName, variant, Architectures);
if (!String.IsNullOrEmpty (dir))
return Path.Combine (xcframework, dir);
var path = ResolveXCFramework (plist, platformName, variant, Architectures!);
if (!String.IsNullOrEmpty (path))
return Path.Combine (xcframework, path);

// either the format was incorrect or we could not find a matching framework
// note: last part is not translated since it match the (non-translated) keys inside the `Info.plist`
var msg = (dir == null) ? MSBStrings.E0174 : MSBStrings.E0175 + $" SupportedPlatform: '{platformName}', SupportedPlatformVariant: '{variant}', SupportedArchitectures: '{Architectures}'.";
var msg = (path == null) ? MSBStrings.E0174 : MSBStrings.E0175 + $" SupportedPlatform: '{platformName}', SupportedPlatformVariant: '{variant}', SupportedArchitectures: '{Architectures}'.";
Log.LogError (msg, xcframework);
}
catch (Exception) {
Expand All @@ -147,7 +147,7 @@ protected string ResolveXCFramework (string xcframework)
return null;
}

internal static string? ResolveXCFramework (PDictionary plist, string platformName, string variant, string architectures)
internal static string? ResolveXCFramework (PDictionary plist, string platformName, string? variant, string architectures)
{
// plist structure https://github.com/spouliot/xcframework#infoplist
var bundle_package_type = (PString) plist ["CFBundlePackageType"];
Expand Down Expand Up @@ -182,7 +182,7 @@ protected string ResolveXCFramework (string xcframework)
}
var library_path = (PString) item ["LibraryPath"];
var library_identifier = (PString) item ["LibraryIdentifier"];
return Path.Combine (library_identifier, library_path);
return Path.Combine (library_identifier, library_path, Path.GetFileNameWithoutExtension (library_path));
}
return String.Empty;
}
Expand Down
10 changes: 7 additions & 3 deletions msbuild/Xamarin.iOS.Tasks.Core/Tasks/MTouchTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ void BuildNativeReferenceFlags (GccOptions gcc)
if (!string.IsNullOrEmpty (value) && bool.TryParse (value, out boolean) && boolean)
gcc.Cxx = true;
} else if (kind == NativeReferenceKind.Framework) {
gcc.Frameworks.Add (item.ItemSpec);
var path = item.ItemSpec;
// in case the full path to the library is given (msbuild)
if (Path.GetExtension (path) != ".framework")
path = Path.GetDirectoryName (path);
gcc.Frameworks.Add (path);
} else {
Log.LogWarning (MSBStrings.W0052, item.ItemSpec);
continue;
Expand Down Expand Up @@ -399,10 +403,10 @@ protected override string GenerateCommandLineCommands ()
gcc.Arguments.AddQuoted (LinkNativeCodeTaskBase.GetEmbedEntitlementsInExecutableLinkerFlags (CompiledEntitlements));

foreach (var framework in gcc.Frameworks)
args.AddQuotedLine ($"--framework={framework}");
args.AddQuotedLine ($"--framework={Path.GetFullPath (framework)}");

foreach (var framework in gcc.WeakFrameworks)
args.AddQuotedLine ($"--weak-framework={framework}");
args.AddQuotedLine ($"--weak-framework={Path.GetFullPath (framework)}");

if (gcc.Cxx)
args.AddLine ("--cxx");
Expand Down
6 changes: 1 addition & 5 deletions msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,6 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
Inputs="@(_CompileToNativeInput);@(_FileNativeReference);@(BundleDependentFiles)"
Outputs="$(_NativeExecutable);$(DeviceSpecificOutputPath)bundler.stamp">

<ItemGroup>
<_FrameworkNativeReference Include="@(_FrameworkNativeReference -> '%(Identity)/%(Filename)')" Condition="'%(Extension)' == '.framework' Or '%(Extension)' == '.xcframework'" />
</ItemGroup>

<MTouch
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true'"
Expand All @@ -443,7 +439,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
LinkMode="$(_LinkMode)"
MainAssembly="$(TargetPath)"
MinimumOSVersion="$(_MinimumOSVersion)"
NativeReferences="@(NativeReference);@(_FrameworkNativeReference);@(_FileNativeReference)"
NativeReferences="@(_FrameworkNativeReference);@(_FileNativeReference)"
OutputPath="$(DeviceSpecificOutputPath)"
Profiling="$(MtouchProfiling)"
ProjectDir="$(MtouchProjectDirectory)"
Expand Down
12 changes: 12 additions & 0 deletions tests/common/TestRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,18 @@ public static bool CheckXcodeVersion (int major, int minor, int build = 0)
return CheckMacSystemVersion (11, 0, 0);
#else
throw new NotImplementedException ();
#endif
case 5:
#if __WATCHOS__
return CheckWatchOSSystemVersion (7, 4);
#elif __TVOS__
return ChecktvOSSystemVersion (14, 5);
#elif __IOS__
return CheckiOSSystemVersion (14, 5);
#elif MONOMAC
return CheckMacSystemVersion (11, 3, 0);
#else
throw new NotImplementedException ();
#endif
default:
throw new NotImplementedException ();
Expand Down
2 changes: 1 addition & 1 deletion tests/introspection/ApiAvailabilityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public ApiAvailabilityTest ()
Minimum = new Version (10,9);
// Need to special case macOS 'Maximum' version for OS minor subversions (can't change Constants.SdkVersion)
// Please comment the code below if needed
Maximum = new Version (11,1,0);
// Maximum = new Version (11,1,0);
#endif
Filter = (AvailabilityBaseAttribute arg) => {
return (arg.AvailabilityKind != AvailabilityKind.Introduced) || (arg.Platform != Platform);
Expand Down
3 changes: 3 additions & 0 deletions tests/introspection/ApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ protected virtual bool Skip (Type type, string protocolName)
case "PKTransitPassProperties": // Conformance not in headers
// Xcode 12.2
case "VSAccountApplicationProvider": // Conformance not in headers
// Xcode 12.5
case "HMCharacteristicMetadata":
case "HMAccessoryCategory":
return true;
}
break;
Expand Down
11 changes: 11 additions & 0 deletions tests/introspection/Mac/MacApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ protected override bool Skip (Type type, string protocolName)
case "NSPrintInfo": // Conformance not in headers
case "NSPrinter": // Conformance not in headers
return true;
// Xcode 12.5
case "CXCall": // Conformance not in headers
case "CXCallUpdate": // Conformance not in headers
case "CXProviderConfiguration": // Conformance not in headers
return true;
default:
// CIFilter started implementing NSSecureCoding in 10.11
if (!Mac.CheckSystemVersion (10, 11) && (type == typeof(CIFilter) || type.IsSubclassOf (typeof(CIFilter))))
Expand All @@ -110,6 +115,8 @@ protected override bool Skip (Type type, string protocolName)
case "NSCollectionViewUpdateItem": // Not declared in header file
case "MLPredictionOptions": // Not declared in header file
case "FPUIActionExtensionContext": // Conformance not in headers
// Xcode 12.5
case "CXCall": // Conformance not in headers
return true;
}
break;
Expand Down Expand Up @@ -170,6 +177,10 @@ protected override bool Skip (Type type, string protocolName)
case "NSUrlSessionTaskTransactionMetrics": // Conformance not in headers
case "NSFileProviderDomain": // Conformance not in headers
case "FPUIActionExtensionContext": // Conformance not in headers
// Xcode 12.5
case "CXCall": // Conformance not in headers
case "CXCallUpdate": // Conformance not in headers
case "CXProviderConfiguration": // Conformance not in headers
return true;
}
break;
Expand Down
2 changes: 1 addition & 1 deletion tests/mmp-regression/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $(foreach test,$(ALL_TESTS),$(test)/bin): dylib/libTest.dylib
$(QF_GEN) if ! $(SYSTEM_XIBUILD) -- $(@D)/$(@D).csproj /p:Configuration=$(CONFIG); then EC=$$?; rm -Rf $@; exit $$EC; fi

dylib/libTest.dylib: dylib/src.c
$(QF_GEN) $(XCODE_CC) $< -o$@ -arch x86_64 -shared
$(QF_GEN) $(XCODE_CC) $< -o$@ -arch x86_64 -shared -L /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib

build: $(foreach test,$(ALL_TESTS),$(test)/bin)

Expand Down
8 changes: 3 additions & 5 deletions tests/monotouch-test/GameKit/LeaderboardViewControllerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ public class LeaderboardViewControllerTest {
public void DefaultCtor ()
{
#if MONOMAC
// For some reason the init method is not allowed on Xcode 12.2 Beta 3 anymore
// but was allowed before that said this class got deprecated in 10.10 so it may now be
// a permanent change.
if (TestRuntime.CheckExactXcodeVersion (12, 2, beta: 3))
// fails when executed under BigSur - this has been deprecated for a while (even if it remains working elsewhere)
if (TestRuntime.CheckSystemVersion (PlatformName.MacOSX, 11, 0))
Assert.Inconclusive ("'LeaderboardViewControllerTest' the native 'init' method returned nil.");
#endif
TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 8, throwIfOtherPlatform: false);
#endif
using (var vc = new GKLeaderboardViewController ()) {
Assert.Null (vc.Category, "Category");
Assert.Null (vc.Delegate, "Delegate");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ namespace Xamarin.MacDev.Tasks.Tests {
public class ResolveNativeReferencesTaskTest {

// single arch request (subset are fine)
[TestCase ("iOS", null, "arm64", "ios-arm64/Universal.framework")]
[TestCase ("iOS", "simulator", "x86_64", "ios-arm64_x86_64-simulator/Universal.framework")] // subset
[TestCase ("iOS", "maccatalyst", "x86_64", "ios-arm64_x86_64-maccatalyst/Universal.framework")] // subset
[TestCase ("tvOS", null, "arm64", "tvos-arm64/Universal.framework")]
[TestCase ("tvOS", "simulator", "x86_64", "tvos-arm64_x86_64-simulator/Universal.framework")] // subset
[TestCase ("watchOS", null, "arm64_32", "watchos-arm64_32_armv7k/Universal.framework")]
[TestCase ("watchOS", "simulator", "x86_64", "watchos-arm64_x86_64-simulator/Universal.framework")] // subset
[TestCase ("macOS", null, "x86_64", "macos-arm64_x86_64/Universal.framework")] // subset
[TestCase ("iOS", null, "arm64", "ios-arm64/Universal.framework/Universal")]
[TestCase ("iOS", "simulator", "x86_64", "ios-arm64_x86_64-simulator/Universal.framework/Universal")] // subset
[TestCase ("iOS", "maccatalyst", "x86_64", "ios-arm64_x86_64-maccatalyst/Universal.framework/Universal")] // subset
[TestCase ("tvOS", null, "arm64", "tvos-arm64/Universal.framework/Universal")]
[TestCase ("tvOS", "simulator", "x86_64", "tvos-arm64_x86_64-simulator/Universal.framework/Universal")] // subset
[TestCase ("watchOS", null, "arm64_32", "watchos-arm64_32_armv7k/Universal.framework/Universal")]
[TestCase ("watchOS", "simulator", "x86_64", "watchos-arm64_x86_64-simulator/Universal.framework/Universal")] // subset
[TestCase ("macOS", null, "x86_64", "macos-arm64_x86_64/Universal.framework/Universal")] // subset
// multiple arch request (all must be present)
[TestCase ("macOS", null, "x86_64, arm64", "macos-arm64_x86_64/Universal.framework")]
[TestCase ("macOS", null, "x86_64, arm64", "macos-arm64_x86_64/Universal.framework/Universal")]
// failure to resolve requested architecture
[TestCase ("iOS", "simulator", "i386, x86_64", "")] // i386 not available
// failure to resolve mismatched variant
Expand All @@ -34,10 +34,10 @@ public void Xcode12_x (string platform, string variant, string architecture, str
Assert.That (result, Is.EqualTo (expected), expected);
}

[TestCase ("iOS", null, "ARMv7", "ios-arm64_armv7_armv7s/XTest.framework")]
[TestCase ("iOS", null, "ARMv7", "ios-arm64_armv7_armv7s/XTest.framework/XTest")]
// there was no 64bits simulator for watchOS but a i386 one was available
[TestCase ("watchOS", "simulator", "x86_64", "")]
[TestCase ("watchOS", "simulator", "i386", "watchos-i386-simulator/XTest.framework")]
[TestCase ("watchOS", "simulator", "i386", "watchos-i386-simulator/XTest.framework/XTest")]
public void PreXcode12 (string platform, string variant, string architecture, string expected)
{
var path = Path.Combine (Path.GetDirectoryName (GetType ().Assembly.Location), "Resources", "xcf-prexcode12.plist");
Expand Down
Loading