Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NearbyInterction] Add support for xcode 13 beta 4. #12351

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/NearbyInteraction/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace NearbyInteraction {

[NoWatch, NoTV, NoMac, iOS (14,0)]
[Watch (8,0), NoTV, NoMac, iOS (14,0)]
[ErrorDomain ("NIErrorDomain")]
[Native]
public enum NIErrorCode : long
Expand All @@ -26,7 +26,7 @@ public enum NIErrorCode : long
UserDidNotAllow = -5884,
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[Watch (8,0), NoTV, NoMac, iOS (14,0)]
[Native]
public enum NINearbyObjectRemovalReason : long
{
Expand Down
4 changes: 2 additions & 2 deletions src/NearbyInteraction/NINearbyObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using ObjCRuntime;
using Vector3 = global::OpenTK.Vector3;

#if __IOS__
#if __IOS__ || WATCH
namespace NearbyInteraction {
partial class NINearbyObject
{
Expand All @@ -38,4 +38,4 @@ public static Vector3 DirectionNotAvailable {
}

}
#endif //__IOS__
#endif
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2145,6 +2145,7 @@ WATCHOS_FRAMEWORKS = \
MapKit \
MediaPlayer \
MobileCoreServices \
NearbyInteraction \
PassKit \
PushKit \
Security \
Expand Down
29 changes: 23 additions & 6 deletions src/nearbyinteraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@

namespace NearbyInteraction {

[NoWatch, NoTV, NoMac, iOS (14,0)]
[Watch (8,0), NoTV, NoMac, iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface NIConfiguration : NSCopying, NSSecureCoding {}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[Watch (8,0), NoTV, NoMac, iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface NIDiscoveryToken : NSCopying, NSSecureCoding {}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[Watch (8,0), NoTV, NoMac, iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NIConfiguration))]
[DisableDefaultCtor]
Expand All @@ -40,7 +40,7 @@ interface NINearbyPeerConfiguration
IntPtr Constructor (NIDiscoveryToken peerToken);
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[Watch (8,0), NoTV, NoMac, iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
Expand All @@ -62,7 +62,7 @@ Vector3 Direction {
float DistanceNotAvailable { get; }
}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[Watch (8,0), NoTV, NoMac, iOS (14,0)]
[MacCatalyst (14,0)]
[BaseType (typeof (NSObject))]
interface NISession
Expand Down Expand Up @@ -99,7 +99,7 @@ interface NISession

interface INISessionDelegate {}

[NoWatch, NoTV, NoMac, iOS (14,0)]
[Watch (8,0), NoTV, NoMac, iOS (14,0)]
[MacCatalyst (14,0)]
[Protocol]
[Model (AutoGeneratedName = true)]
Expand All @@ -120,5 +120,22 @@ interface NISessionDelegate

[Export ("session:didInvalidateWithError:")]
void DidSessionInvalidate (NISession session, NSError error);

[Watch (8,0), NoTV, NoMac, iOS (15,0), MacCatalyst (15,0)]
[Export ("session:didGenerateShareableConfigurationData:forObject:")]
void DidGenerateShareableConfigurationData (NISession session, NSData shareableConfigurationData, NINearbyObject @object);
}

[Watch (8,0), NoTV, NoMac, iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NIConfiguration))]
[DisableDefaultCtor]
interface NINearbyAccessoryConfiguration
{
[Export ("accessoryDiscoveryToken", ArgumentSemantic.Copy)]
NIDiscoveryToken AccessoryDiscoveryToken { get; }

[Export ("initWithData:error:")]
IntPtr Constructor (NSData data, [NullAllowed] out NSError error);
}

}
4 changes: 0 additions & 4 deletions tests/xtro-sharpie/MacCatalyst-NearbyInteraction.todo

This file was deleted.

4 changes: 0 additions & 4 deletions tests/xtro-sharpie/iOS-NearbyInteraction.todo

This file was deleted.

29 changes: 0 additions & 29 deletions tests/xtro-sharpie/watchOS-NearbyInteraction.todo

This file was deleted.

1 change: 1 addition & 0 deletions tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ public static Frameworks GetwatchOSFrameworks (bool is_simulator_build)
{ "UniformTypeIdentifiers", "UniformTypeIdentifiers", 7,0 },

{ "Chip", "CHIP", new Version (8, 0), NotAvailableInSimulator /* no headers in beta 2 */ },
{ "NearbyInteraction", "NearbyInteraction", 8,0 },

};
}
Expand Down