Unable to display pdf annotations with PDFKit (macOS Sierra bug?) - pdf

I am working with PDFKit on macOS 10.12 and Xcode 8.0. I am creating some annotations in a pdf, displayed using PDFView, but I am not able to see them once created, unless to force the refreshing of the view through zomming in and out inside the page.
I have written a Minimal Working Example that you can clone from here
If you clone it in your root folder the code will run, otherwise remember to change pdfPath to the path of an existing pdf.
Additional details on the problem:
Add pdf annotation with PDF Kit in OS 10.12 (it seems that there is a workaround of the problem but I am not been able to implement it, may you are
PDFView setNeedsDisplay:YES doesn't work on MacOS Sierra 10.12 (same problem, they did not solve it)
Displaying pdf files using the PDFKit interface (same workaround suggested in the first link, but I am still not able to use it. The answer continued in a chat and so I cannot see how they managed)
Last but maybe not less important, Xcode gives me this warning (maybe solving it the problem would solve, but I cannot find an exhaustive documentation that teaches how to manage it):
Thank you in advance for all the precious answers.

Related

Unrecognised font family after backgrounding the app

I am using Noto Serif Medium font. Everything works as it should, when I launch the app with a fresh start.
The issue happens when I background the app and open anything that has not been rendered yet.
The classic "Unrecognised font family" error appears.
This error happens on iOS emulator and iOS physical devices.
I have checked targets, resources and Info.plist file in Xcode. Everything is there. Still this error happens.
I suspect that there could be an issue with the .ttf file itself, as you're not able to get this font from Google Fonts directly, even though it is a free to use font.
Is there anyone that can provide a lead to a solution?
This one was a dozzie.
Turns out, that it shouldn't have been working in a first place. It was a classical iOS font name issue. I don't know why it was working when the app wasn't backgrounded, but hey atleast the problem is solved.
Just use the PostScript name, not the real name tag in iOS fontbook.

IKImageView move tool not working in Mojave

My app Plumb-Bob is based on the IKImageViewDemo:
https://developer.apple.com/library/archive/samplecode/IKImageViewDemo/Introduction/Intro.html#//apple_ref/doc/uid/DTS10004049
I compile it for MacOS 10.10+ and in my tests I noticed that the "move tool" is not working at all in Mojave (10.14) while it does as usual in the previous systems.
Since I have strongly modified IKImageViewDemo for my purposes, I have downloaded it again to make some test (see link above).
When build and run IKImageViewDemo I have verified that it has the same behavior:
On MacOS 10.14 the move tool shows its open hand cursor, but, when dragging, the image is not moved at all.
On older MacOS, it works like a charm.
I did not find any updates, deprecations and changes on IKImageView framework in 10.14, searching at Apple Developer's docs.
Can anyone address me to the solution, it is very important, in my app, to move around the zoomed image.
Thank you in advance

OSX custom authorization plugin breaks with upgrade to Mojave

We have a custom authorization plugin for OSX, written using this as our base:
https://github.com/skycocker/NameAndPassword
and referencing the official documentation where needed:
https://developer.apple.com/documentation/security/authorization_plug-ins/using_authorization_plug-ins
The plugin was working perfectly, until the Mojave release. With Mojave, our auth plugin UI does not draw and we only see the circular login arrow button. The only way to login is to ssh into the machine, uninstall our auth plugin and re-enable to default OSX login mechanism.
We added additional logging and found that the plugin is indeed being loaded and runs normally. It's just the UI that is not displaying anymore. My guess is that they have changed some requirements for custom auth plugins but have not updated the documentation.
Does anyone have any ideas as to why the UI might not be displaying in Mojave?
EDIT:
Some more information. We have found that we are able to tab through the controls that are part of our plugin. This implies that the controls are actually there, but are either off screen or maybe just not being drawn? Very strange indeed...
EDIT 2:
I tried building the NameAndPassword sample, and it displays fine in Mojave. This sample used a .nib for the interface, which I cannot edit in the recent version of xcode. So, I tried recreating the interface as a .xib and surprisingly, the UI for NameAndPassword is now gone as well!
So, there is perhaps something happening behind the scenes when the .xib file is compiled which is causing the UI to not be drawn, which is NOT happening with a .nib based interface.
Do you have this flag enabled : self.window?.canBecomeVisibleWithoutLogin = true

Missing dSYM files in Crashlytics Today extension (Bitcode disabled)

The title of this question basically says it all. I enabled Crashlytics in my Today extension, and for some reasons, the dSYMs are not being uploaded, even though I'm not using Bitcode.
I tried uploading them manually (from ~/Library/Developer/Xcode/Derived Data/Timelines-evxmjnxmpmcivkavmpijzakaxkrp/Build/Products/Debug-iphoneos/Timelines.app.dSYM), but the web interface doesn't really give me any feedback. It shows this screen:
No matter how long I wait, once I refresh the page, it goes back to the 'upload dSYMS' screen.
I think the problem might be that the UUIDs of the missing dSYMs don't really match those that I found locally.
Some notes on my setup:
Xcode 8.2
Today extension running on iOS 10.2
Bitcode is not enabled.
Fabric and Crashlytics integration was done using CocoaPods.
Archive wasn't uploaded to App Store. I'm just testing it locally on my devices. But since the entry for crash reports was created in the web interface, I assume the automatic upload should work anyway.
My question basically is: how exactly can I upload the dSYMs manually? And, second one: how can I make the automatic upload of dSYMs work? Thank you.
It is described here completely ==> fabric.io.
As it said you can download it from activity tab in itunesconnect and then upload it to crashlytics website.

Cocoa WebView SWF

I am trying to load an SWF inside a WebView in my cococa app, it works fine when I load an HTML which references the SWF. But i'd like do load the flash file alone, with no HTML. Is that possible??
Yes.
It's broken in currently-released WebKit (even on Snow Leopard), but last I checked, it was fixed in WebKit nightlies, so it'll work again someday.
I finally found an answer for that. It is not quite a fix, but it can get my app working for now.
Every time swf is loaded it make a call to debugger and XCode stops.
According to this post, I should disable the option "Stop on debugger" at run menu in XCode.
Now my project is up and running.
Thanks!