#Feedback FB20937080 if you work with #CoreLocation and/or #SwiftUI. #rdar

For an app supporting scenes, the userInfo dictionary in application(_:didFinishLaunchingWithOptions:) is nil.

In a #SwiftUI app, what’s the correct way then to determine if the app was launched because of a location event (such as a significant location change, a region monitoring/geofencing enter/exit and/or a visit)?

#CoreLocation #iOSDev

Newly posted: a video from March 2023:

• Pushing the limits of Core Location by Nick Patrick
• Native UI, Shared Logic: Leveraging Kotlin Multiplatform to share code between iOS and Android by Carlo Rapisarda

https://www.youtube.com/watch?v=Xjvu23Hyj0U

#iosdev #swift #Kotlin #CoreLocation

iOSoho: Pushing the limits of Core Location && Sharing code across platforms with Kotlin

YouTube
A huge thank you to @twostraws and @StewartLynch for their incredible #MapKit and #CoreLocation resources, which were invaluable for implementing and truly understanding these iOS features in #SwiftUI.

Now, this is the first version of the app, I have tons of ideas to improve it but I wanted to get it in people's hands and see what people like, what they want, and how it's used 🙂

On the technical side, the app is entirely built in #SwiftUI (what did you expect?), and leverages #CoreLocation, #MapKit, #WeatherKit and a little bit of #SwiftCharts.

This app is the reason I filed and share many feedback related to these frameworks lately 😄

#iOS #AppStore #IndieDev

I'm beginning to think the #CoreLocation CLMonitor actor is badly designed. You can only have one instance per identifier (which regions are tied to) and you can only listen for async events stream in one place (if you use the stream twice there is corruption of next()). This means you can't use it from SwiftUI where there is no app level .task available. SwiftUI is designed to have multiple .task spread through out and can all create their own async streams.

https://developer.apple.com/documentation/corelocation/clmonitor

CLMonitor | Apple Developer Documentation

An object that monitors the conditions you add to it.

Apple Developer Documentation

Just reported a #CoreLocation bug FB13696956

CLMonitor: No events received for a region added while app is running

https://openradar.appspot.com/radar?id=5523074527002624

rdar://FB13696956: CLMonitor: No events received for a region added while app is running

Found another disappointing Apple #SwiftUI code sample, this time from the #CoreLocation team. They wrapped async/await Task in a Combine ObservableObject instead of just using the .task modifier. They could have also used @.AppStorage instead of UserDefaults.
https://developer.apple.com/documentation/corelocation/adopting_live_updates_in_core_location
Adopting live updates in Core Location | Apple Developer Documentation

Simplify location delivery using asynchronous events in Swift.

Apple Developer Documentation
Meet Core Location for spatial computing | WWDC NOTES

Discover how Core Location helps your app find its place in the world — literally. We’ll share how you can build a spatial computing app that uses a person’s location while respecting their privacy. You’ll also learn how your app can request location access and how Core Location adapts requests from compatible iPad and iPhone apps.

WWDC NOTES

Here's a gentle reminder that small steps lead to big changes. 🚀 I'm thrilled to announce the initial release of LocationApplication. This tool aims to simplify dealing with location services in Swift. It's built upon AppState, which promotes manageable code and improved testability. If you're working on location-based applications, this could be a handy tool for you.

https://github.com/0xLeif/LocationApplication

#SPM #LocationApp #AppState #Swift #corelocation #iOS #SwiftLang #SwiftUI #OpenSource #macos #mobile

GitHub - 0xLeif/LocationApplication: 📍 A Swift package that streamlines the management of location services in your apps, based on AppState for clean code structure and advanced testability. Perfect for building robust, location-centric iOS applications!

📍 A Swift package that streamlines the management of location services in your apps, based on AppState for clean code structure and advanced testability. Perfect for building robust, location-centr...

GitHub