Browse Source

Wrap platform methods to prevent accidentally calling

onevcat 1 năm trước cách đây
mục cha
commit
7dcfd1f744
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      Sources/Image/GraphicsContext.swift

+ 3 - 0
Sources/Image/GraphicsContext.swift

@@ -24,6 +24,8 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
+#if os(macOS) || os(watchOS)
+
 #if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 #endif
@@ -93,3 +95,4 @@ enum GraphicsContext {
     }
 }
 
+#endif