Skip to content

Commit 4bdf187

Browse files
committed
Merge remote-tracking branch 'origin/net9.0' into darc-net9.0-de6248c1-5e22-426e-bf67-00145c15fdfa
2 parents 3ce642e + 9ff0b3d commit 4bdf187

31 files changed

+541
-85
lines changed

.github/workflows/yamllint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: 'Checkout'
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
token: ${{ secrets.GITHUB_TOKEN }}
1919
fetch-depth: 0
@@ -35,7 +35,7 @@ jobs:
3535
3636
# only post a comment if the linting fails
3737
- name: Post comment
38-
uses: unsplash/comment-on-pr@v1.3.0
38+
uses: unsplash/comment-on-pr@v1.3.1
3939
if: failure()
4040
env:
4141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Make.config

+5-5
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,11 @@ MONO_HASH := $(NEEDED_MONO_VERSION)
248248
# Minimum Mono version for building XI/XM
249249
MIN_MONO_VERSION=6.12.0.179
250250
MAX_MONO_VERSION=6.12.99
251-
MIN_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2020-02/185/dffa5ab92245f2419238a35b7c2052e9a24036b4/MonoFramework-MDK-6.12.0.179.macos10.xamarin.universal.pkg
251+
MIN_MONO_URL=https://xamjenkinsartifact.blob.core.windows.net/build-package-osx-mono/2020-02/185/dffa5ab92245f2419238a35b7c2052e9a24036b4/MonoFramework-MDK-6.12.0.179.macos10.xamarin.universal.pkg
252252

253253
# Minimum Mono version for Xamarin.Mac apps using the system mono
254254
MIN_XM_MONO_VERSION=6.4.0.94
255-
MIN_XM_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2019-06/77/c608cf3eafaea310e11af13cc9380d770112bb83/MonoFramework-MDK-6.4.0.94.macos10.xamarin.universal.pkg
255+
MIN_XM_MONO_URL=https://xamjenkinsartifact.blob.core.windows.net/build-package-osx-mono/2019-06/77/c608cf3eafaea310e11af13cc9380d770112bb83/MonoFramework-MDK-6.4.0.94.macos10.xamarin.universal.pkg
256256

257257
# Minimum CMake version
258258
MIN_CMAKE_URL=https://cmake.org/files/v3.6/cmake-3.6.2-Darwin-x86_64.dmg
@@ -611,11 +611,11 @@ XCODE_IOS_ARCHIVE_VERSION=xcode-12D4e
611611
# Xcode 12.4 Build 12D4e
612612
XCODE_MACOS_ARCHIVE_VERSION=xcode-12D4e
613613
MONO_IOS_FILENAME:=ios-release-Darwin-$(MONO_HASH).7z
614-
MONO_IOS_URL:=https://xamjenkinsartifact.azureedge.net/mono-sdks/$(XCODE_IOS_ARCHIVE_VERSION)/$(MONO_IOS_FILENAME)
614+
MONO_IOS_URL:=https://xamjenkinsartifact.blob.core.windows.net/mono-sdks/$(XCODE_IOS_ARCHIVE_VERSION)/$(MONO_IOS_FILENAME)
615615
MONO_MAC_FILENAME:=mac-release-Darwin-$(MONO_HASH).7z
616-
MONO_MAC_URL:=https://xamjenkinsartifact.azureedge.net/mono-sdks/$(XCODE_MACOS_ARCHIVE_VERSION)/$(MONO_MAC_FILENAME)
616+
MONO_MAC_URL:=https://xamjenkinsartifact.blob.core.windows.net/mono-sdks/$(XCODE_MACOS_ARCHIVE_VERSION)/$(MONO_MAC_FILENAME)
617617
MONO_MACCATALYST_FILENAME:=maccat-release-Darwin-$(MONO_HASH).7z
618-
MONO_MACCATALYST_URL:=https://xamjenkinsartifact.azureedge.net/mono-sdks/$(XCODE_MACOS_ARCHIVE_VERSION)/$(MONO_MACCATALYST_FILENAME)
618+
MONO_MACCATALYST_URL:=https://xamjenkinsartifact.blob.core.windows.net/mono-sdks/$(XCODE_MACOS_ARCHIVE_VERSION)/$(MONO_MACCATALYST_FILENAME)
619619

