Skip to content

Commit

Permalink
[iosurface] IOSurface is not usable before iOS/tvOS 11. Fixes #59201 (#…
Browse files Browse the repository at this point in the history
…2706)

Apple rejects apps that links with the previously private IOSurface.framework.
We were not sure about this [1] and had it disabled (this is removed).

However another bug stopped our adjustment logic [2] from being executed. This
is needed since `clang` picks up the private framework if it does not find the
public one (even when asking for a weak framework),

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=59201
[2] Added a while ago for JavascriptCore
  • Loading branch information
spouliot authored Sep 15, 2017
1 parent 46f4875 commit a74174e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
12 changes: 1 addition & 11 deletions src/Constants.iOS.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,7 @@ namespace MonoTouch {
public const string VisionLibrary = "/System/Library/Frameworks/Vision.framework/Vision";
public const string FileProviderLibrary = "/System/Library/Frameworks/FileProvider.framework/FileProvider";
public const string FileProviderUILibrary = "/System/Library/Frameworks/FileProviderUI.framework/FileProviderUI";
public static string IOSurfaceLibrary {
get {
// Disabled because of bug #59201
// #if !COREBUILD && !MTOUCH
// // Sidenote: this is in /System/Library/Frameworks/IOSurface.framework/IOSurface in macOS 10.12.
// if (!XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0))
// return "/System/Library/PrivateFrameworks/IOSurface.framework/IOSurface";
// #endif
return "/System/Library/Frameworks/IOSurface.framework/IOSurface";
}
}
public const string IOSurfaceLibrary = "/System/Library/Frameworks/IOSurface.framework/IOSurface";
public const string PdfKitLibrary = "/System/Library/Frameworks/PDFKit.framework/PDFKit";
}
}
12 changes: 1 addition & 11 deletions src/Constants.tvos.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,6 @@ namespace ObjCRuntime {
public const string DeviceCheckLibrary = "/System/Library/Frameworks/DeviceCheck.framework/DeviceCheck";
public const string CoreMLLibrary = "/System/Library/Frameworks/CoreML.framework/CoreML";
public const string VisionLibrary = "/System/Library/Frameworks/Vision.framework/Vision";
public static string IOSurfaceLibrary {
get {
// Disabled because of bug #59201
// #if !COREBUILD && !MTOUCH
// // Sidenote: this is in /System/Library/Frameworks/IOSurface.framework/IOSurface in macOS 10.12.
// if (!XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0))
// return "/System/Library/PrivateFrameworks/IOSurface.framework/IOSurface";
// #endif
return "/System/Library/Frameworks/IOSurface.framework/IOSurface";
}
}
public const string IOSurfaceLibrary = "/System/Library/Frameworks/IOSurface.framework/IOSurface";
}
}
4 changes: 2 additions & 2 deletions tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ public static Frameworks GetiOSFrameworks (Application app)
{ "UserNotificationsUI", "UserNotificationsUI", 10 },
{ "Intents", "Intents", 10 },
{ "IntentsUI", "IntentsUI", 10 },
{ "IOSurface", "IOSurface", 10 },

{ "ARKit", "ARKit", 11 },
{ "CoreNFC", "CoreNFC", 11 },
{ "DeviceCheck", "DeviceCheck", 11 },
{ "IdentityLookup", "IdentityLookup", 11 },
{ "IOSurface", "IOSurface", 11 },
{ "CoreML", "CoreML", 11 },
{ "Vision", "Vision", 11 },
{ "FileProvider", "FileProvider", 11 },
Expand Down Expand Up @@ -361,10 +361,10 @@ public static Frameworks TVOSFrameworks {
{ "UserNotifications", "UserNotifications", 10 },
{ "VideoSubscriberAccount", "VideoSubscriberAccount", 10 },
{ "VideoToolbox", "VideoToolbox", 10,2 },
{ "IOSurface", "IOSurface", 10 },

{ "DeviceCheck", "DeviceCheck", 11 },
{ "CoreML", "CoreML", 11 },
{ "IOSurface", "IOSurface", 11 },
{ "Vision", "Vision", 11 },
};
}
Expand Down
2 changes: 1 addition & 1 deletion tools/mtouch/BuildTasks.mtouch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ protected override async Task ExecuteAsync ()
// /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore instead of
// /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
// more details in https://bugzilla.xamarin.com/show_bug.cgi?id=31036
if (Target.WeakFrameworks.Count > 0)
if (CompilerFlags.WeakFrameworks.Count > 0)
Target.AdjustDylibs ();
Driver.Watch ("Native Link", 1);
}
Expand Down

0 comments on commit a74174e

Please sign in to comment.