The code compiles, however it shows the image just like without options
:
let options: [AnyHashable: Any] = [
UNNotificationAttachmentOptionsThumbnailClippingRectKey: CGRect(
origin: CGPoint(x: 0.1, y: 0.1),
size: CGSize(width: 0.1, height: 0.1)
)
]
let attachment = try? UNNotificationAttachment(
identifier: image.url,
url: fileUrl,
options: options
)
The documentation says I should use CGRectCreateDictionaryRepresentation
but it is not available.
Cannot find 'CGRectCreateDictionaryRepresentation' in scope
Am I missing something?