620620
# Setup various variables depending on whether mono is downloaded or built from source
621621
ifeq ($(MONO_BUILD_FROM_SOURCE),)

docs/apple-privacy-manifest.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ Verify if your native application code collects any type of data [categorized by
4848
If it does, then you must declare their usage in the privacy manifest file.
4949

5050
## Privacy manifest for Binding projects
51-
If you are Binding project owner, and you are binding a xcframework, then the xcframework provider will need to include the `PrivacyInfo.xcprivacy` file as part of the xcframework. Otherwise, there are two options, provide documentation for package consumers to create the `PrivacyInfo.xcprivacy` file properly or change the bindings to bind an xcframework that has the `PrivacyInfo.xcprivacy` file included. It is currently not possible for Binding project authors to include a `PrivacyInfo.xcprivacy` file outside an xcframework that will be recognized by Apple when submitting an app.
51+
Binding projects fall into two categories, static framework bindings, or dynamic framework bindings. Privacy manifests should be included with the framework by [placing the privacy manifest in the framework bundle](https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle#3875930). If placed properly, then the binding project can automatically place them in the app bundle properly so app developers do not need to provide reasons for the framework api usages.
52+
53+
For a dynamic framework, the framework is added to the app bundle. The privacy policy manifest is in the location that the App Store expects it to be, and there is nothing for the app developer to do.
54+
55+
At this time, when binding a static framework, app developers will be required to manually merge the privacy manifest included with the static framework into the app privacy manifest. This is due to how static libraries are linked into the main app binary removing the need for the framework.
5256

5357
## C# .NET APIs in .NET MAUI
5458
.NET for iOS, tvOS and .NET MAUI build on top of the .NET runtime and BCL. Each SDK's API usages are detailed in the links below.

dotnet/targets/Microsoft.Sdk.DefaultItems.template.props

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,37 @@
2020
<ItemGroup Condition="'$(EnableDefault@PLATFORM@Items)' == 'true' And $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '@TARGET_FRAMEWORK_VERSION@')) And '$(CurrentHash)' == '@CURRENT_HASH_LONG@'">
2121
<!-- Default plist file inclusion -->
2222
<None Include="*.plist">
23-
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))</Link>
23+
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(FullPath)'))</Link>
2424
</None>
2525

2626
<!-- Default Asset Catalog file inclusion -->
2727
<ImageAsset Include="**\*.xcassets\**\*.*" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);**\*.xcassets\**\*.DS_Store">
28-
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))</Link>
28+
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(FullPath)'))</Link>
2929
<Visible>false</Visible>
3030
<IsDefaultItem>true</IsDefaultItem>
3131
</ImageAsset>
3232

3333
<!-- Default Storyboard file inclusion -->
3434
<InterfaceDefinition Include="**\*.storyboard;**\*.xib" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" >
35-
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))</Link>
35+
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(FullPath)'))</Link>
3636
<IsDefaultItem>true</IsDefaultItem>
3737
</InterfaceDefinition>
3838

3939
<!-- Default Atlas Texture file inclusion -->
4040
<AtlasTexture Include="**\*.atlas\*.png" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" >
41-
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))</Link>
41+
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(FullPath)'))</Link>
4242
<IsDefaultItem>true</IsDefaultItem>
4343
</AtlasTexture>
4444

4545
<!-- Default CoreMLModel inclusion -->
4646
<CoreMLModel Include="**\*.mlmodel" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" >
47-
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))</Link>
47+
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(FullPath)'))</Link>
4848
<IsDefaultItem>true</IsDefaultItem>
4949
</CoreMLModel>
5050

5151
<!-- Default Metal inclusion -->
5252
<Metal Include="**\*.metal" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" >
53-
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))</Link>
53+
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(FullPath)'))</Link>
5454
<IsDefaultItem>true</IsDefaultItem>
5555
</Metal>
5656

