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

[CoreHaptics] Add support for Xcode13 beta1. #11963

Merged
merged 3 commits into from
Jun 17, 2021

Conversation

mandel-macaque
Copy link
Member

No description provided.

@mandel-macaque mandel-macaque added the note-highlight Worth calling out specifically in release notes label Jun 16, 2021
@mandel-macaque mandel-macaque added this to the xcode13.0 milestone Jun 16, 2021
@mandel-macaque
Copy link
Member Author

@spouliot locally I have the following when running xtro:

!missing-field! CHHapticAudioResourceKeyUseVolumeEnvelope not bound
!missing-field! CHHapticPatternKeyEventWaveformUseVolumeEnvelope not bound

Yet we have:

Files are added in mac (else all the other will fail) and the other platforms pick the fields correctly from the keys of the strong dict. Any ideas?

@@ -373,6 +377,8 @@ partial interface CHHapticPatternDefinition {
NSObject WeakParameterCurve { get; set; }
[Export ("ParameterCurveControlPointsKey")]
NSObject WeakParameterCurveControlPoints { get; set; }
[Advice ("The default value is true.")]
bool EventWaveformUseVolumeEnvelope { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm... is this only used as an output ?
because if it's an output then, when created, the value will be false
This can be bound as bool? if the default can (or should) be ignore

Copy link
Contributor

Choose a reason for hiding this comment

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

You need to copy the availability [TV (15,0), NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
since this is the public API developers will be using (they keys being internal)

partial interface CHHapticAudioResourceDefinition {
[Advice ("The default value is true.")]
bool UseVolumeEnvelope { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above, better use bool? to let developers not change the default

Copy link
Member Author

Choose a reason for hiding this comment

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

So this is backed by a NSDictionary, AFAIK if they do nothing, the key should not be added. But We can do a bool?

Copy link
Member Author

Choose a reason for hiding this comment

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

error BI1033: bgen: Limitation: can not automatically create strongly typed dictionary for (System.Nullable`1[System.Boolean]) the value type of the CoreHaptics.CHHapticPatternDefinition.EventWaveformUseVolumeEnvelope property

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm... is that not a NSNumber backed bool ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@dalexsoto why are we not able to do nullable? Do we need to fix that?

Copy link
Member

Choose a reason for hiding this comment

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

Please leave your message after the tone. beep... Yeah docs says nothing about nullable types so probably are not supported.

Copy link
Member Author

Choose a reason for hiding this comment

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

Already supported as per the API diff:

public class CHHapticAudioResourceDefinition : Foundation.DictionaryContainer {
	// constructors
	public CHHapticAudioResourceDefinition ();
	public CHHapticAudioResourceDefinition (Foundation.NSDictionary dictionary);
	// properties
	public bool? UseVolumeEnvelope { get; set; }
}

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [PR 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)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

Test results

1 tests failed, 85 tests passed.

Failed tests

  • introspection/watchOS 32-bits - simulator/Debug (watchOS 5.0): Failed

Pipeline on Agent XAMBOT-1094.BigSur'
Merge 8589263 into aed7923

@mandel-macaque mandel-macaque merged commit 85ce924 into xamarin:main Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
note-highlight Worth calling out specifically in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants