Skip to content

Commit 1dd6806

Browse files
[net7.0] Update dependencies from xamarin/xamarin-macios to Xcode 14.3 (#14334) (#14756)
* [net7.0] Update dependencies from xamarin/xamarin-macios to Xcode 14.3 * Use Ventura machines * Fix build * Cleanup * Bump to latest macios builds * [macios] Bump to latest version * Fix demands * Try bump ems * Bump xharness * Bump default on cake * Run in any ventura machine the device tests * Better fix for ImageSource sizing * Update xharness * XCode 14.3 and Ventura OS don't allow to run 12.4 simulators * Run device tests on x64 * [iOS] Fix NSInternalInconsistencyException on iOS WebViewDelegate with DeviceTests --------- Co-authored-by: Rui Marinho <[email protected]> # Conflicts: # eng/Version.Details.xml # eng/Versions.props Co-authored-by: Alex Soto <[email protected]>
1 parent 1d8a89b commit 1dd6806

File tree

10 files changed

+48
-51
lines changed

10 files changed

+48
-51
lines changed

.config/dotnet-tools.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"microsoft.dotnet.xharness.cli": {
18-
"version": "1.0.0-prerelease.22524.1",
18+
"version": "1.0.0-prerelease.23212.1",
1919
"commands": [
2020
"xharness"
2121
]

eng/Version.Details.xml

+13-13
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212
<Uri>https://github.com/xamarin/xamarin-android</Uri>
1313
<Sha>58a54aef5213e50e3e59008e244a64896fe971b6</Sha>
1414
</Dependency>
15-
<Dependency Name="Microsoft.MacCatalyst.Sdk" Version="16.2.2035">
15+
<Dependency Name="Microsoft.MacCatalyst.Sdk" Version="16.4.7045">
1616
<Uri>https://github.com/xamarin/xamarin-macios</Uri>
17-
<Sha>5987dd0e47c1202759c3af9e12588eecec943bb1</Sha>
17+
<Sha>86ef29d43cbc82594457c73813515c96c4e637ac</Sha>
1818
</Dependency>
19-
<Dependency Name="Microsoft.macOS.Sdk" Version="13.1.2035">
19+
<Dependency Name="Microsoft.macOS.Sdk" Version="13.3.7045">
2020
<Uri>https://github.com/xamarin/xamarin-macios</Uri>
21-
<Sha>5987dd0e47c1202759c3af9e12588eecec943bb1</Sha>
21+
<Sha>86ef29d43cbc82594457c73813515c96c4e637ac</Sha>
2222
</Dependency>
23-
<Dependency Name="Microsoft.iOS.Sdk" Version="16.2.2035">
23+
<Dependency Name="Microsoft.iOS.Sdk" Version="16.4.7045">
2424
<Uri>https://github.com/xamarin/xamarin-macios</Uri>
25-
<Sha>5987dd0e47c1202759c3af9e12588eecec943bb1</Sha>
25+
<Sha>86ef29d43cbc82594457c73813515c96c4e637ac</Sha>
2626
</Dependency>
27-
<Dependency Name="Microsoft.tvOS.Sdk" Version="16.1.2532">
27+
<Dependency Name="Microsoft.tvOS.Sdk" Version="16.4.7045">
2828
<Uri>https://github.com/xamarin/xamarin-macios</Uri>
29-
<Sha>5987dd0e47c1202759c3af9e12588eecec943bb1</Sha>
29+
<Sha>86ef29d43cbc82594457c73813515c96c4e637ac</Sha>
3030
</Dependency>
31-
<Dependency Name="Microsoft.NET.Workload.Emscripten.net6.Manifest-7.0.100" Version="7.0.4" CoherentParentDependency="Microsoft.NETCore.App.Ref">
31+
<Dependency Name="Microsoft.NET.Workload.Emscripten.net6.Manifest-7.0.100" Version="7.0.5" CoherentParentDependency="Microsoft.NETCore.App.Ref">
3232
<Uri>https://github.com/dotnet/emsdk</Uri>
3333
<Sha>ba16583f6b055e5a0623d817a48f1f2f15629e6b</Sha>
3434
</Dependency>
35-
<Dependency Name="Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100" Version="7.0.4" CoherentParentDependency="Microsoft.NETCore.App.Ref">
35+
<Dependency Name="Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100" Version="7.0.5" CoherentParentDependency="Microsoft.NETCore.App.Ref">
3636
<Uri>https://github.com/dotnet/emsdk</Uri>
3737
<Sha>ba16583f6b055e5a0623d817a48f1f2f15629e6b</Sha>
3838
</Dependency>
@@ -87,15 +87,15 @@
8787
<Uri>https://github.com/dotnet/templating</Uri>
8888
<Sha>3f4da9ced34942d83054e647f3b1d9d7dde281e8</Sha>
8989
</Dependency>
90-
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="1.0.0-prerelease.22524.1">
90+
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="1.0.0-prerelease.23212.1">
9191
<Uri>https://github.com/dotnet/xharness</Uri>
9292
<Sha>49b581c1ac56352864cb692d3c523b3fc27eddf7</Sha>
9393
</Dependency>
94-
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.22524.1">
94+
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.23212.1">
9595
<Uri>https://github.com/dotnet/xharness</Uri>
9696
<Sha>49b581c1ac56352864cb692d3c523b3fc27eddf7</Sha>
9797
</Dependency>
98-
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="1.0.0-prerelease.22524.1">
98+
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="1.0.0-prerelease.23212.1">
9999
<Uri>https://github.com/dotnet/xharness</Uri>
100100
<Sha>49b581c1ac56352864cb692d3c523b3fc27eddf7</Sha>
101101
</Dependency>

eng/Versions.props

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
<!-- xamarin/xamarin-android -->
1414
<MicrosoftAndroidSdkWindowsPackageVersion>33.0.46</MicrosoftAndroidSdkWindowsPackageVersion>
1515
<!-- xamarin/xamarin-macios -->
16-
<MicrosoftMacCatalystSdkPackageVersion>16.2.2035</MicrosoftMacCatalystSdkPackageVersion>
17-
<MicrosoftmacOSSdkPackageVersion>13.1.2035</MicrosoftmacOSSdkPackageVersion>
18-
<MicrosoftiOSSdkPackageVersion>16.2.2035</MicrosoftiOSSdkPackageVersion>
19-
<MicrosofttvOSSdkPackageVersion>16.1.2532</MicrosofttvOSSdkPackageVersion>
16+
<MicrosoftMacCatalystSdkPackageVersion>16.4.7045</MicrosoftMacCatalystSdkPackageVersion>
17+
<MicrosoftmacOSSdkPackageVersion>13.3.7045</MicrosoftmacOSSdkPackageVersion>
18+
<MicrosoftiOSSdkPackageVersion>16.4.7045</MicrosoftiOSSdkPackageVersion>
19+
<MicrosofttvOSSdkPackageVersion>16.4.7045</MicrosofttvOSSdkPackageVersion>
2020
<!-- Samsung/Tizen.NET -->
2121
<SamsungTizenSdkPackageVersion>7.0.105</SamsungTizenSdkPackageVersion>
2222
<!-- emsdk -->
@@ -61,9 +61,9 @@
6161
<_HarfBuzzSharpVersion>2.8.2.2</_HarfBuzzSharpVersion>
6262
<_SkiaSharpNativeAssetsVersion>0.0.0-commit.193b587552cb0ed39372a049d7e6c692db98c267.483</_SkiaSharpNativeAssetsVersion>
6363
<MicrosoftTemplateEngineTasksVersion>7.0.100-preview.5.22226.1</MicrosoftTemplateEngineTasksVersion>
64-
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>1.0.0-prerelease.22524.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
65-
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.22524.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
66-
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.22524.1</MicrosoftDotNetXHarnessCLIVersion>
64+
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>1.0.0-prerelease.23212.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
65+
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.23212.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
66+
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.23212.1</MicrosoftDotNetXHarnessCLIVersion>
6767
<TizenUIExtensionsVersion>0.9.0</TizenUIExtensionsVersion>
6868
<SvgSkiaPackageVersion>0.5.13</SvgSkiaPackageVersion>
6969
<FizzlerPackageVersion>1.2.0</FizzlerPackageVersion>

eng/devices/ios.cake

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ string TARGET = Argument("target", "Test");
55

66
// required
77
FilePath PROJECT = Argument("project", EnvironmentVariable("IOS_TEST_PROJECT") ?? "");
8-
string TEST_DEVICE = Argument("device", EnvironmentVariable("IOS_TEST_DEVICE") ?? "ios-simulator-64_14.4"); // comma separated in the form <platform>-<device|simulator>[-<32|64>][_<version>] (eg: ios-simulator-64_13.4,[...])
8+
string TEST_DEVICE = Argument("device", EnvironmentVariable("IOS_TEST_DEVICE") ?? "ios-simulator-64_16.4"); // comma separated in the form <platform>-<device|simulator>[-<32|64>][_<version>] (eg: ios-simulator-64_13.4,[...])
99

1010
// optional
1111
var USE_DOTNET = Argument("dotnet", true);

eng/pipelines/common/variables.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ variables:
88
- name: DOTNET_VERSION
99
value: 7.0.100
1010
- name: REQUIRED_XCODE
11-
value: 14.2.0
11+
value: 14.3.0
1212
- name: DEVICETESTS_REQUIRED_XCODE
13-
value: 14.2.0
13+
value: 14.3.0
1414
- name: LocBranchPrefix
1515
value: 'loc-hb'
1616
- name: isMainBranch

eng/pipelines/device-tests.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,16 @@ parameters:
6262
name: $(androidTestsVmPool)
6363
vmImage: $(androidTestsVmImage)
6464
demands:
65-
- macOS.Name -equals Monterey
65+
- macOS.Name -equals Ventura
6666
- macOS.Architecture -equals x64
6767
- name: iosPool
6868
type: object
6969
default:
70-
name: $(iosTestsVmPool)
71-
vmImage: $(iosTestsVmImage)
70+
name: $(androidTestsVmPool)
71+
vmImage: $(androidTestsVmImage)
72+
demands:
73+
- macOS.Name -equals Ventura
74+
- macOS.Architecture -equals x64
7275

7376
resources:
7477
repositories:
@@ -88,7 +91,7 @@ stages:
8891
${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}:
8992
androidApiLevels: [ 30, 29, 28, 27, 26, 25, 24, 23 ]
9093
# androidApiLevels: [ 30, 29, 28, 27, 26, 25, 24, 23, 22, 21 ] # fix the issue of getting the test results off
91-
iosVersions: [ 'latest', '15.5', '14.5', '13.7', '12.4' ]
94+
iosVersions: [ 'latest', '15.5', '14.5', '13.7']
9295
provisionatorChannel: ${{ parameters.provisionatorChannel }}
9396
${{ if not(or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv')))) }}:
9497
androidApiLevels: [ 30, 23 ]
@@ -110,18 +113,15 @@ stages:
110113
desc: Core
111114
androidApiLevelsExclude: [25] # Ignore for now API25 since the runs's are not stable
112115
android: $(System.DefaultWorkingDirectory)/src/Core/tests/DeviceTests/Core.DeviceTests.csproj
113-
iosVersionsExclude: [ '12.4'] # Ignore iOS 12.4 while we can't make it work on CI
114116
ios: $(System.DefaultWorkingDirectory)/src/Core/tests/DeviceTests/Core.DeviceTests.csproj
115117
- name: controls
116118
desc: Controls
117119
androidApiLevelsExclude: [25] # Ignore for now API25 since the runs's are not stable
118120
android: $(System.DefaultWorkingDirectory)/src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj
119-
iosVersionsExclude: [ '12.4'] # Ignore iOS 12.4 while we can't make it work on CI
120121
ios: $(System.DefaultWorkingDirectory)/src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj
121122
- name: blazorwebview
122123
desc: BlazorWebView
123124
androidApiLevelsExclude: [ 27, 26, 25, 24, 23, 22, 21 ] # BlazorWebView requires a recent version of Chrome
124125
android: $(System.DefaultWorkingDirectory)/src/BlazorWebView/tests/MauiDeviceTests/MauiBlazorWebView.DeviceTests.csproj
125-
iosVersionsExclude: [ '12.4'] # Ignore iOS 12.4 while we can't make it work on CI
126126
ios: $(System.DefaultWorkingDirectory)/src/BlazorWebView/tests/MauiDeviceTests/MauiBlazorWebView.DeviceTests.csproj
127127

eng/pipelines/handlers.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,8 @@ stages:
145145
name: ${{ BuildPlatform.poolName }}
146146
vmImage: ${{ BuildPlatform.vmImage }}
147147
demands:
148-
- macOS.Name -equals Monterey
148+
- macOS.Name -equals Ventura
149149
- macOS.Architecture -equals x64
150-
- Agent.HasDevices -equals False
151-
- Agent.IsPaired -equals False
152150
steps:
153151
- template: common/provision.yml
154152
parameters:
@@ -190,10 +188,8 @@ stages:
190188
name: ${{ PackPlatform.poolName }}
191189
vmImage: ${{ PackPlatform.vmImage }}
192190
demands:
193-
- macOS.Name -equals Monterey
191+
- macOS.Name -equals Ventura
194192
- macOS.Architecture -equals x64
195-
- Agent.HasDevices -equals False
196-
- Agent.IsPaired -equals False
197193
steps:
198194
- template: common/pack.yml
199195
parameters:
@@ -222,10 +218,8 @@ stages:
222218
name: ${{ BuildPlatform.poolName }}
223219
vmImage: ${{ BuildPlatform.vmImage }}
224220
demands:
225-
- macOS.Name -equals Monterey
221+
- macOS.Name -equals Ventura
226222
- macOS.Architecture -equals x64
227-
- Agent.HasDevices -equals False
228-
- Agent.IsPaired -equals False
229223
steps:
230224
- template: common/provision.yml
231225
parameters:
@@ -274,10 +268,8 @@ stages:
274268
name: ${{ BuildPlatform.poolName }}
275269
vmImage: ${{ BuildPlatform.vmImage }}
276270
demands:
277-
- macOS.Name -equals Monterey
271+
- macOS.Name -equals Ventura
278272
- macOS.Architecture -equals x64
279-
- Agent.HasDevices -equals False
280-
- Agent.IsPaired -equals False
281273
steps:
282274
- template: common/provision.yml
283275
parameters:

src/Core/src/ImageSources/iOS/ImageSourceExtensions.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ public static partial class ImageSourceExtensions
1818
var glyph = (NSString)imageSource.Glyph;
1919

2020
var attString = new NSAttributedString(glyph, font, color);
21-
var imagesize = glyph.GetSizeUsingAttributes(attString.GetUIKitAttributes(0, out _));
21+
var attributes = attString.GetUIKitAttributes(0, out _);
22+
23+
var imagesize = attributes == null ? attString.Size : glyph.GetSizeUsingAttributes(attributes);
2224

2325
UIGraphics.BeginImageContextWithOptions(imagesize, false, scale);
2426
var ctx = new NSStringDrawingContext();

src/Core/src/Platform/iOS/LabelExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ internal static void UpdateTextHtml(this UILabel platformLabel, ILabel label)
8383
StringEncoding = NSStringEncoding.UTF8
8484
};
8585

86-
NSError? nsError = null;
86+
NSError nSError = new NSError();
8787

88-
platformLabel.AttributedText = new NSAttributedString(text, attr, ref nsError);
88+
platformLabel.AttributedText = new NSAttributedString(text, attr, ref nSError);
8989
}
9090

9191
internal static void UpdateTextPlainText(this UILabel platformLabel, IText label)

src/Core/src/Platform/iOS/MauiWebViewNavigationDelegate.cs

+8-5
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,14 @@ public void DidFailProvisionalNavigation(WKWebView webView, WKNavigation navigat
9393
public void DecidePolicy(WKWebView webView, WKNavigationAction navigationAction, Action<WKNavigationActionPolicy> decisionHandler)
9494
{
9595
var handler = Handler;
96-
if (handler == null)
96+
if (handler == null || handler?.VirtualView == null)
97+
{
98+
//the only place we saw this happening is on device tests,
99+
//But the decisionHandler should always be called, or else we will get an NSInternalInconsistencyException
100+
decisionHandler(WKNavigationActionPolicy.Cancel);
97101
return;
102+
}
103+
98104

99105
var navEvent = WebNavigationEvent.NewPage;
100106
var navigationType = navigationAction.NavigationType;
@@ -128,10 +134,7 @@ public void DecidePolicy(WKWebView webView, WKNavigationAction navigationAction,
128134
_lastEvent = navEvent;
129135

130136
var virtualView = handler.VirtualView;
131-
132-
if (virtualView == null)
133-
return;
134-
137+
135138
var request = navigationAction.Request;
136139
var lastUrl = request.Url.ToString();
137140

0 commit comments

Comments
 (0)