diff --git a/Sources/ZNSTextAttachment/ZResizableNSTextAttachment.swift b/Sources/ZNSTextAttachment/ZResizableNSTextAttachment.swift index 5debdd7..9bdacc4 100644 --- a/Sources/ZNSTextAttachment/ZResizableNSTextAttachment.swift +++ b/Sources/ZNSTextAttachment/ZResizableNSTextAttachment.swift @@ -26,7 +26,9 @@ public class ZResizableNSTextAttachment: NSTextAttachment { super.init(data: data, ofType: type) - self.attachmentCell = NSTextAttachmentCell.init(imageCell: NSImage(data: data)) + #if canImport(AppKit) + self.attachmentCell = NSTextAttachmentCell.init(imageCell: NSImage(data: data)) + #endif } required init?(coder: NSCoder) { diff --git a/scripts/ZNSTextAttachment.podspec b/scripts/ZNSTextAttachment.podspec index 964fa78..24cae30 100644 --- a/scripts/ZNSTextAttachment.podspec +++ b/scripts/ZNSTextAttachment.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "ZNSTextAttachment" - s.version = "1.1.5" + s.version = "1.1.6" s.summary = "ZNSTextAttachment enables NSTextAttachment to download images from remote URLs." s.homepage = "https://github.com/ZhgChgLi/ZNSTextAttachment" s.license = { :type => "MIT", :file => "LICENSE" }