I have recently got a MacBook Pro for iOS development and I was worried about a good tutorial. But now that I found your videos, I'm so happy that I can learn what I need painlessly. Thanks for your awesome contents! ❤✌👍
extremely simple and not overly complicated, thank you, good sir. I have been looking for someone to explain it like you have and man you saved me hours!
Thanks for creating the tutorial! I’m a beginner, so I’m not ready for that level tutorial yet. But it does give me a sense of how things are done with more complex programming in my future. Have you considered creating a low cost course for beginners to teach them the best way to do iOS programming in your opinion? If you already have a low cost beginner swift programming course, please let me know whee to find it. You have an interesting life story about how you invested in yourself to learn iOS programming to improve your future. You not only improved your own future, but now you have the ability to improve other people’s futures, by sharing your knowledge!
Happy to hear you found some value in the video, even though you weren't quite ready for it yet. I will be releasing a course in 2019, so stay tuned. Working on it after the holidays.
Very interesting Sean. Thanks for a comprehensive explanation. I am very very new to this and to see functions and rules being explained so clearly and with some common sence, syntax explanations made understanding Swift protocols so much easier to grasp.
I would like to say that was a Very informal lesson. I was fully engaged in the lesson and walked away with all the necessary information plus Some. Keep up the awesome work!
Short and sweet. Thanks Sean!!! This was a good refresher and some new ways (for me) of doing some stuff (checkLocationAuthorization). Can I request that you include searching for nearby places (cafe, restaurant, shops, etc) in the 2nd or 3rd part of the series? Thank you.
Hey Sean, I dig this video. By far the most helpful i've come across. I am having a problem with the app initializing the "checkLocationServices()" func. It worked once and show my location perfectly. Then it stopped when i uploaded to my personal device. Ive re ran the code and even created other files and used your source code directly and now ive exceeded the amount of app certificates i can make in seven days. I am green to IOS and would really like to get this down. I think xcode is the future of IDE's, If theres any advice you have I would appreciate it alot and take it seriously. If not, thanks for making a legit and clear tutorial. Also your personality is good for this, i usually feel like im falling asleep during coding tutorials.
Glad you enjoyed the tutorial 👍. I've never come across this issue, so I'm not sure. I'd have to dig into the project and do some debugging to see what's going on.
I’ll message you privately through your link in the comments. I’m in Bali till January and recently lost my wallet on the bart so it might be a while before I have a way to pay online for anything and I may figure it out before then. I’ve been using western union to counter the problem while I’m out here since it happened right before I left. Thanks for the reply. One more question tho, do you know any solid ways to find good mentors?
For mentors, I'd start following a bunch of iOS developers on Twitter and start interacting. Once you find someone you enjoy, maybe ask them? I did a video about the importance of networking on Twitter as a developer here: th-cam.com/video/QH79tyspt-w/w-d-xo.html
Great video! I am wondering how you can get a user's location and share it with other devices so that other people can see your location in real time. Thank you in advance.
This is awesome! Curious...for the didUpdateLocations part...I'm curious..is there a way to call the centerViewOnUserLocation function here so that whenever a user moves/their location updates, we reuse the code we already wrote/call our own custom function to re-center the view on the new user location? Rather than rewriting the region = MKCoordinateRegion.init line, and a new version of the center/location declaration as well. Or maybe I'm misunderstanding this, and the didUpdateLocations built-in function actually powers the centerViewOnUserLocation function that we built because it sets the locationManager.location property that we call in centerViewOnUserLocation?
thanks a lot Sean, your style is really exciting and clear for us learners. Can I ask you is there a possibility to change the device's current location programmatically without clicking debug>location>custom location? maybe with a button?
Hi @SeanAllen, Great tutorial. And thank you for making this one. At 1.20, you were setting the MapView 'delegate'? What is a delegate? And why do you need to set it to the ViewController?
Thanks for the great video! A quick question: for some reason, my zoom just doesn't work, and I have the exact same code you used in the video. I'm using xCode 11 Beta. Do you have any idea of what the problem might be? Thank you!
Great tutorial! Though, am I right that if you'd want your app to be approved by the AppStore, you would need your plist to contain all these three privacy rules? Location Always Usage Description; Location When In Use Usage Description; Location Always and When In Use Usage Description. I understand you show here just a basic functionality, so this is just a note for others.
I'm not sure off the top of my head. I'd have to look into it. I know the current app I'm working on only using the "When in Use" one and it's approved on Test Flight. I know that's not the same as the App Store, but just a data point.
Hi there, great tutorial but I have a question. When I simulate my device it does not ask me to enable location services. I get no pop ups like you did. Any idea why? Thank you.
Great tutorial! Got a question though, when I change the location in the simulator to Freeway Drive the map doesn't follow the user's location blue dot. I've double checked the code and it's the same as your video, but its different to the code you uploaded which is missing "let center..." from the extension. What am I doing wrong? Thanks
Great video.Mapkit is not a good choice for ride sharing apps or location services becoz Mapkit have limited services .in some countries it do not show directions place info and many more .
Out of interest can you have the map store information. For example if a business wants to show their location to other users, the map would have that location marked for everyone else to see with maybe a small image
Better code for 11:39. let region = MKCoordinateRegion.init(center: location, span: MKCoordinateSpan.init(latitudeDelta: 10000, longitudeDelta: 10000))
Running your source code through my simulator shows me a location somewhere in San Francisco while I am in Germany. The console says: User-Location[15072:589126] libMobileGestalt MobileGestalt.c:1647: Could not retrieve region info Using XCode 11.2
hi i used your source code files, and was unable to get my location on my computer when running the app on the simulator. Do you know how i would be able to hsow my own location? thanks
Thanks for the great video! But are your locationmanager-delegate methodes invoked when changing the location? Because mine weren't until I added the locationManager.startUpdatingLocation() call in the locationManager-setup.
Hi Sean! Nice video! Unfortunately, I have an error when I tried to write centerViewOnUserLocation function, it says that 'MKCoordinateRegion.init function has been renamed to MKCoordinateRegion.MKCoordinateRegionMakeWithDistance' but When I changed it to let region = MKCoordinateRegion.MKCoordinateRegionMakeWithDistance(location, 10000, 10000) , I get an error called "Type 'MKCoordinateRegion' has no member 'MKCoordinateRegionMakeWithDistance' " .. What should I do? I couldn't figured it out.
Very helpful video, thank you for your awesome work. But I have question about requesting location services: I need to know user's current location in two view controllers. What would be the best approach? currently I am checking for location services in both of them, but I think it is not good solution. Any advice? Thanks
You only need to request permission once. If you're using location in many screens throughout your app, then it might be a good idea to create a singleton that handles your locationManager. I'm not sure if I'd do that for only two screens tho.
Hi Im having an error and from what i can see i haven't missed anything from your video. in both functions (locationManager and centreViewOnUserLocation) its with this line: let region = MKCoordinateRegion.init(center: center, latitudinalMeters: regionInMeters, longitudinalMeters: regionInMeters) i get the error on both lines saying: Cannot invoke 'MKCoordinateRegion.Type.init' with an argument list of type '(center: CLLocationCoordinate2D, latitudinalMeters: Double, longitudinalMeters: Double)' and the "init" part is highlighted. Many Thanks
That is because the .init version of MKCoordinateRegion has been updated in Swift 4.2. This tutorial was made with Xcode 10 and Swift 4.2 (which will be released in a couple weeks). If you're still using Xcode 9 and Swift 4.1, start typing MKCoordinateRegionMake and you should get an auto complete for a function that takes in distance using meters. Let me know if that works.
Hi I see that explains a lot. I found an alternative way around it, i did this: let span = MKCoordinateSpanMake(0.01, 0.01) let region = MKCoordinateRegion(center: center, span: span) achieved the same result. Many Thanks for the response.
If you get the message 'authorizationStatus()' was deprecated in iOS 14.0 for me it worked to write: let manager = CLLocationManager switch manager.authorizationStatus
It does not work for me. Am I doing it wrong? I've been looking for an hour! func checkLocationAuthorization() { let manager = CLLocationManager switch manager.authorizationStatus { case .authorizedWhenInUse: // do map break case .denied: // show how to turn it on break case .notDetermined: locationManager.requestWhenInUseAuthorization() case .restricted: // show them they cant break case .authorizedAlways: // do map break
Every time I move the map it always jumps back to the user's location after a couple seconds. How would I change the code so when I move the map it stays where I put it? I gather it has something to do with didUpdateLocations.
the location isn't showing up, why? I clicked the Users location on map view and I did the code. before I pressed button it wasn't working with the code, can you help please
Im not sure what's happing with my Xcode, i have the latest version, doesn't recognise MapScreen, nor can find other of your typos? well confused animi using swift...... help?
at 6:07 you make a switch statement with CLLocationManager. Why use that instead of the reference created up top 'let locationManager = CLLocationManager()'
Hey when I run it the simulator just says stuck in the white screen and this error comes up MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.Any help or suggestion?
Never seen that before... I have a link to download the source code in the description. Have you tried downloading that and running it? And then compare my code to yours?
Hi Sean! I have some problem in MapKit part 1. I did everything right in code, but there is not showing user location. And show this error in console( did fail with error: Error Domain=kCLErrorDomain Code=0"(null)"). Can you help with this?
I'm about 10 minutes when you run the app from this point I have my code exactly as you do minus switch CLL part xbode tells me "switch covers unknown cases" and recommends I put " @unknown default: break " It builds fine with or without but when I try and run I get "Build succeeded" followed by an open to Thread 1 class AppDelegate: UIResponder, UIApplicationDelegate { And the error is "=Thread 1: signal SIGABART" It won't run. I even used your code still get the issue 21 main
I'm having trouble with this tutorial and it's something deeper in my simulator and I"m asking for a little help. Can/would you be willing to look at it via dropbox?
Thank you! Is there a way to get (the coordinates of) a new location that is some distance down a street from an initial location with the Google Maps SDK for iOS? For example, if I want to get the coordinates of a location 20 feet down the same street from some other location. Something like "newLocation = location.translateUpStreet(20)". Some things I've already tried: Adjusting (incrementing/decrementing between markers) the longitude or latitude doesn't guarantee that the marker is visible from the street view. -Making a formula to increment/decrement the address number doesn't seem like it will work either, because not all streets have a regular address number pattern. Thank you so much for any advice
@@seanallen Since you're here I have a question. With MapKit, is it possible for me to have a map where users are able to post something at their location, and a bubble is then on the map with that post? If you tap on their bubble then it goes to another View where there is like a profile of the person? Thank you!
@@seanallen Also one more question, is it possible for me to make the map look different? Like how snapchat has custom maps and so does Uber. Because with my app you don't need to see the entire railroad network of Germany ya know.
Thanks for the nice video! However I think you did some extra work you didn't need to do by manually making the map follow the user. Why not just do this: self.mapView.userTrackingMode = MKUserTrackingModeFollow I'm showing Objective-C, surely it could be done in Swift. I think the movements of the map will be smoother.
Hey there, pretty new to coding and I followed you’re instructions(which are fantastic by the way) but when I run the simulator im not getting my correct location. its putting me in some other country(can't tell because its zoomed in) without the blue dot. Not sure what's going on but would very much appreciate it if someone responded. Thanks in advance!
Hey Sean thanks man! When I try to pan around the map, it always jumps back to the user location region. How do I allow user location updates while able to pan around the map ? Thanks
func mapView(_ mapView: MKMapView, didUpdate userLocation: MKUserLocation). when should i use this function and may I know what this function does/when it invokes??
Did you do all the permission stuff in the code? I have my source code linked in the description. Have you downloaded that and checked against my source code?
@@seanallen After a little debugging, here's what I found. When run on the simulator, the location doesn't pass the if let inside the method centerViewOnUserLocation. However, when run on my personal device, the location successfully gets unwrapped which is why it works on an actual device.
Hey @Sean Allen , I'm using the same code as you but in my app, it is not showing my user location. I'm in South India. I also tried in Storyboard also.
Hi Sean, Can you tell me how to pause location service when the user is stationary and resume as he moves using coreLocation framework(By considering ClActivity type).
Watch Next - iOS Take Home Project - Job Interview Practice - Free Preview - th-cam.com/video/MSIe2y6Fee8/w-d-xo.html
I have recently got a MacBook Pro for iOS development and I was worried about a good tutorial. But now that I found your videos, I'm so happy that I can learn what I need painlessly.
Thanks for your awesome contents! ❤✌👍
Happy you like it!
Amazing tutorial! 2 years after and I'm back here to learn how to use the mapkit for an app I'm working in. Thank you Sean! :D
It's the gift that keeps on giving 😀
The best and fastest man to teach the ios
Thanks for the kind words 👍
extremely simple and not overly complicated, thank you, good sir. I have been looking for someone to explain it like you have and man you saved me hours!
Happy to help, Jay!
I’ve been wondering for the past 3 days about learning more about MapKit and here you are with a video!!! 😭
It's fate.
Thanks for creating the tutorial! I’m a beginner, so I’m not ready for that level tutorial yet. But it does give me a sense of how things are done with more complex programming in my future.
Have you considered creating a low cost course for beginners to teach them the best way to do iOS programming in your opinion? If you already have a low cost beginner swift programming course, please let me know whee to find it.
You have an interesting life story about how you invested in yourself to learn iOS programming to improve your future. You not only improved your own future, but now you have the ability to improve other people’s futures, by sharing your knowledge!
Happy to hear you found some value in the video, even though you weren't quite ready for it yet. I will be releasing a course in 2019, so stay tuned. Working on it after the holidays.
Dude you are the bomb! Thank you so much for the knowledge!! Better than any university class I could take!! The learning never ends.
Happy to help, Kyle!
I've seen a lot of tutorials on iOS but Sean is the best one out there. Thank you!
Thanks Firzok! Glad you liked it 😀
Thanks for great tutorial. I am trying to restart my coding at age of 45.. This is great encouragement for my professional hobby..
That's awesome to hear. I didn't start my coding career till i was 33. Best of luck!
Very interesting Sean. Thanks for a comprehensive explanation.
I am very very new to this and to see functions and rules being explained so clearly and with some common sence, syntax explanations made understanding Swift protocols so much easier to grasp.
Happy to help Steve! Glad you enjoy my teaching style. 😀
Right when I needed to learn about this API to make a project to show off for an internship, you posted this. Thanks a ton man.
Great timing! Happy to hear it helped 👍
Love the way you explain it. Will watch more of your videos for sure!
Glad you liked it!
BROOOOOOOO THIS VIDEO IS 🔥 🔥 🔥 your explanation is so thorough thank you for these videos. Please keep up the great work sir!!!!!
Glad you liked it, Brian!
Sean do you only specialize in developing using swift and Xcode only? Do you develop in other languages too? Do you do freelance work?
I specialize in only Xcode and Swift. I used to do freelance work but have since stopped to build my own business and producst.
I would like to say that was a Very informal lesson. I was fully engaged in the lesson and walked away with all the necessary information plus Some. Keep up the awesome work!
Glad you liked it, Mar! I have a bunch more videos that are very similar 😀
Absolutely Brilliant! Great pace, no lost time, very thorough with code that works! Thank you!
Great explanation Sean. Keep doing this great job of providing useful content for all of us. You are the man...
Glad to hear you got value from the tutorial. More on the way 👍
Short and sweet. Thanks Sean!!! This was a good refresher and some new ways (for me) of doing some stuff (checkLocationAuthorization). Can I request that you include searching for nearby places (cafe, restaurant, shops, etc) in the 2nd or 3rd part of the series? Thank you.
I've already got most of parts 2 and 3 built out. Maybe that could be a part 4
Great explanation as always Sean. Its been a long time since a tutorial.
Thanks Omair. Trying to get back to doing more tutorials. Just gotta find the time.
Just awesome as always, excited for next parts to come
Thanks Shankar👍. Stay tuned.
Hey @Sean Allen ! I got awesome learning through this tutorial. Even though it was fast, I could match with it and understood well.
Glad to hear you enjoyed it 😀
super helpful. Awesome tutorial man. Please make a video of integrating google maps into iOS apps too.
Glad you enjoyed it, Sachin!
I really enjoy your videos!!! You are truly one of the best!!! Thanks!
Thanks for the kind words, Shawn. I appreciate that!
Hey whoever is reading this have a great day and keep being beautiful and inspiring
Hey Sean, I dig this video. By far the most helpful i've come across. I am having a problem with the app initializing the "checkLocationServices()" func. It worked once and show my location perfectly. Then it stopped when i uploaded to my personal device. Ive re ran the code and even created other files and used your source code directly and now ive exceeded the amount of app certificates i can make in seven days. I am green to IOS and would really like to get this down. I think xcode is the future of IDE's, If theres any advice you have I would appreciate it alot and take it seriously. If not, thanks for making a legit and clear tutorial. Also your personality is good for this, i usually feel like im falling asleep during coding tutorials.
Glad you enjoyed the tutorial 👍. I've never come across this issue, so I'm not sure. I'd have to dig into the project and do some debugging to see what's going on.
I’ll message you privately through your link in the comments. I’m in Bali till January and recently lost my wallet on the bart so it might be a while before I have a way to pay online for anything and I may figure it out before then. I’ve been using western union to counter the problem while I’m out here since it happened right before I left. Thanks for the reply. One more question tho, do you know any solid ways to find good mentors?
For mentors, I'd start following a bunch of iOS developers on Twitter and start interacting. Once you find someone you enjoy, maybe ask them? I did a video about the importance of networking on Twitter as a developer here: th-cam.com/video/QH79tyspt-w/w-d-xo.html
Thank you, @@seanallen. I also debugged and found the problem. I had my method written too far down. It was past the object initialization.
Thank you, Sean. That really helped with my little student project.
Great video! I am wondering how you can get a user's location and share it with other devices so that other people can see your location in real time. Thank you in advance.
Amazing explanation and concise, definitely looking for new content!
Thanks for the kind words... more in the way...
hello, I have a question as I get this message 'authorizationStatus()' was deprecated in iOS 14.0 what should I do?
Concise and straight to the point, well done. Does core location also provide sharing all users location like Waze or Find My Friends?
Glad you liked it, James. I'm not sure... I've never implemented that functionality.
This is awesome! Curious...for the didUpdateLocations part...I'm curious..is there a way to call the centerViewOnUserLocation function here so that whenever a user moves/their location updates, we reuse the code we already wrote/call our own custom function to re-center the view on the new user location? Rather than rewriting the region = MKCoordinateRegion.init line, and a new version of the center/location declaration as well. Or maybe I'm misunderstanding this, and the didUpdateLocations built-in function actually powers the centerViewOnUserLocation function that we built because it sets the locationManager.location property that we call in centerViewOnUserLocation?
Nice video! But what is an extension and why should we use them? 🙂
great tutorial i like your style in coding keep going sean
Thanks Ahmed!
thanks a lot Sean, your style is really exciting and clear for us learners. Can I ask you is there a possibility to change the device's current location programmatically without clicking debug>location>custom location? maybe with a button?
Nice detailed tutorial! One of a kind!
Hi @SeanAllen, Great tutorial. And thank you for making this one. At 1.20, you were setting the MapView 'delegate'? What is a delegate? And why do you need to set it to the ViewController?
Delegates are quite a large topic. I did a video talking all about them here: th-cam.com/video/DBWu6TnhLeY/w-d-xo.html. Hopefully that helps.
First time seen your videos. Great clear explanations.
Thanks Steven. Happy to have you on the channel!
Really informative, high-quality stuff! Thank you, Sean!! :-)
Happy to help, Oleg 👍
Nice tutorial with proper explanation, when you are uploading the rest 2 videos.
Thanks. Part 2 was released a couple days ago: th-cam.com/video/2wxE8byc2FQ/w-d-xo.html
Part 3 will be released later this week.
Thanks you much for nice tutorial, please keep it up. It is really helpful.
Thanks for the great video! A quick question: for some reason, my zoom just doesn't work, and I have the exact same code you used in the video. I'm using xCode 11 Beta. Do you have any idea of what the problem might be? Thank you!
Great job man, thanks for these videos. I really appreciate all the effort. I was wondering how many requests per day can we perform in MapKit?
I'm not sure on the limit to be honest.
Great tutorial! Though, am I right that if you'd want your app to be approved by the AppStore, you would need your plist to contain all these three privacy rules? Location Always Usage Description; Location When In Use Usage Description; Location Always and When In Use Usage Description. I understand you show here just a basic functionality, so this is just a note for others.
I'm not sure off the top of my head. I'd have to look into it. I know the current app I'm working on only using the "When in Use" one and it's approved on Test Flight. I know that's not the same as the App Store, but just a data point.
Great explanation thank you wish new ones are coming
Hi there, great tutorial but I have a question. When I simulate my device it does not ask me to enable location services. I get no pop ups like you did. Any idea why? Thank you.
I'm getting the same issue, I don't know why. Were you able to figure it out?
I got this because missed "case .notDetermined:". When I put there "locationManager.requestWhenInUseAuthorization()" - popup appeared.
What an amazing tutorial. Thank you so much!
BTW: I love the wrap-up part!
Thanks Qasa 👍
Great tutorial! Got a question though, when I change the location in the simulator to Freeway Drive the map doesn't follow the user's location blue dot. I've double checked the code and it's the same as your video, but its different to the code you uploaded which is missing "let center..." from the extension. What am I doing wrong? Thanks
Great video.Mapkit is not a good choice for ride sharing apps or location services becoz Mapkit have limited services .in some countries it do not show directions place info and many more .
Interesting point, Muhammad. Thanks for sharing.
Thanks for explaining. That was very helpful!
Glad you found it helpful, Charly!
Love all your vids man!
Thanks Cavin 👍. Much appreciated.
Out of interest can you have the map store information. For example if a business wants to show their location to other users, the map would have that location marked for everyone else to see with maybe a small image
Better code for 11:39. let region = MKCoordinateRegion.init(center: location, span: MKCoordinateSpan.init(latitudeDelta: 10000, longitudeDelta: 10000))
minute 16:58 what did you do in line 77?
Super useful! thank you for the clear explanations!
Running your source code through my simulator shows me a location somewhere in San Francisco while I am in Germany. The console says:
User-Location[15072:589126] libMobileGestalt MobileGestalt.c:1647: Could not retrieve region info
Using XCode 11.2
Because it's default location.
For you'r exact location run the application into you'r device.
13 dislikes from Android guys. Brilliant tutorial, you should be a teacher.
hi i used your source code files, and was unable to get my location on my computer when running the app on the simulator. Do you know how i would be able to hsow my own location? thanks
Try running the app on your device and that should work. The simulator defaults to Apple HQ
Thanks for the great video! But are your locationmanager-delegate methodes invoked when changing the location? Because mine weren't until I added the locationManager.startUpdatingLocation() call in the locationManager-setup.
what do u mean?
Thank you! I was looking for this answer.
Hi Sean! Nice video! Unfortunately, I have an error when I tried to write centerViewOnUserLocation function, it says that 'MKCoordinateRegion.init function has been renamed to MKCoordinateRegion.MKCoordinateRegionMakeWithDistance' but When I changed it to let region = MKCoordinateRegion.MKCoordinateRegionMakeWithDistance(location, 10000, 10000) , I get an error called "Type 'MKCoordinateRegion' has no member 'MKCoordinateRegionMakeWithDistance' " .. What should I do? I couldn't figured it out.
It is incredible to see the "war" between the storyboard haters and the rest of humanity. It is good to see people that respect other one's opinion
Storyboards are cancer. No one in actual industry uses them.
Very helpful video, thank you for your awesome work. But I have question about requesting location services: I need to know user's current location in two view controllers. What would be the best approach? currently I am checking for location services in both of them, but I think it is not good solution. Any advice? Thanks
You only need to request permission once. If you're using location in many screens throughout your app, then it might be a good idea to create a singleton that handles your locationManager. I'm not sure if I'd do that for only two screens tho.
Hi
Im having an error and from what i can see i haven't missed anything from your video.
in both functions (locationManager and centreViewOnUserLocation) its with this line: let region = MKCoordinateRegion.init(center: center, latitudinalMeters: regionInMeters, longitudinalMeters: regionInMeters)
i get the error on both lines saying: Cannot invoke 'MKCoordinateRegion.Type.init' with an argument list of type '(center: CLLocationCoordinate2D, latitudinalMeters: Double, longitudinalMeters: Double)'
and the "init" part is highlighted.
Many Thanks
That is because the .init version of MKCoordinateRegion has been updated in Swift 4.2. This tutorial was made with Xcode 10 and Swift 4.2 (which will be released in a couple weeks). If you're still using Xcode 9 and Swift 4.1, start typing MKCoordinateRegionMake and you should get an auto complete for a function that takes in distance using meters. Let me know if that works.
Hi
I see that explains a lot. I found an alternative way around it, i did this:
let span = MKCoordinateSpanMake(0.01, 0.01)
let region = MKCoordinateRegion(center: center, span: span)
achieved the same result.
Many Thanks for the response.
let region = MKCoordinateRegionMakeWithDistance(location, 10000, 10000)
it worked
Man uh r the savior
Awesome
Just wanted to know if we want other user location on our map what should be the best practice
Happy to help! I'm not sure about using another users location. You'd have to have that on a server somewhere.
If you get the message 'authorizationStatus()' was deprecated in iOS 14.0 for me it worked to write:
let manager = CLLocationManager
switch manager.authorizationStatus
For me the same
It does not work for me. Am I doing it wrong? I've been looking for an hour!
func checkLocationAuthorization() {
let manager = CLLocationManager
switch manager.authorizationStatus {
case .authorizedWhenInUse:
// do map
break
case .denied:
// show how to turn it on
break
case .notDetermined:
locationManager.requestWhenInUseAuthorization()
case .restricted:
// show them they cant
break
case .authorizedAlways:
// do map
break
you been very helpful thanks a lot - but when I run the app the map dosnt move even when I change the meters size
thanks for creating tutorial it helped me a lot
Happy to hear it helped!
Hello Sean,
the app only runs on my iPhone device. If I run the app on the simulator then the location poin is missing.
Helpful as always! Thanks bru
happy to see your video again...good work...can u plz help me out with your xcode theme name bcz i dont see the one you have.Thanks
It's dark mode with red accents in macOS Mojave.
Every time I move the map it always jumps back to the user's location after a couple seconds. How would I change the code so when I move the map it stays where I put it? I gather it has something to do with didUpdateLocations.
the location isn't showing up, why? I clicked the Users location on map view and I did the code. before I pressed button it wasn't working with the code, can you help please
Im not sure what's happing with my Xcode, i have the latest version, doesn't recognise MapScreen, nor can find other of your typos? well confused animi using swift...... help?
where you get the map screen from I got lost :(
blue dot is not appearing in my simulator i have tried your approach of first video and also tried your attached code
at 6:07 you make a switch statement with CLLocationManager. Why use that instead of the reference created up top 'let locationManager = CLLocationManager()'
Hey Mate, So i tried changing my location but the blue dot has gone grey and doesn't blink anymore. Is there something I'm missing ??
Hey when I run it the simulator just says stuck in the white screen and this error comes up MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.Any help or suggestion?
Never seen that before... I have a link to download the source code in the description. Have you tried downloading that and running it? And then compare my code to yours?
Hi Sean! I have some problem in MapKit part 1. I did everything right in code, but there is not showing user location. And show this error in console( did fail with error: Error Domain=kCLErrorDomain Code=0"(null)"). Can you help with this?
I'm about 10 minutes when you run the app from this point I have my code exactly as you do minus
switch CLL part xbode tells me "switch covers unknown cases" and recommends I put
" @unknown default:
break
"
It builds fine with or without but when I try and run I get
"Build succeeded" followed by an open to
Thread 1
class AppDelegate: UIResponder, UIApplicationDelegate {
And the error is "=Thread 1: signal SIGABART"
It won't run. I even used your code still get the issue
21 main
I'm having trouble with this tutorial and it's something deeper in my simulator and I"m asking for a little help. Can/would you be willing to look at it via dropbox?
Thanks Sean!
Glad you liked it!
Very helpful thank you so much!
Happy you found it helpful, Wang 👍
Wow I was really looking forward to it
Thank you man !!!!
Glad you liked it, Junaid!
thanks for including the source code!
Good tutorial, good explanation. 👍 👍 👍 👍 👍
Thanks Sang!
Thank you! Is there a way to get (the coordinates of) a new location that is some distance down a street from an initial location with the Google Maps SDK for iOS? For example, if I want to get the coordinates of a location 20 feet down the same street from some other location. Something like "newLocation = location.translateUpStreet(20)". Some things I've already tried:
Adjusting (incrementing/decrementing between markers) the longitude or latitude doesn't guarantee that the marker is visible from the street view.
-Making a formula to increment/decrement the address number doesn't seem like it will work either, because not all streets have a regular address number pattern.
Thank you so much for any advice
authorisation Status was depreciated in iOS 14
Perfect tutorial, thank you!
Glad you enjoyed it!
@@seanallen Since you're here I have a question. With MapKit, is it possible for me to have a map where users are able to post something at their location, and a bubble is then on the map with that post? If you tap on their bubble then it goes to another View where there is like a profile of the person? Thank you!
Yeah, that’s possible. But too complex to explain in a TH-cam comment. But certainly possible. Look up mapkit annotations.
@@seanallen Also one more question, is it possible for me to make the map look different? Like how snapchat has custom maps and so does Uber. Because with my app you don't need to see the entire railroad network of Germany ya know.
I don't believe you can change to look of the maps using MapKit.
mine always says Thread 1: "[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mapView."
Thanks for the nice video! However I think you did some extra work you didn't need to do by manually making the map follow the user. Why not just do this:
self.mapView.userTrackingMode = MKUserTrackingModeFollow
I'm showing Objective-C, surely it could be done in Swift. I think the movements of the map will be smoother.
Thanks for pointing that out. I'll look into that!
Hey there, pretty new to coding and I followed you’re instructions(which are fantastic by the way) but when I run the simulator im not getting my correct location. its putting me in some other country(can't tell because its zoomed in) without the blue dot. Not sure what's going on but would very much appreciate it if someone responded. Thanks in advance!
Hey Sean thanks man! When I try to pan around the map, it always jumps back to the user location region. How do I allow user location updates while able to pan around the map ? Thanks
Good job! thanks for this video.
func mapView(_ mapView: MKMapView, didUpdate userLocation: MKUserLocation). when should i use this function and may I know what this function does/when it invokes??
Thank you so much so helpful! but I have a question. Why my location is in San Francisco.....?
Happy to help, Danny. If you are using the simulator, that defaults to SF. Try running it on your phone.
@@seanallen Thank you so much!!!!
Hello!
I am not able to see the blue dot even after adding that single line code. please help me through this. thanks
Did you do all the permission stuff in the code? I have my source code linked in the description. Have you downloaded that and checked against my source code?
@@seanallen Ya same here. I ran it on my phone and it worked so it must be a bug with the simulators.
@@seanallen After a little debugging, here's what I found. When run on the simulator, the location doesn't pass the if let inside the method centerViewOnUserLocation. However, when run on my personal device, the location successfully gets unwrapped which is why it works on an actual device.
Thanks for the heads up. Haven't looked at that code in a while.
Hey @Sean Allen ,
I'm using the same code as you but in my app, it is not showing my user location. I'm in South India. I also tried in Storyboard also.
"MobileGestalt.c:1647: Could not retrieve region info"
This is the error I am getting, Can someone please help?
Is your map screen extension in your class definition or outside of it? I seem to get an error either way.
Hi Sean, Can you tell me how to pause location service when the user is stationary and resume as he moves using coreLocation framework(By considering ClActivity type).
형님! 형님덕에 해결했습니다.. 형님! 사랑합니다!!!
Happy to help 😀