Did you find a fix? The solution using 'makeKeyWindow' is not working on iPadOS 14-15.
Post
Replies
Boosts
Views
Activity
Did you find a solution? I'm also facing this issue.
Is there any UIKit engineer knowing how how to handle multiple scenes, or is it dark magic?
The Apple iOS apps, Pages for instance, handle multiple scene in a elegant way, whereas my app, using the same Activate/Destroy API, looks bad.
Replacing current scene with another scene: Open doc A in scene A, then open another scene B, and open the same A doc. Pages simply shows the former scene, and the latter one disappears. I succeeded to make my app work on iOS 15, but it works in an unyielding manner, as I described above: The current scene B is shrinked to half screen, then the target one, A, is activated on the other half of the screen, then B scene is destroyed, and finally scene A is enlarged on the whole screen.
Opening a document from Spotlight, that's already open in one of the existing scenes, does not activate that particular scene. Instead, it activates the last used scene, EVEN if there is another scene that has that doc already open. (I do set 'prefersToActivateForTargetContentIdentifierPredicate', but no luck). On Apple Pages, it activates the correct scene.
Is Apple able to fix this or should we start rolling our own solutions? I'm reading the logs of my app running on iPad(iOS 14.4), using the Console on MacOS (10.15.7), and not getting all the logs. Some times I get some logs, and some times I get not logs at all (from my app). I need the logs that are generated when the app is started by the system, so I can't debug it using Xcode.
I read the whole thread plus the docs, implemented the new unified logging, but no luck. I even get fewer messages with the new shiny architecture, than if I use NSLog.
I've opened a TSI for this and I got a solution:When adding content on the pasteboard, beside the standard content type, (string, image, etc), also add a custom presentation type so you can check on it later.let myContentKey = "myContent"UIPasteboard.general.items = [[kUTTypeUTF8PlainText as String: someString, myContentKey: 1]]And then, when pasting, do like this:if (lastKnownGeneralPasteboardChangeCount != UIPasteboard.general.changeCount) && !UIPasteboard.general.contains(pasteboardTypes: [myContentKey]){ // we'll be using this fresh content from the general pasteboard //.....}else{ // use app local pasteboard content, cause general pasteboard contains my own items //.....}