So last night I managed to sneak off with my wife's phone, updated it from IOS 16* to IOS 17.5.1 and 'viola', same problem arose, so then I figured it had to be something with the IOS....or not.
I drilled down on the NSPredicate again and after some changes the following now works:
was: NSPredicate(format: "%K LIKE %@", NSMetadataItemFSNameKey, fileUrl.lastPathComponent)
is now: NSPredicate(format: "%K == %@", NSMetadataItemPathKey, fileUrl.relativePath)
--And that now works--
Thank you for the link, it gave me the incentive to tinker with the predicate again.
The above mentioned error is still present on the device, but I can for the foreseeable future ignore it.
And the 'startAccessingSecurityScopedResource()' now returns 'true'
Thank you for your assistance.
Post
Replies
Boosts
Views
Activity
If your issue is with HTML colours not rendering, be it the general background, table row or table cell backgrounds - I have just found a solution.
https://stackoverflow.com/questions/72507453/printing-from-wkwebview-in-swift-ignores-background/75882507#75882507
Have a look at the answer by ov1d1u
Adding this CSS directive to the HTML code fixed it for me:
@media print {
* {
-webkit-print-color-adjust: exact !important;
}
}
Phew, now I can continue.....
l have the same issue - HTML background colours are not rendering on iOS 17 simulator and iOS 16.7 physical device. iOS 14 simulator device the colours render just fine.
My coding follows a similar path going from HTML to PDF for printing.
Will continue digging for a solution.