Skip to content

Commit

Permalink
[SensorKit] Updates for Xcode13 Beta1
Browse files Browse the repository at this point in the history
No updates for Beta 2 or 3
  • Loading branch information
tj-devel709 committed Jul 23, 2021
1 parent a27a58a commit 62a9fd9
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 34 deletions.
87 changes: 87 additions & 0 deletions src/sensorkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,32 @@ enum SRWristLocation : long
Right,
}

[NoWatch, NoTV, NoMac, iOS (15,0), MacCatalyst (15,0)]
[Native]
public enum SRKeyboardMetricsSentimentCategory : long
{
Absolutist,
Down,
Death,
Anxiety,
Anger,
Health,
Positive,
Sad,
LowEnergy,
Confused,
}

[NoWatch, NoTV, NoMac, iOS (15,0), MacCatalyst (15,0)]
[Native]
public enum SRTextInputSessionType : long
{
Keyboard = 1,
ThirdPartyKeyboard,
Pencil,
Dictation,
}

[NoWatch, NoTV, NoMac]
[iOS (14,0)]
[MacCatalyst (14,0)]
Expand Down Expand Up @@ -243,6 +269,14 @@ interface SRApplicationUsage {

[Export ("usageTime")]
double /* NSTimeInterval */ UsageTime { get; }

[iOS (15,0), MacCatalyst (15,0)]
[Export ("reportApplicationIdentifier")]
string ReportApplicationIdentifier { get; }

[iOS (15,0), MacCatalyst (15,0)]
[Export ("textInputSessions", ArgumentSemantic.Copy)]
SRTextInputSession[] TextInputSessions { get; }
}

[NoWatch, NoTV, NoMac]
Expand Down Expand Up @@ -376,6 +410,10 @@ interface SRKeyboardMetrics {
[Export ("height")]
NSMeasurement<NSUnitLength> Height { get; }

[iOS (15,0), MacCatalyst (15,0)]
[Export ("inputModes", ArgumentSemantic.Copy)]
string[] InputModes { get; }

// SRKeyboardMetrics_ScalarMetrics

[Export ("totalWords")]
Expand Down Expand Up @@ -573,6 +611,36 @@ interface SRKeyboardMetrics {

[Export ("deleteToDeletes", ArgumentSemantic.Strong)]
SRKeyboardProbabilityMetric<NSUnitDuration>[] DeleteToDeletes { get; }

[iOS (15,0), MacCatalyst (15,0)]
[Export ("pathTypingSpeed")]
double PathTypingSpeed { get; }

[iOS (15,0), MacCatalyst (15,0)]
[Export ("totalPathPauses")]
nint TotalPathPauses { get; }

[iOS (15,0), MacCatalyst (15,0)]
[Export ("totalPauses")]
nint TotalPauses { get; }

[iOS (15,0), MacCatalyst (15,0)]
[Export ("totalTypingEpisodes")]
nint TotalTypingEpisodes { get; }

[iOS (15,0), MacCatalyst (15,0)]
[Export ("typingSpeed")]
double TypingSpeed { get; }

// SRKeyboardMetrics_SentimentCounts

[iOS (15,0), MacCatalyst (15,0)]
[Export ("wordCountForSentimentCategory:")]
nint WordCount (SRKeyboardMetricsSentimentCategory category);

[iOS (15,0), MacCatalyst (15,0)]
[Export ("emojiCountForSentimentCategory:")]
nint EmojiCount (SRKeyboardMetricsSentimentCategory category);
}

[NoWatch, NoTV, NoMac]
Expand Down Expand Up @@ -708,6 +776,14 @@ enum SRSensor {

[Field ("SRSensorKeyboardMetrics")]
KeyboardMetrics,

[iOS (15,0), MacCatalyst (15,0)]
[Field ("SRSensorSiriSpeechMetrics")]
SiriSpeechMetrics,

[iOS (15,0), MacCatalyst (15,0)]
[Field ("SRSensorTelephonySpeechMetrics")]
TelephonySpeechMetrics,
}

[NoWatch, NoTV, NoMac]
Expand Down Expand Up @@ -821,4 +897,15 @@ interface NSString_SRDeletionRecord {
[Export ("sr_sensorForDeletionRecordsFromSensor")]
NSString _GetSensorForDeletionRecordsFromSensor ();
}

[NoWatch, NoTV, NoMac, iOS (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
interface SRTextInputSession /* privately conforms to NSCoding and NSSecureCoding */
{
[Export ("duration")]
double Duration { get; }

[Export ("sessionType")]
SRTextInputSessionType SessionType { get; }
}
}
2 changes: 2 additions & 0 deletions tests/introspection/iOS/iOSApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ protected override bool Skip (Type type, string protocolName)
case "ARDepthData":
case "ARSkeletonDefinition": // device only
case "NSMergePolicy":
case "SRTextInputSession": // conformance not in headers
return true;
}
break;
Expand Down Expand Up @@ -678,6 +679,7 @@ protected override bool Skip (Type type, string protocolName)
case "ARDepthData":
case "ARSkeletonDefinition": // device only
case "NSMergePolicy":
case "SRTextInputSession": // conformance not in headers
return true;
}
break;
Expand Down
17 changes: 0 additions & 17 deletions tests/xtro-sharpie/MacCatalyst-SensorKit.todo

This file was deleted.

17 changes: 0 additions & 17 deletions tests/xtro-sharpie/iOS-SensorKit.todo

This file was deleted.

7 comments on commit 62a9fd9

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

❌ [CI Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)

Packages generated

View packages

Test results

2 tests failed, 222 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Debug [dotnet]: Failed (Tests run: 2629 Passed: 2486 Inconclusive: 35 Failed: 2 Ignored: 141)
  • Documentation/All: Failed

Pipeline on Agent XAMBOT-1028.BigSur'
[SensorKit] Updates for Xcode13 Beta1

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🔥 Tests failed catastrophically on VSTS: device tests tvOS 🔥

Not enough free space in the host.

Pipeline on Agent
[SensorKit] Updates for Xcode13 Beta1

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ Tests were not ran (VSTS: device tests iOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[SensorKit] Updates for Xcode13 Beta1

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ Tests were not ran (VSTS: device tests tvOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[SensorKit] Updates for Xcode13 Beta1

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ Tests passed on macOS Mac Catalina (10.15) ✅

Tests passed

All tests on macOS X Mac Catalina (10.15) passed.

Pipeline on Agent
[SensorKit] Updates for Xcode13 Beta1

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ Tests passed on macOS Mac Mojave (10.14) ✅

Tests passed

All tests on macOS X Mac Mojave (10.14) passed.

Pipeline on Agent
[SensorKit] Updates for Xcode13 Beta1

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ Tests passed on macOS Mac High Sierra (10.13) ✅

Tests passed

All tests on macOS X Mac High Sierra (10.13) passed.

Pipeline on Agent
[SensorKit] Updates for Xcode13 Beta1

Please sign in to comment.