dotnet / dotnet/macios

Xtro Selector Naming Bug

Open
#15,595 1 comment 0 reactions 0 assignees View on GitHub
bug tests xtro
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

While doing the HealthKit binding updates for Xcode 14 beta 1-3,
Xtro produced the following funky selector names:

```
!missing-selector! +HKUnit::degreeHKUnitUnit not bound
!missing-selector! +HKUnit::radianHKUnitUnit not bound
!missing-selector! +HKUnit::radianHKUnitUnitWithMetricPrefix: not bound
```
These selector names did not show up in the Xcode headers, Apple web docs, or in the sharpie output.
After further examination and help from others, we found that the actual name for these selectors were
```
degreeAngleUnit
radianAngleUnit
radianAngleUnitWithMetricPrefix:
```
Somewhere, the word "Angle" was replaced with "HKUnit".

However, after adding in the correct selectors, Xtro did recognize that these selectors were updated and did not complain about them.

### Sharpie Output
```
// @interface Angle (HKUnit)
[Category]
[BaseType (typeof(HKUnit))]
interface HKUnit_Angle
{
// +(instancetype _Nonnull)radianAngleUnitWithMetricPrefix:(HKMetricPrefix)prefix __attribute__((availability(ios, introduced=16.0))) __attribute__((availability(watchos, introduced=9.0))) __attribute__((availability(maccatalyst, introduced=16.0))) __attribute__((availability(macos, introduced=13.0)));
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0)]
[Static]
[Export ("radianAngleUnitWithMetricPrefix:")]
HKUnit RadianAngleUnitWithMetricPrefix (HKMetricPrefix prefix);

// +(instancetype _Nonnull)radianAngleUnit __attribute__((availability(ios, introduced=16.0))) __attribute__((availability(watchos, introduced=9.0))) __attribute__((availability(maccatalyst, introduced=16.0))) __attribute__((availability(macos, introduced=13.0)));
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0)]
[Static]
[Export ("radianAngleUnit")]
HKUnit RadianAngleUnit ();

// +(instancetype _Nonnull)degreeAngleUnit __attribute__((availability(ios, introduced=16.0))) __attribute__((availability(watchos, introduced=9.0))) __attribute__((availability(maccatalyst, introduced=16.0))) __attribute__((availability(macos, introduced=13.0)));
[Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0)]
[Static]
[Export ("degreeAngleUnit")]
HKUnit DegreeAngleUnit ();
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue identifies Xtro’s HealthKit selector-generation path and includes Sharpie output as the reference; start by tracing how these three selectors are produced during the Xcode 14 HealthKit binding update. Done means Xtro emits degreeAngleUnit, radianAngleUnit, and radianAngleUnitWithMetricPrefix: without missing-selector warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, objective-c
Domain
mobile-dev, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.