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

[arkit] Update for Xcode 9 GM #2681

Merged
merged 3 commits into from
Sep 14, 2017
Merged
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
6 changes: 5 additions & 1 deletion src/arkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ interface ARSessionDelegate : ARSessionObserver {
[iOS (11,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof (NSObject))]
[Abstract]
[DisableDefaultCtor]
interface ARConfiguration : NSCopying {

Expand All @@ -496,6 +497,7 @@ interface ARConfiguration : NSCopying {
[iOS (11,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof (ARConfiguration))]
[DisableDefaultCtor]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double check headers/doc - I suspect it's available

interface ARWorldTrackingConfiguration {

[Export ("planeDetection", ArgumentSemantic.Assign)]
Expand All @@ -505,6 +507,7 @@ interface ARWorldTrackingConfiguration {
[iOS (11,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof(ARConfiguration))]
[DisableDefaultCtor]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if it was confusing ;-)
but in this case it might be valid but...
meant that I did not knew if init made sense - because the base type did not have it but was abstract
It turns out it's valid
https://developer.apple.com/documentation/arkit/arorientationtrackingconfiguration/2923556-init?language=objc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry I misinterpreted that and thought you checked (:

interface AROrientationTrackingConfiguration {}

[iOS (11,0)]
Expand All @@ -531,6 +534,7 @@ interface ARTrackable {
[iOS (11,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof(ARConfiguration))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a [DisableDefaultCtor] on the base type
but in this case it might be valid but...
The abstract base class for AR session configurations. https://developer.apple.com/documentation/arkit/arconfiguration

so there's an [Abstract] missing from ARConfiguration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARConfiguration should indeed be [Abstract] and [DisableDefaultCtor] is right here (:

/** Unavailable */
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

[DisableDefaultCtor]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double check headers/doc - I suspect it's available

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interface ARFaceTrackingConfiguration {}

[iOS (11,0)]
Expand Down Expand Up @@ -560,7 +564,6 @@ interface ARFaceGeometry : NSCopying {
[Export ("vertexCount")]
nuint VertexCount { get; }

// @property (readonly, nonatomic) const vector_float3 * _Nonnull vertices;
[Export ("vertices")]
Vector3 Vertices {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
Expand Down Expand Up @@ -605,6 +608,7 @@ interface ARSCNFaceGeometry {
[iOS (11,0)]
[NoWatch, NoTV, NoMac]
[BaseType (typeof(ARLightEstimate))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base type has a [DisableDefaultCtor] so the subclass should too

Copy link
Contributor Author

@VincentDondain VincentDondain Sep 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right ARDirectionalLightEstimate subclass doesn't have init

[DisableDefaultCtor]
interface ARDirectionalLightEstimate {
[Export ("sphericalHarmonicsCoefficients", ArgumentSemantic.Copy)]
NSData SphericalHarmonicsCoefficients { get; }
Expand Down