Post

Replies

Boosts

Views

Activity

Reply to I need help
It wouldn't surprise me if you're using a newer version of Swift than was current when the book was written. It is an evolving language, and not always backwards-compatible.
Topic: UI Frameworks SubTopic: SwiftUI
Sep ’25
Reply to Bundling app with our own SQLite
Can we bundle our app with our own version of SQLite with extensions that we want. Yes, and you should do that. The version that Apple includes depends on the iOS version (see https://github.com/yapstudios/YapDatabase/wiki/SQLite-version-(bundled-with-OS) for a table). If you use the Apple version, there's a danger that your app will break after an iOS update, or will not function on an older iOS version that you are still trying to support but don't test on as well as you should. I was caught out by the latter issue because the sqlite in iOS 14 doesn't support "on conflict" without a column list.
Aug ’25
Reply to How can I calculate distance and vertical velocity?
Sure, you can integrate acceleration to get velocity and integrate velocity to get distance. But the problem is that you integrate all the errors in the sensor values too, and they quickly dominate. This is a well-known problem that has been studied in the context of submarine, aircraft and spacecraft navigation (pre-GPS) for decades. The solutions tend to be either ever-more precise sensors (which is not something you can change on a phone) and "sensor fusion", where you blend your integrated value with a value from another sensor. One example of sensor fusion is the Kalman Filter - look it up. Do be aware that the sensor values that you get on iOS have probably already been processed in some way by the system before you receive them.
Topic: App & System Services SubTopic: General Tags:
Aug ’25
Reply to CGColorRef is NOT a struct
Now, returning to the Objective-C doc, I see this: What you're seeing now is the fixed version. Until yesterday, the * was missing. AgentFriday and I both understand the differences between classes and structs in C, objC and Swift and neither of us was misreading anything. There was no confusion; it was a bug in the documentation generator which has now finally been fixed. user-level bug Huh? There's a difference between "user-level bugs" and "developer-level bugs"? I guess I'd better go and look at all my completely ignored bug reports from the last decades and check if any of them accidentally got in a "user-level" category.
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’25