Very NIce Question, if I make app that uses AI to pick a running route for me ( that is differnt) but includes what ever restaurant I want , like say I wanted to run by mc donalds one morning, and run by starbucks the next, but I don't want the same path b2b days even if I go to the same starbucks each day.
The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions how can ı solve this
Hello, nice tutorial, one more question, to make your app user friendly: if i want to add a "clean" button on top of the map that will erase all my previous search results, so that i can start a new search : putting route = nil searchText = "" results.removeAll() showDetails = false getDirections = false cameraPosition = .region(.myRegion) mapSelection = nil does not seem to be sufficient did i miss something ? because any new search using textfield overaly, does not provide any new result !! thank you so much by advance if you can tell us a bit more about this issue
Question, if I make app that uses AI to pick a running route for me ( that is differnt) but includes what ever restaurant I want , like say I wanted to run by mc donalds one morning, and run by starbucks the next, but I don't want the same path b2b days even if I go to the same starbucks each day. I have been avoiding using beta xcode because I didn't want compatibility issues with my older devices, I also have older watch and tablet, but my rng runner app has been on the back burner forever because of the hassle, but this, this makes it so easy, so do I have to wait for xcode to not be beta or can I go ahead and use beta to make the app and it will run just fine on iOS 16?
Great work here. One comment. If you change the fetchLookAroundPreview to be an async function like this: func fetchLookAroundPreview() async { if let mapSelection { lookaroundScene = nil let request = MKLookAroundSceneRequest(mapItem: mapSelection) lookaroundScene = try? await request.scene } } you can remove the Task unit of work and then replace both onAppear and the onChange for mapSelection to this: .task(id: mapSelection) { await fetchLookAroundPreview() }
You can do a similar thing with the fetchRoute function. Make it asynchronous and then you can use a task instead of onChange for the getDirections. .task(id: getDirections) { if getDirections { await fetchRoute() } }
Unfortunately, this code no longer works (as of February 26, 2024). Despite being a well-produced video, its non-functionality can be confusing. (Code stops working at 26 minutes and 52 seconds in the Video)
Before the iOS 17 update I used annotationitems to append annotations from an array, which gave me a lot of other issues. Any idea how to add interactable annotations with new update? Really close to just going back to Old School Swift 🤣
That part about the .rect(rect) not being zoomed out far enough is intentional. They did that so you can do things like offset without having to do a bunch of conversions from Coords to View Frames. Having it directly as a rect means you can add padding.
Amazing video! Thanks for all this work. How would you go about updating the camera pitch as well? I also wanted to ask how to update the camera but not to display the whole polyline but to put it like behind the user just like google maps. Thanks again!
Very NIce
Question, if I make app that uses AI to pick a running route for me ( that is differnt) but includes what ever restaurant I want , like say I wanted to run by mc donalds one morning, and run by starbucks the next, but I don't want the same path b2b days even if I go to the same starbucks each day.
6:26 what is the title of that video?
I have a tabview at the bottom of my app at all times. How do I get a sheet to come up from the bottom without covering it
The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
how can ı solve this
Hello, nice tutorial, one more question, to make your app user friendly: if i want to add a "clean" button on top of the map that will erase all my previous search results, so that i can start a new search : putting
route = nil
searchText = ""
results.removeAll()
showDetails = false
getDirections = false
cameraPosition = .region(.myRegion)
mapSelection = nil
does not seem to be sufficient
did i miss something ? because any new search using textfield overaly, does not provide any new result !!
thank you so much by advance if you can tell us a bit more about this issue
Question, if I make app that uses AI to pick a running route for me ( that is differnt) but includes what ever restaurant I want , like say I wanted to run by mc donalds one morning, and run by starbucks the next, but I don't want the same path b2b days even if I go to the same starbucks each day.
I have been avoiding using beta xcode because I didn't want compatibility issues with my older devices, I also have older watch and tablet, but my rng runner app has been on the back burner forever because of the hassle, but this, this makes it so easy, so do I have to wait for xcode to not be beta or can I go ahead and use beta to make the app and it will run just fine on iOS 16?
Great work here. One comment.
If you change the fetchLookAroundPreview to be an async function like this:
func fetchLookAroundPreview() async {
if let mapSelection {
lookaroundScene = nil
let request = MKLookAroundSceneRequest(mapItem: mapSelection)
lookaroundScene = try? await request.scene
}
}
you can remove the Task unit of work and then replace both onAppear and the onChange for mapSelection to this:
.task(id: mapSelection) {
await fetchLookAroundPreview()
}
You can do a similar thing with the fetchRoute function. Make it asynchronous and then you can use a task instead of onChange for the getDirections.
.task(id: getDirections) {
if getDirections {
await fetchRoute()
}
}
Unfortunately, this code no longer works (as of February 26, 2024). Despite being a well-produced video, its non-functionality can be confusing. (Code stops working at 26 minutes and 52 seconds in the Video)
Implemented this effective today and works perfectly fine
Still works just fine as of October 2024 :). Apart from that there isn't much you can do when APIs change.
How can I select POI on the map not annotation that I created. I read this feature was added to Swift recently.
Nice work!
awesome bro !!!
Before the iOS 17 update I used annotationitems to append annotations from an array, which gave me a lot of other issues. Any idea how to add interactable annotations with new update?
Really close to just going back to Old School Swift 🤣
Can you please make a video on how to introduce geofence or shape/polygons perhaps for zipcodes on an iOS map app?
Ok, what if I don’t live in Miami? How do I actually use the users position instead of using a set position?
Check out our Uber SwiftUI Course for how to get users location with SwiftUI
Awesome video! Thanks!
That part about the .rect(rect) not being zoomed out far enough is intentional. They did that so you can do things like offset without having to do a bunch of conversions from Coords to View Frames. Having it directly as a rect means you can add padding.
but while I am trying MKmapView with mapRecthtatFits and passing rect and edges, its not working. So wha you suggest for that
Wow appreciate it that thanks so much .
hello its my error: Cannot find type 'MapCameraPosition' in scope
please help me
make sure you are using Xcode 15
let a = MKMapView().mapRectThatFits(rect, edgePadding: .init(top: 42, left: 42, bottom: 500, right: 42)) this is not working with iOS 17. Any idea ?
Amazing video! Thanks for all this work. How would you go about updating the camera pitch as well? I also wanted to ask how to update the camera but not to display the whole polyline but to put it like behind the user just like google maps. Thanks again!
Btw, how can you update the map heading to be aligned to the user heading without being laggy? I would truly appreciate it if you could help me out!!
fantastic
bro dont wanna complain but we really have to type all this out lmfaooo
You don’t have to do anything 😉
Yes. That’s what coding is lmfao.
I can't read your screen. Too far away.
Really useful for me. Thanks!
Great video, thanks!