@@ -74,7 +74,7 @@
7474
@(Compile);
7575
@(EmbeddedResource);
7676
" Condition="'$(_ResourcePrefix)' != ''" >
77-
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(Identity)'))</Link>
77+
<Link>$([MSBuild]::MakeRelative ('$(MSBuildProjectDirectory)', '%(FullPath)'))</Link>
7878
<IsDefaultItem>true</IsDefaultItem>
7979
</BundleResource>
8080
</ItemGroup>

eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<MicrosoftNETRuntimeMonoTargetsSdkPackageVersion>9.0.0-alpha.1.23556.4</MicrosoftNETRuntimeMonoTargetsSdkPackageVersion>
1212
<MicrosoftTemplateEngineTasksVersion>7.0.100-alpha.1.21601.1</MicrosoftTemplateEngineTasksVersion>
1313
<MicrosoftDotNetCecilPackageVersion>0.11.4-alpha.24168.1</MicrosoftDotNetCecilPackageVersion>
14-
<MicrosoftDotNetXHarnessiOSSharedPackageVersion>9.0.0-prerelease.24168.1</MicrosoftDotNetXHarnessiOSSharedPackageVersion>
14+
<MicrosoftDotNetXHarnessiOSSharedPackageVersion>9.0.0-prerelease.24203.1</MicrosoftDotNetXHarnessiOSSharedPackageVersion>
1515
<!-- Manually updated versions -->
1616
<Emscriptennet7WorkloadVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version)</Emscriptennet7WorkloadVersion>
1717
<EmscriptenWorkloadVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version)</EmscriptenWorkloadVersion>

msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx

+5
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,11 @@
713713
{1} - The location the file was found.</comment>
714714
</data>
715715

716+
<data name="M0149b" xml:space="preserve">
717+
<value>Discarded '{0}' with logical name '{1}' because the logical name does not match '{2}'</value>
718+
<comment>{0} - A path to a file.</comment>
719+
</data>
720+
716721
<data name="E0150" xml:space="preserve">
717722
<value> AssemblyPath cannot be null or empty
718723
</value>

msbuild/Xamarin.MacDev.Tasks/Tasks/ACTool.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,12 @@ IEnumerable<ITaskItem> GetCompiledBundleResources (PDictionary output, string in
165165
if (path.EndsWith ("partial-info.plist", StringComparison.Ordinal))
166166
continue;
167167

168-
var vpath = PathUtils.AbsoluteToRelative (pwd, PathUtils.ResolveSymbolicLinks (path));
168+
var resolvedPath = PathUtils.ResolveSymbolicLinks (path);
169+
var vpath = PathUtils.AbsoluteToRelative (pwd, resolvedPath);
169170
var item = new TaskItem (vpath);
170171

171172
// Note: the intermediate bundle dir functions as a top-level bundle dir
172-
var logicalName = PathUtils.AbsoluteToRelative (intermediateBundleDir, path);
173+
var logicalName = PathUtils.AbsoluteToRelative (intermediateBundleDir, resolvedPath);
173174

174175
if (logicalName.StartsWith ("../OnDemandResources/", StringComparison.Ordinal)) {
175176
logicalName = logicalName.Substring (3);

msbuild/Xamarin.MacDev.Tasks/Tasks/FindItemWithLogicalName.cs

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public override bool Execute ()
4444
Item = item;
4545
break;
4646
}
47+
Log.LogMessage (MessageImportance.Low, MSBStrings.M0149b /* "Discarded '{0}' with logical name '{1}' because the logical name does not match '{2}'" */, item.ItemSpec, logical, LogicalName);
4748
}
4849
}
4950

src/AVFoundation/AVAudioSourceNode.cs

