Posts

Post not yet marked as solved
4 Replies
1.8k Views
I'm trying to get my iOS app to work on Apple silicon Macs, but ODR (On-Demand Resources) don't seem to work. It seems like the Xcode doesn't even acknowledge existence of ODR in the project when run as an iOS app for Mac on my M1 MacBook Air. I've created a very simple Xcode project to verify the issue, which only has a single image tagged as ODR. Checking the Disk tab in the Debug navigator, the ODR is shown correctly when running on a simulator: ...Yet when run as an iOS app for Mac it simply shows No Resources: The beginAccessingResources(...) call predictably fails, too, with the following error: Error: Error Domain=AssetErrorDomain Code=7 "Invalid status code `404`" UserInfo={NSDebugDescription=Invalid status code `404`, NSUnderlyingError=0x600003fd5fb0 {Error Domain=AssetErrorDomain Code=1404 "(null)"}} There are other messages in the console that could be related to the issue. The first thing the app logs when run as an iOS app for Mac, is this message repeated several times: 2022-01-20 12:14:41.566305+0000 ODRTest[29926:333135] [default] could not create original path for node <FSNode 0x600003191ca0> { isDir = ?, path = '/private/var/folders/kw/g_lttmtn0yx747mvzjmbksbc0000gn/X/FE0DB2BA-8F2D-5783-9BE1-891F8E117EC9/d/Wrapper/ODRTest.app' }, proceeding: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" ODRTest is the name of the Xcode project I use to reproduce the issue. Nothing else is logged apart from these repeated messages and the ODR request error. The documentation here seems to explicitly suggest that ODR should work fine, so I'm guessing this is some odd configuration error on my machine — perhaps related to file system access? I've tried updating macOS and re-installing Xcode to latest from scratch to no avail. Anything else I'm missing here?
Posted
by navoshta.
Last updated
.
Post marked as solved
2 Replies
2.5k Views
For some reason I can't get hardware keyboard shortcuts to work in iPadOS 15 (beta 5). They work for most keys, but not for arrow keys and tab key. The same code seems to work well when compiled in Xcode 13 (beta 4) and run on iPadOS 14.5 simulator, but then refuses to work when built with same Xcode but on iPadOS 15 sim. I've tried it on actual devices with iPadOS 15 betas up to 5 with same results. Here is a minimal example: class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() addKeyCommand(UIKeyCommand(title: "UP", action: #selector(handle(key:)), input: UIKeyCommand.inputUpArrow, modifierFlags: [])) addKeyCommand(UIKeyCommand(title: "DOWN", action: #selector(handle(key:)), input: UIKeyCommand.inputDownArrow, modifierFlags: [])) addKeyCommand(UIKeyCommand(title: "TAB", action: #selector(handle(key:)), input: "\t", modifierFlags: [])) } @objc func handle(key: UIKeyCommand?) { NSLog("Intercepted key: \(key?.title ?? "Unknown")") } } I haven't found any related reports or open radars, so I'm suspecting I could be missing something here. If this should be reported, where do I report a bug like that? Thank you.
Posted
by navoshta.
Last updated
.