Skip to content

Commit 4932429

Browse files
authored
[NearbyInteraction] Update to Xcode 26 beta 1-5. (#23586)
1 parent 145c01b commit 4932429

File tree

8 files changed

+91
-22
lines changed

8 files changed

+91
-22
lines changed

runtime/bindings-generator.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ static IEnumerable<FunctionData> GetFunctionData ()
9595
}
9696
);
9797

98+
data.Add (
99+
new FunctionData {
100+
Comment = " // NVector3d func ()",
101+
Prefix = "simd__",
102+
Variants = Variants.All,
103+
ReturnType = Types.NVector3d,
104+
}
105+
);
106+
98107
data.Add (
99108
new FunctionData {
100109
Comment = " // void func (NVector3)",

src/nearbyinteraction.cs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using ObjCRuntime;
1111
using Foundation;
1212
using CoreFoundation;
13+
using CoreGraphics;
1314
using System;
1415
using System.Numerics;
1516
#if __MACCATALYST__ || !IOS
@@ -173,6 +174,10 @@ interface NISessionDelegate {
173174
[NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)]
174175
[Export ("sessionDidStartRunning:")]
175176
void DidSessionStartRunning (NISession session);
177+
178+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
179+
[Export ("session:didUpdateDLTDOAMeasurements:")]
180+
void DidUpdateDlTdoaMeasurements (NISession session, NIDlTdoaMeasurement [] measurements);
176181
}
177182

178183
[NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)]
@@ -230,6 +235,11 @@ interface NIDeviceCapability {
230235
[Abstract (GenerateExtensionMethod = true)]
231236
[Export ("supportsExtendedDistanceMeasurement")]
232237
bool SupportsExtendedDistanceMeasurement { get; }
238+
239+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
240+
[Abstract]
241+
[Export ("supportsDLTDOAMeasurement")]
242+
bool SupportsDlTdoaMeasurement { get; }
233243
}
234244

235245
[NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)]
@@ -242,4 +252,69 @@ interface NIAlgorithmConvergence : NSCopying, NSSecureCoding {
242252
[Export ("reasons")]
243253
string [] Reasons { get; }
244254
}
255+
256+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
257+
[BaseType (typeof (NIConfiguration), Name = "NIDLTDOAConfiguration")]
258+
[DisableDefaultCtor]
259+
// DLTDOA = Down Link Time Difference of Arrival(DL-TDoA)
260+
interface NIDlTdoaConfiguration {
261+
[Export ("networkIdentifier")]
262+
nint NetworkIdentifier { get; set; }
263+
264+
[Export ("initWithNetworkIdentifier:")]
265+
NativeHandle Constructor (nint networkIdentifier);
266+
}
267+
268+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
269+
[Native]
270+
[NativeName ("NIDLTDOACoordinatesType")]
271+
// DLTDOA = Down Link Time Difference of Arrival(DL-TDoA)
272+
public enum NIDlTdoaCoordinatesType : long {
273+
Geodetic = 0,
274+
Relative = 1,
275+
}
276+
277+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
278+
[Native]
279+
[NativeName ("NIDLTDOAMeasurementType")]
280+
// DLTDOA = Down Link Time Difference of Arrival(DL-TDoA)
281+
public enum NIDlTdoaMeasurementType : long {
282+
Poll = 0,
283+
Response = 1,
284+
Final = 2,
285+
}
286+
287+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
288+
[BaseType (typeof (NSObject), Name = "NIDLTDOAMeasurement")]
289+
[DisableDefaultCtor]
290+
// DLTDOA = Down Link Time Difference of Arrival(DL-TDoA)
291+
interface NIDlTdoaMeasurement : NSCopying, NSSecureCoding {
292+
[Export ("address")]
293+
nuint Address { get; }
294+
295+
[Export ("measurementType", ArgumentSemantic.Assign)]
296+
NIDlTdoaMeasurementType MeasurementType { get; }
297+
298+
[Export ("transmitTime")]
299+
double TransmitTime { get; }
300+
301+
[Export ("receiveTime")]
302+
double ReceiveTime { get; }
303+
304+
[Export ("signalStrength")]
305+
double SignalStrength { get; }
306+
307+
[Export ("carrierFrequencyOffset")]
308+
double CarrierFrequencyOffset { get; }
309+
310+
[Export ("coordinatesType", ArgumentSemantic.Assign)]
311+
NIDlTdoaCoordinatesType CoordinatesType { get; }
312+
313+
[Export ("coordinates", ArgumentSemantic.Assign)]
314+
NVector3d Coordinates {
315+
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
316+
get;
317+
}
318+
}
319+
245320
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# This selector requires ARKit, which doesn't work on Mac Catalyst
22
!missing-selector! NISession::setARSession: not bound
3+
# Headers are clear that these two enums are not supported on Mac Catalyst, don't know why xtro thinks they are
4+
!missing-enum! NIDLTDOACoordinatesType not bound
5+
!missing-enum! NIDLTDOAMeasurementType not bound

tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-NearbyInteraction.todo

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/iOS-NearbyInteraction.todo

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Headers are clear that these two enums are not supported on macOS, don't know why xtro thinks they are
2+
!missing-enum! NIDLTDOACoordinatesType not bound
3+
!missing-enum! NIDLTDOAMeasurementType not bound

tests/xtro-sharpie/api-annotations-dotnet/macOS-NearbyInteraction.todo

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/xtro-sharpie/xtro-sharpie/SimdCheck.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class NativeSimdInfo {
4242
{ "vector_uint4", new NativeSimdInfo { Managed = "Vector4i", }},
4343
// simd_doubleX is typedefed to vector_doubleX
4444
{ "simd_double2", new NativeSimdInfo { Managed = "Vector2d" }},
45+
{ "simd_double3", new NativeSimdInfo { Managed = "NVector3d" }},
4546
// simd_floatX is typedefed to vector_floatX
4647
{ "simd_float2", new NativeSimdInfo { Managed = "Vector2" }},
4748
{ "simd_float3", new NativeSimdInfo { Managed = "Vector3" }},

0 commit comments

Comments
 (0)