MenuSupport
MenuSupport copied to clipboard
Could not get selected text on PDF.
PDF loaded WKWebView return _UISizeTrackingView instance via _currentContentView method that have not selectedText method.
Actual pdf view is running on separated process as com.apple.PDFKit.PDFExtensionView.
Currently i'm not sure how to get selected text on that situation.
https://github.com/r-plus/MenuSupport/blob/master/Tweak.xm#L219
at least iOS 12+
these copy: method will use when user did copy. Probably view controller execute one way IPC to pdf process to copy.
-[PDFHostViewController copy:]
-[PDFView copy:]
If we call copy: in Invoke, then arg of didCopyString: will be the selected string but this method will not be executed until Invoke finished...