Post

Replies

Boosts

Views

Activity

Reply to CLLocation.altitude under CarPlay reports 0.0 with a positive verticalAccuracy, and a second altitude outlier, both reproducible in Apple's Compass app
Authorization needed for the significant change is indeed a bummer. But Apple does recommend to start with the minimum authorization you require, and then escalate if needed. "Your car sucks!" as an excuse would be a valid reason for a user, IMO. Significant Change will only return WiFi/Mobile tower based locations, and won't even have altitude. Once you have an approximate location, you can either use a DEM to estimate the altitude, or use requestLocation(), which is the same function as startUpdatingLocation() but with an internal 10 second timeout, which BTW is how long your app will be running after a significant change wake. If the system can get a fix, the last location you will be sent (you can get multiple) will hopefully be accurate. As you can always end up with a stale location, checking the timestamp is always a good idea. All of the location updates for continuous updates, significant change, and requestLocation will come through the same callback. If the CLLocation.verticalAccuracy is zero, then the location is likely from a non-gps source. BTW, have you looked into comparing ellipsoidalAltitude vs altitude? In case the problems with some cars is not the quality of the data but using conflicting systems (WGS84 vs MSL)? -- S.Beck -- 7strikes.dev
Sep ’26
Reply to CLLocation.altitude under CarPlay reports 0.0 with a positive verticalAccuracy, and a second altitude outlier, both reproducible in Apple's Compass app
Two little facts that might prove useful: when you instantiate a location manager and start updates, the system will usually (but unfortunately not always) first send the latest cached location so the app has a starting point while a GPS fix is pending. You can detect this by checking the CLLocation timestamp against the time your app started updates. Although it wouldn’t be guaranteed (and maybe that’s worse than nothing) it could be another data point although not the ideal solution, using significant location change API would keep sending you updates in the backgroun, and along with requestLocation() you could be keeping a tally of locations and altitudes before CarPlay gets involved. Unfortunately without access to raw data and the DEM, tricks like this seem to be the only remaining solution.
Sep ’26
Reply to CLLocation.altitude under CarPlay reports 0.0 with a positive verticalAccuracy, and a second altitude outlier, both reproducible in Apple's Compass app
Altitude data from vehicles can be notoriously wrong, due to using different reference frames and then not bothering to report which they are using. Most of the time the issue is caused by the difference between WGS-84 and MSL (Mean Sea Level), and iOS then having to guess what's what. While there isn't a way to ignore vehicle sourced data while connected to CarPlay, there is a way to detect if the data is coming from the phone GPS or not. CLLocation.CLLocationSourceInformation will tell you if the source is external. Once you know that, the workaround would be: If you can, store the altitude you have before CarPlay is connected Once CarPlay connects, if you notice a jump in altitude, and the values you are getting are relatively sane, you can add/subtract as needed to get the correct(ish) value. If the values are crazy, jumping up and down, then you could use CMAltimeter instead, that is based on the phone barometer and will not rely on CarPlay. CMAltimeter is likely to lag behind, but probably useful enough if you are in a car and not in a rocket, and if you can source a DEM, also probably predictable. It is also likely to be somewhat wrong depending on how good the door seals are in the car. One can hope that if they have good enough door seals to throw a barometer off, then they have a proper nav system that gets the altitude correct. -- S.Beck -- 7strikes.dev
Sep ’26
Reply to macOS grants half the connection-event airtime that iOS does, for the same accessory
While the answer to the why? is best left to Apple, it is rather established that iOS (and macOS since the unification DTS Engineer mentioned) only allocates roughly 50% of the Connection Interval to the Connection Event. As you have also noticed, the event closes on a timer. The iOS Bluetooth stack strictly caps the connection event length, typically allowing a maximum airtime of around 6.96 ms. If your Connection Interval is set to 15 ms, this caps your radio usage to roughly 46% to 50% of the interval Additionally the Connection Event Length can be truncated further if the radio(s) are otherwise occupied, and co-existence becomes an issue. That is probably the variance you see in the best case vs. usual case scenarios. Connection Event Length (max_ce_length) cannot be negotiated, so your only remaining option would be to work around it. While it might seem counterintuitive, using a longer CI might give you a better throughput by reducing the ratio of dead air (T_IFS: Inter Frame Space), although I suspect the ratio of CEL might also drop. I think this is also something you have observed. If your solution you seek is raw throughput, you may have looked into L2CAP, which will help, but I suppose that is not the question at hand today. -- S.Beck --- 7strikes.dev
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’26
Reply to HCE-based contactless NFC transactions
There are technical limitations of such a filter (your app is woken up due to an NFC field-level signal before any AID information is exchanged), and there is the meaning of a default, as in there can only be one. Whether a limited purpose app should be the front facing app or not is a user selection, it will be their decision to whether choose your app for the limited use, or another app for general use. -- S.Beck -- 7strikes.dev (I have some detailed opinions notes on this subject)
Topic: App & System Services SubTopic: Wallet Tags:
Sep ’26
Reply to SensorKit PPG Access and Optical Sensor Specifications for Apple Watch Series 9 Research
All you need to know about applying for and starting to use SensorKit is explained at Accessing SensorKit Data As for the wavelengths, those are properly documented, but you need to study the API documentation for it. Series 9 uses a range of 525 - 940 nm, and the exact wavelength used in the sample will be part of the PPG data you receive. SRPhotoplethysmogramOpticalSample lists all the data points you will receive. -- S.Beck - 7strikes.dev PS: check my article about the required hold period of SensorKit data once you start using it, so it doesn't come as an unpleasant surprise
Sep ’26
Reply to Scanning multiple NFC tags in a row without restarting the session each time?
While you can read multiple tags without restarting the session (invalidateAfterFirstRead: false will let you do that), but your use case sounds like you are trying to use the wrong tool. iBeacons or a custom Bluetooth tag are what these kinds of applications are for. What I would say is: both approaches are problematic, because... Voiceover will announce a new session with every session, and that would become annoying quickly there is no "Live Mode" you can create, the sessions will timeout, and even worse... not only this drains the battery, but causes heat buildup on the NFC antenna (reading is not passive). So, not only you have no chance of keeping a session active for minutes, repeatedly starting sessions will increase the thermal stress and the sessions will start getting shorter and shorter, and eventually stop for cooldown. I would say, don't do it. -- S.Beck - 7strikes.dev (I have a more detailed article about this)
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’26
Reply to CLLocation.altitude under CarPlay reports 0.0 with a positive verticalAccuracy, and a second altitude outlier, both reproducible in Apple's Compass app
Authorization needed for the significant change is indeed a bummer. But Apple does recommend to start with the minimum authorization you require, and then escalate if needed. "Your car sucks!" as an excuse would be a valid reason for a user, IMO. Significant Change will only return WiFi/Mobile tower based locations, and won't even have altitude. Once you have an approximate location, you can either use a DEM to estimate the altitude, or use requestLocation(), which is the same function as startUpdatingLocation() but with an internal 10 second timeout, which BTW is how long your app will be running after a significant change wake. If the system can get a fix, the last location you will be sent (you can get multiple) will hopefully be accurate. As you can always end up with a stale location, checking the timestamp is always a good idea. All of the location updates for continuous updates, significant change, and requestLocation will come through the same callback. If the CLLocation.verticalAccuracy is zero, then the location is likely from a non-gps source. BTW, have you looked into comparing ellipsoidalAltitude vs altitude? In case the problems with some cars is not the quality of the data but using conflicting systems (WGS84 vs MSL)? -- S.Beck -- 7strikes.dev
Replies
Boosts
Views
Activity
Sep ’26
Reply to CLLocation.altitude under CarPlay reports 0.0 with a positive verticalAccuracy, and a second altitude outlier, both reproducible in Apple's Compass app
Two little facts that might prove useful: when you instantiate a location manager and start updates, the system will usually (but unfortunately not always) first send the latest cached location so the app has a starting point while a GPS fix is pending. You can detect this by checking the CLLocation timestamp against the time your app started updates. Although it wouldn’t be guaranteed (and maybe that’s worse than nothing) it could be another data point although not the ideal solution, using significant location change API would keep sending you updates in the backgroun, and along with requestLocation() you could be keeping a tally of locations and altitudes before CarPlay gets involved. Unfortunately without access to raw data and the DEM, tricks like this seem to be the only remaining solution.
Replies
Boosts
Views
Activity
Sep ’26
Reply to CLLocation.altitude under CarPlay reports 0.0 with a positive verticalAccuracy, and a second altitude outlier, both reproducible in Apple's Compass app
Altitude data from vehicles can be notoriously wrong, due to using different reference frames and then not bothering to report which they are using. Most of the time the issue is caused by the difference between WGS-84 and MSL (Mean Sea Level), and iOS then having to guess what's what. While there isn't a way to ignore vehicle sourced data while connected to CarPlay, there is a way to detect if the data is coming from the phone GPS or not. CLLocation.CLLocationSourceInformation will tell you if the source is external. Once you know that, the workaround would be: If you can, store the altitude you have before CarPlay is connected Once CarPlay connects, if you notice a jump in altitude, and the values you are getting are relatively sane, you can add/subtract as needed to get the correct(ish) value. If the values are crazy, jumping up and down, then you could use CMAltimeter instead, that is based on the phone barometer and will not rely on CarPlay. CMAltimeter is likely to lag behind, but probably useful enough if you are in a car and not in a rocket, and if you can source a DEM, also probably predictable. It is also likely to be somewhat wrong depending on how good the door seals are in the car. One can hope that if they have good enough door seals to throw a barometer off, then they have a proper nav system that gets the altitude correct. -- S.Beck -- 7strikes.dev
Replies
Boosts
Views
Activity
Sep ’26
Reply to macOS grants half the connection-event airtime that iOS does, for the same accessory
While the answer to the why? is best left to Apple, it is rather established that iOS (and macOS since the unification DTS Engineer mentioned) only allocates roughly 50% of the Connection Interval to the Connection Event. As you have also noticed, the event closes on a timer. The iOS Bluetooth stack strictly caps the connection event length, typically allowing a maximum airtime of around 6.96 ms. If your Connection Interval is set to 15 ms, this caps your radio usage to roughly 46% to 50% of the interval Additionally the Connection Event Length can be truncated further if the radio(s) are otherwise occupied, and co-existence becomes an issue. That is probably the variance you see in the best case vs. usual case scenarios. Connection Event Length (max_ce_length) cannot be negotiated, so your only remaining option would be to work around it. While it might seem counterintuitive, using a longer CI might give you a better throughput by reducing the ratio of dead air (T_IFS: Inter Frame Space), although I suspect the ratio of CEL might also drop. I think this is also something you have observed. If your solution you seek is raw throughput, you may have looked into L2CAP, which will help, but I suppose that is not the question at hand today. -- S.Beck --- 7strikes.dev
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’26
Reply to HCE-based contactless NFC transactions
There are technical limitations of such a filter (your app is woken up due to an NFC field-level signal before any AID information is exchanged), and there is the meaning of a default, as in there can only be one. Whether a limited purpose app should be the front facing app or not is a user selection, it will be their decision to whether choose your app for the limited use, or another app for general use. -- S.Beck -- 7strikes.dev (I have some detailed opinions notes on this subject)
Topic: App & System Services SubTopic: Wallet Tags:
Replies
Boosts
Views
Activity
Sep ’26
Reply to SensorKit PPG Access and Optical Sensor Specifications for Apple Watch Series 9 Research
All you need to know about applying for and starting to use SensorKit is explained at Accessing SensorKit Data As for the wavelengths, those are properly documented, but you need to study the API documentation for it. Series 9 uses a range of 525 - 940 nm, and the exact wavelength used in the sample will be part of the PPG data you receive. SRPhotoplethysmogramOpticalSample lists all the data points you will receive. -- S.Beck - 7strikes.dev PS: check my article about the required hold period of SensorKit data once you start using it, so it doesn't come as an unpleasant surprise
Replies
Boosts
Views
Activity
Sep ’26
Reply to Scanning multiple NFC tags in a row without restarting the session each time?
While you can read multiple tags without restarting the session (invalidateAfterFirstRead: false will let you do that), but your use case sounds like you are trying to use the wrong tool. iBeacons or a custom Bluetooth tag are what these kinds of applications are for. What I would say is: both approaches are problematic, because... Voiceover will announce a new session with every session, and that would become annoying quickly there is no "Live Mode" you can create, the sessions will timeout, and even worse... not only this drains the battery, but causes heat buildup on the NFC antenna (reading is not passive). So, not only you have no chance of keeping a session active for minutes, repeatedly starting sessions will increase the thermal stress and the sessions will start getting shorter and shorter, and eventually stop for cooldown. I would say, don't do it. -- S.Beck - 7strikes.dev (I have a more detailed article about this)
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’26