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

[introspection] Fix a few issues found on iPad Air 2 with iOS 12. #5034

Merged
merged 2 commits into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 9 additions & 0 deletions tests/introspection/ApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,15 @@ protected virtual bool Skip (Type type, string selectorName)
return true;
}
break;
case "MPSCnnBinaryKernel":
switch (selectorName) {
// Xcode 9.4 removed both selectors from MPSCnnBinaryKernel, reported radar https://trello.com/c/7EAM0qk1
// but apple says this was intentional.
case "kernelHeight":
case "kernelWidth":
return true;
}
break;
}

// old binding mistake
Expand Down
9 changes: 0 additions & 9 deletions tests/introspection/Mac/MacApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,6 @@ protected override bool Skip (Type type, string selectorName)
case "readingOptionsForType:pasteboard:":
case "writingOptionsForType:pasteboard:":
return true; // Optional selectors on NSPasteboardReading/NSPasteboardWriting
// Xcode 9.4 removed both selectors from MPSCnnBinaryKernel, reported radar https://trello.com/c/7EAM0qk1
// but apple says this was intentional.
case "kernelHeight":
case "kernelWidth":
switch (type.Name) {
case "MPSCnnBinaryKernel":
return true;
}
break;
case "newWindowForTab:": // "This method can be implemented in the responder chain", optional but not protocol directly on NSResponder
switch (type.Name) {
case "NSViewController":
Expand Down
5 changes: 4 additions & 1 deletion tests/introspection/iOS/iOSApiCtorInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ protected override bool Skip (Type type)
return true;
break;
#endif // !__WATCHOS__
case "CoreNFC": // Only available on device
case "CoreNFC": // Only available on devices that support NFC, so check if NFCNDEFReaderSession is present.
if (Class.GetHandle ("NFCNDEFReaderSession") == IntPtr.Zero)
spouliot marked this conversation as resolved.
Show resolved Hide resolved
return true;
break;
case "DeviceCheck": // Only available on device
if (Runtime.Arch == Arch.SIMULATOR)
return true;
Expand Down
10 changes: 8 additions & 2 deletions tests/introspection/iOS/iOSApiFieldTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ protected override bool Skip (PropertyInfo p)
case "MonoTouch.MetalKit":
case "MetalPerformanceShaders":
case "MonoTouch.MetalPerformanceShaders":
case "CoreNFC": // Only available on device
case "CoreNFC": // Only available on devices that support NFC, so check if NFCNDEFReaderSession is present.
if (Class.GetHandle ("NFCNDEFReaderSession") == IntPtr.Zero)
return true;
break;
case "DeviceCheck": // Only available on device
if (Runtime.Arch == Arch.SIMULATOR)
return true;
Expand Down Expand Up @@ -108,6 +111,10 @@ protected override bool Skip (PropertyInfo p)
protected override bool Skip (string constantName, string libraryName)
{
switch (libraryName) {
case "CoreNFC": // Only available on devices that support NFC, so check if NFCNDEFReaderSession is present.
if (Class.GetHandle ("NFCNDEFReaderSession") == IntPtr.Zero)
return true;
break;
case "IOSurface":
return Runtime.Arch == Arch.SIMULATOR && !TestRuntime.CheckXcodeVersion (9, 0);
}
Expand Down Expand Up @@ -141,7 +148,6 @@ protected override bool Skip (string constantName, string libraryName)
case "MTKTextureLoaderOptionTextureCPUCacheMode":
case "MTKModelErrorDomain":
case "MTKModelErrorKey":
case "NFCISO15693TagResponseErrorKey": // Not in simulator since no NFC on it
return Runtime.Arch == Arch.SIMULATOR;
default:
return false;
Expand Down
4 changes: 4 additions & 0 deletions tests/introspection/iOS/iOSApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ protected override bool Skip (Type type)
if (Runtime.Arch == Arch.SIMULATOR)
return true;
break;
case "CoreNFC": // Only available on devices that support NFC, so check if NFCNDEFReaderSession is present.
if (Class.GetHandle ("NFCNDEFReaderSession") == IntPtr.Zero)
return true;
break;
}

switch (type.Name) {
Expand Down
5 changes: 4 additions & 1 deletion tests/introspection/iOS/iOSApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ protected override bool Skip (Type type)
return true;
break;
// Xcode 9
case "CoreNFC":
case "CoreNFC": // Only available on devices that support NFC, so check if NFCNDEFReaderSession is present.
if (Class.GetHandle ("NFCNDEFReaderSession") == IntPtr.Zero)
return true;
break;
case "DeviceCheck":
if (Runtime.Arch == Arch.SIMULATOR)
return true;
Expand Down