+165
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
using System;
2+
using System.ComponentModel;
3+
using System.Runtime.CompilerServices;
4+
5+
using AudioToolbox;
6+
using ObjCRuntime;
7+
8+
namespace AVFoundation {
9+
10+
// This is messy...
11+
// * The good delegate is:
12+
// - AVAudioSourceNodeRenderHandler in XAMCORE_5_0
13+
// - AVAudioSourceNodeRenderHandler3 otherwise
14+
// * There are two legacy delegates:
15+
// - AVAudioSourceNodeRenderHandler in .NET and legacy Xamarin
16+
// - AVAudioSourceNodeRenderHandler2 in legacy Xamarin.
17+
//
18+
// History of mistakes:
19+
//
20+
// 1. We first bound this using AVAudioSourceNodeRenderHandler (legacy Xamarin version), which was wrong.
21+
// 2. We then found the mistake, and bound it as AVAudioSourceNodeRenderHandler2 in legacy Xamarin, removed the initial version in .NET, and named it AVAudioSourceNodeRenderHandler in .NET.
22+
// * However, we failed to write tests, so this delegate was broken too.
23+
// 3. Finally we got a customer report, and realized the new delegate was broken too. So now there are two broken delegates, and one working (AVAudioSourceNodeRenderHandler3 in .NET and legacy Xamarin, named as AVAudioSourceNodeRenderHandler in XAMCORE_5_0).
24+
// * And tests were added too.
25+
//
26+
// Note: broken = made to work with a workaround, which makes this even messier.
27+
//
28+
29+
/// <summary>The delegate that will be called in a callback from <see cref="T:AudioToolbox.AVAudioSourceNode" />.</summary>
30+
/// <returns>An OSStatus result code. Return 0 to indicate success.</returns>
31+
/// <param name="isSilence">Indicates whether the supplied audio data only contains silence.</param>
32+
/// <param name="timestamp">The timestamp the audio renders (HAL time).</param>
33+
/// <param name="frameCount">The number of frames of audio to supply.</param>
34+
/// <param name="outputData">The <see cref="T:AudioToolbox.AudioBuffers" /> that contains the supplied audio data when the callback returns.</param>
35+
#if XAMCORE_5_0
36+
public delegate /* OSStatus */ int AVAudioSourceNodeRenderHandler (ref bool isSilence, ref AudioTimeStamp timestamp, uint frameCount, AudioBuffers outputData);
37+
#else
38+
public delegate /* OSStatus */ int AVAudioSourceNodeRenderHandler3 (ref bool isSilence, ref AudioTimeStamp timestamp, uint frameCount, AudioBuffers outputData);
39+
#endif
40+
41+
#if !XAMCORE_5_0
42+
#if NET
43+
[EditorBrowsable (EditorBrowsableState.Never)]
44+
public delegate /* OSStatus */ int AVAudioSourceNodeRenderHandler (ref bool isSilence, ref AudioTimeStamp timestamp, uint frameCount, ref AudioBuffers outputData);
45+
#else
46+
[EditorBrowsable (EditorBrowsableState.Never)]
47+
public delegate /* OSStatus */ int AVAudioSourceNodeRenderHandler (bool isSilence, AudioToolbox.AudioTimeStamp timestamp, uint frameCount, ref AudioBuffers outputData);
48+
[EditorBrowsable (EditorBrowsableState.Never)]
49+
public delegate /* OSStatus */ int AVAudioSourceNodeRenderHandler2 (ref bool isSilence, ref AudioTimeStamp timestamp, uint frameCount, ref AudioBuffers outputData);
50+
#endif // NET
51+
#endif // XAMCORE_5_0
52+
53+
public partial class AVAudioSourceNode {
54+
#if !XAMCORE_5_0 && NET
55+
[EditorBrowsable (EditorBrowsableState.Never)]
56+
[Obsolete ("Use the overload that takes a delegate that does not take a 'ref AudioBuffers' instead. Assigning a value to the 'inputData' parameter in the callback has no effect.")]
57+
public AVAudioSourceNode (AVAudioSourceNodeRenderHandler renderHandler)
58+
: this (GetHandler (renderHandler))
59+
{
60+
}
61+
62+
[EditorBrowsable (EditorBrowsableState.Never)]
63+
[Obsolete ("Use the overload that takes a delegate that does not take a 'ref AudioBuffers' instead. Assigning a value to the 'inputData' parameter in the callback has no effect.")]
64+
public AVAudioSourceNode (AVAudioFormat format, AVAudioSourceNodeRenderHandler renderHandler)
65+
: this (format, GetHandler (renderHandler))
66+
{
67+
}
68+
#endif // !XAMCORE_5_0
69+
70+
#if !NET
71+
[EditorBrowsable (EditorBrowsableState.Never)]
72+
[Obsolete ("Use the overload that takes a delegate that does not take a 'ref AudioBuffers' instead. Assigning a value to the 'inputData' parameter in the callback has no effect.")]
73+
public AVAudioSourceNode (AVAudioSourceNodeRenderHandler2 renderHandler)
74+
: this (GetHandler (renderHandler))
75+
{
76+
}
77+
78+
[EditorBrowsable (EditorBrowsableState.Never)]
79+
[Obsolete ("Use the overload that takes a delegate that does not take a 'ref AudioBuffers' instead. Assigning a value to the 'inputData' parameter in the callback has no effect.")]
80+
public AVAudioSourceNode (AVAudioFormat format, AVAudioSourceNodeRenderHandler2 renderHandler)
81+
: this (format, GetHandler (renderHandler))
82+
{
83+
}
84+
#endif // !NET
85+
86+
/// <summary>Creates an <see cref="T:AudioToolbox.AVAudioSourceNode" /> with the specified callback to render audio.</summary>
87+
/// <param name="renderHandler">The callback that will be called to supply audio data.</param>
88+
#if XAMCORE_5_0
89+
public AVAudioSourceNode (AVAudioSourceNodeRenderHandler renderHandler)
90+
#else
91+
public AVAudioSourceNode (AVAudioSourceNodeRenderHandler3 renderHandler)
92+
#endif // XAMCORE_5_0
93+
: this (GetHandler (renderHandler))
94+
{
95+
}
96+
97+
/// <summary>Creates an <see cref="T:AudioToolbox.AVAudioSourceNode" /> with the specified callback to render audio.</summary>
98+
/// <param name="format">The format of the PCM audio data the callback supplies.</param>
99+
/// <param name="renderHandler">The callback that will be called to supply audio data.</param>
100+
#if XAMCORE_5_0
101+
public AVAudioSourceNode (AVAudioFormat format, AVAudioSourceNodeRenderHandler renderHandler)
102+
#else
103+
public AVAudioSourceNode (AVAudioFormat format, AVAudioSourceNodeRenderHandler3 renderHandler)
104+
#endif // XAMCORE_5_0
105+
: this (format, GetHandler (renderHandler))
106+
{
107+
}
108+
109+
#if !NET
110+
static AVAudioSourceNodeRenderHandlerRaw GetHandler (AVAudioSourceNodeRenderHandler renderHandler)
111+
{
112+
AVAudioSourceNodeRenderHandlerRaw rv = (IntPtr isSilence, IntPtr timestamp, uint frameCount, IntPtr outputData) => {
113+
unsafe {
114+
byte* isSilencePtr = (byte*) isSilence;
115+
bool isSilenceBool = (*isSilencePtr) != 0;
116+
AudioTimeStamp timestampValue = *(AudioTimeStamp*) timestamp;
117+
var buffers = new AudioBuffers (outputData);
118+
return renderHandler (isSilenceBool, timestampValue, frameCount, ref buffers);
119+
}
120+
};
121+
return rv;
122+
}
123+
#endif // !NET
124+
125+
#if !XAMCORE_5_0
126+
#if NET
127+
static AVAudioSourceNodeRenderHandlerRaw GetHandler (AVAudioSourceNodeRenderHandler renderHandler)
128+
#else
129+
static AVAudioSourceNodeRenderHandlerRaw GetHandler (AVAudioSourceNodeRenderHandler2 renderHandler)
130+
#endif // NET
131+
{
132+
AVAudioSourceNodeRenderHandlerRaw rv = (IntPtr isSilence, IntPtr timestamp, uint frameCount, IntPtr outputData) => {
133+
unsafe {
134+
byte* isSilencePtr = (byte*) isSilence;
135+
bool isSilenceBool = (*isSilencePtr) != 0;
136+
var buffers = new AudioBuffers (outputData);
137+
var rv = renderHandler (ref isSilenceBool, ref Unsafe.AsRef<AudioTimeStamp> ((void*) timestamp), frameCount, ref buffers);
138+
*isSilencePtr = isSilenceBool.AsByte ();
139+
return rv;
140+
}
141+
};
142+
return rv;
143+
}
144+
#endif // !XAMCORE_5_0
145+
146+
#if XAMCORE_5_0
147+
static AVAudioSourceNodeRenderHandlerRaw GetHandler (AVAudioSourceNodeRenderHandler renderHandler)
148+
#else
149+
static AVAudioSourceNodeRenderHandlerRaw GetHandler (AVAudioSourceNodeRenderHandler3 renderHandler)
150+
{
151+
#endif // !XAMCORE_5_0
152+
AVAudioSourceNodeRenderHandlerRaw rv = (IntPtr isSilence, IntPtr timestamp, uint frameCount, IntPtr outputData) => {
153+
unsafe {
154+
byte* isSilencePtr = (byte*) isSilence;
155+
bool isSilenceBool = (*isSilencePtr) != 0;
156+
var buffers = new AudioBuffers (outputData);
157+
var rv = renderHandler (ref isSilenceBool, ref Unsafe.AsRef<AudioTimeStamp> ((void*) timestamp), frameCount, buffers);
158+
*isSilencePtr = isSilenceBool.AsByte ();
159+
return rv;
160+
}
161+
};
162+
return rv;
163+
}
164+
}
165+
}

src/AVFoundation/AVCompat.cs

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#nullable enable
1717

1818
namespace AVFoundation {
19-
public delegate int AVAudioSourceNodeRenderHandler (bool isSilence, AudioToolbox.AudioTimeStamp timestamp, uint frameCount, ref AudioToolbox.AudioBuffers outputData);
20-
2119
partial class AVAudioNode {
2220
internal AVAudioNode () { }
2321
}

src/AudioToolbox/AudioQueue.cs

+9
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
using System.IO;
3535
using System.Collections;
3636
using System.Collections.Generic;
37+
using System.Diagnostics.CodeAnalysis;
3738
using System.Runtime.CompilerServices;
3839
using System.Runtime.InteropServices;
3940
using CoreFoundation;
@@ -987,7 +988,11 @@ public IntPtr GetProperty (AudioQueueProperty property, out int size)
987988
}
988989

989990
// Should be private
991+
#if NET
992+
public unsafe T GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioQueueProperty property) where T : struct
993+
#else
990994
public unsafe T GetProperty<T> (AudioQueueProperty property) where T : struct
995+
#endif
991996
{
992997
int size;
993998

@@ -1011,7 +1016,11 @@ public unsafe T GetProperty<T> (AudioQueueProperty property) where T : struct
10111016
}
10121017
}
10131018

