Posts

Post not yet marked as solved
16 Replies
I'm using several libraries (Pods) in source form - which I would expect to show up in the debugger if they were misbehaving - and one binary framework. The framework is a custom Metal-based mapping engine and while it does create layers they are always children of the host UIView and shouldn't have any impact on the layout. I won't say it's impossible, but I've been using the same framework for 2+ years without any problems.If this is my code or something from a 3rd party library, why doesn't the call stack show it? I would at least expect to see some kind of "enqueued from" indicator that I could use to track down the source of the offending call.
Post not yet marked as solved
16 Replies
My code is, definitely, the first suspect in this. But I've been running the app in the debugger with the main thread checker engaged for days and while I've caught other issues I've never managed to trap this particular issue.As I said, it doesn't appear to be taking place in my code, so I can't tell what view is the source. What you see in the trace is what I get. I can't find any point in my code where I'm manipulating constraints that might be called from a background thread or queue. As you can see, this error takes place on a thread that's executing system code - there's no reference in there to my app ("FlightBox_PFD").Any suggestions?
Post not yet marked as solved
5 Replies
Ok, nobody has responded to this for the past two weeks so either there aren't too many people using this feature or it's working ok for others. If you are using on-device recognition - successfully or unsuccessfully - please post a brief response.Thanks!Steve
Post not yet marked as solved
3 Replies
Oops. You are correct. Here's the actual code from my app:func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { for context in URLContexts { var json:String? do { print(context.url.path) if context.options.openInPlace { if !context.url.startAccessingSecurityScopedResource() { print("Unable to get access to security scoped resource.") return } } json = try String(contentsOf: context.url, encoding: .utf8) if context.options.openInPlace { context.url.stopAccessingSecurityScopedResource() } } catch { print("Unable to read file.") print(error) } do { if let js = json { if let list = FBCheckList.init(JSONString: js) { list.save() } } else { print("JSON string is empty") } if !context.options.openInPlace { try FileManager.default.removeItem(at: context.url) } } catch {/* error handling here */ print("Couldn't parse JSON.") print(error) } } let rootVC = self.window?.rootViewController as! UINavigationController let listVC = rootVC.viewControllers[0] as! ListTableViewController listVC.reloadListData() }Again, this works when the app is resident in memory (background or foregound). It only fails to work when the app is not resident.
Post not yet marked as solved
5 Replies
Oh, small follow-up point on this: it appears that in some cases (I'm currently testing on the 11" iPad Pro) the device will do on-device recognition even if the supportsOnDeviceRecognition value is false and without setting the requiresOnDeviceRecognition flag. Weird.