SwiftUI LocationButton - Get User Location | iOS 15

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 31

  • @gregorymoore2877
    @gregorymoore2877 3 ปีที่แล้ว +6

    Excellent video as usual. but if you really want the latest location, you need `locations.last` as new locations are added to the end of that array. According to Apple's documentation.

  • @nemanja7901
    @nemanja7901 2 ปีที่แล้ว +5

    Didi someone have this problem: Location[40922:297515] [MKCoreLocationProvider] CLLocationManager() for did fail with error: Error Domain=kCLErrorDomain Code=1 "(null)" ?

    • @MrMurmandramas
      @MrMurmandramas ปีที่แล้ว

      did you figure out what was the cause?

  • @yourbestsail
    @yourbestsail ปีที่แล้ว +1

    To get the most recent location it's locations.last and not locations.first. Correct?

  • @siamesestormtrooper
    @siamesestormtrooper ปีที่แล้ว +2

    I'm also getting an error saying "Publishing changes from within view updates is not allowed". This seems to be a problem thats come up within the last few months with SwiftUI

  • @Mubashirminhas-c5i
    @Mubashirminhas-c5i ปีที่แล้ว +2

    Nicely done Sean.

    • @seanallen
      @seanallen  ปีที่แล้ว

      Glad you liked it!

  • @dineshdas9983
    @dineshdas9983 2 ปีที่แล้ว +2

    I did exactly what but it shows the the error in build log in purple Color Saying " Publishing changes from within view updates is not allowed, this will cause undefined behavior.
    "
    what am I do now?

  • @Stephen2697.
    @Stephen2697. 3 ปีที่แล้ว

    Gosh you make iOS development easy & concise. 👏

  • @ajayspatil
    @ajayspatil 3 ปีที่แล้ว

    Awesome Sean!!! Never stop @Publishing New videos!!

  • @aticatac
    @aticatac 3 ปีที่แล้ว +1

    Great tutorial, just what I needed.

  • @tpmchugh6628
    @tpmchugh6628 3 ปีที่แล้ว

    Thank you Sean. This was a great, crystal clear and to-the-point presentation on how to get the current location of a user and present it on a map view.

  • @TarunReddy_RM
    @TarunReddy_RM 3 ปีที่แล้ว

    Great Video Sean as always. Quick question, is it possible to send someone your location like how you can send your location in the native apple find my friends application? Thank you

  • @christoskatsenos13
    @christoskatsenos13 3 ปีที่แล้ว +1

    Once again a great video!

  • @mikebruns1300
    @mikebruns1300 ปีที่แล้ว

    Error with xcode 14
    Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Delegate must respond to locationManager:didUpdateLocations:'

  • @iosdev5682
    @iosdev5682 3 ปีที่แล้ว

    I would want to console log the user's location, how so?

  • @muhammadtayyab2004
    @muhammadtayyab2004 2 ปีที่แล้ว

    Please start tutorials for apple watch development..

  • @zb1123
    @zb1123 3 ปีที่แล้ว

    Sean - have remote-fetched Image(uiImage:) in Widgets broken for you? Keep getting weird visual bugs where portions are blacked out temporarily. Think it may be a system rendering bug as the issue "fixes" itself, after spam swiping on the homescreen / widget focus menu (w/o firing any new timeline requests)... Really frustrating & wondered if you have come across this/had a solution?

  • @jaewooko4527
    @jaewooko4527 2 ปีที่แล้ว

    Thanks again for nice tip.

  • @eliabbott4539
    @eliabbott4539 2 ปีที่แล้ว

    Hey, Sean thanks for making this video it helped and was very clear. I am in the middle of updating my app so they have more features and I am implementing this map- get users location button into it. But I am wondering if you can help with map annotations and being able to click on a pin and be able to use the directions feature of maps. Much appreciated

  • @abdouett3676
    @abdouett3676 3 ปีที่แล้ว

    Thank you for the video! Instead of using Main queue, it's possible to use @Main Actor.

  • @LGiampouras
    @LGiampouras 3 ปีที่แล้ว +2

    Where’s the pink location dot 😁

  • @relax_music668
    @relax_music668 2 ปีที่แล้ว

    Thank you Sean。

  • @wn352
    @wn352 3 ปีที่แล้ว

    King.

  • @ormusicevents
    @ormusicevents 2 ปีที่แล้ว

    All it says for me is location button not in scope! Help

    • @pam_app
      @pam_app 2 ปีที่แล้ว +2

      import CoreLocationUI

    • @ormusicevents
      @ormusicevents 2 ปีที่แล้ว

      @@pam_app thank you!

  • @cristibaluta
    @cristibaluta 3 ปีที่แล้ว

    I found it unreliable, i need to tap it multiple times to get the location.

  • @judy8821
    @judy8821 3 ปีที่แล้ว

    Great!