1019+
#if NET
1020+
unsafe T GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioConverterPropertyID property) where T : struct
1021+
#else
10141022
unsafe T GetProperty<T> (AudioConverterPropertyID property) where T : struct
1023+
#endif
10151024
{
10161025
int size;
10171026

src/CoreGraphics/CGDisplay.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace CoreGraphics
1313
[SupportedOSPlatform ("maccatalyst")]
1414
[SupportedOSPlatform ("macos")]
1515
#else
16-
[MacCatalyst (15,0)]
16+
[MacCatalyst (13,1)]
1717
#endif
1818
public enum CGCaptureOptions : uint
1919
{
@@ -25,7 +25,7 @@ public enum CGCaptureOptions : uint
2525
[SupportedOSPlatform ("maccatalyst")]
2626
[SupportedOSPlatform ("macos")]
2727
#else
28-
[MacCatalyst (15,0)]
28+
[MacCatalyst (13,1)]
2929
#endif
3030
public static class CGDisplay
3131
{
@@ -89,6 +89,7 @@ public static int GetGammaTableCapacity (int display)
8989
[SupportedOSPlatform ("maccatalyst")]
9090
[SupportedOSPlatform ("macos")]
9191
[ObsoletedOSPlatform ("macos10.9")]
92+
[ObsoletedOSPlatform ("maccatalyst13.1")]
9293
#else
9394
[Deprecated (PlatformName.MacOSX, 10, 9)]
9495
#endif

0 commit comments

Comments
 (0)