Swift Deep Linking in iOS

Sdílet
Vložit
  • čas přidán 13. 07. 2024
  • In this episode explore how iOS deep linking works. You will learn about
    - URL schemes, how to define deep links in Swift code, how to handle via the AppDelegate, and then finally how to test.
    Source code
    github.com/jrasmusson/swift-a...
    Book
    www.softcover.io/read/7671f69...
    Twitter
    @jrasmusson
    Courses
    Level Up AutoLayout
    www.udemy.com/course/level-up...
    Level Up in Swift
    www.udemy.com/course/level-up...
  • Věda a technologie

Komentáře • 36

  • @KimbrellBrad
    @KimbrellBrad Před 2 lety

    Very informative! A new subject for me but now I have it in my toolbox. Thanks for sharing this!

  • @diegopachecoyave2108
    @diegopachecoyave2108 Před 2 lety +1

    This is the best explanation about deepLinks I have found so far, thank you!

  • @thientoan0101
    @thientoan0101 Před rokem

    very easy to understand, thanks for sharing.

  • @ashdreadeye6976
    @ashdreadeye6976 Před rokem

    Great video as always

  • @AnthonyMarchenko
    @AnthonyMarchenko Před rokem

    Great, very useful, thank you for the video sir!

  • @saifcodes
    @saifcodes Před 3 lety +3

    Really informative and short. Thanks

  • @wiwaltill
    @wiwaltill Před 2 lety

    Great Tutorial! I running into a problem. Can you tell, how to use with a SceneDelegate please?

  • @arslanjutt4034
    @arslanjutt4034 Před rokem

    thanks for your great tutorial, if the app is in the killed state, how can I move the specific controller.

  • @marm713
    @marm713 Před 2 lety

    Good vid. Thank you.

  • @jong6958
    @jong6958 Před 3 lety

    thank you, really like this. I have a question, what if you're opening a deep link of another app from your app? Does this fall on universal link? Can you make a video for something like this? Thank you!

    • @swiftarcade7632
      @swiftarcade7632  Před 3 lety

      Hi Jon - it could. When you open a deeplink it could be a direct deeplink (using a URL scheme) or it could be universal. So it could be either. Would love to make a universal link video, but I haven't done those before, and then require a lot more work and infrastructure on the part of the host (certificate setup and stuff like that). But if I ever do one will definitely post it here :) Thx for the question.

  • @prithibaravichandran2298

    Hi @swift Arcade
    I'm facing issue in the Swift compiler error.
    could you please help me on this as soon as possible, to resolve the below listed issue
    > Deeplink is not convertible to file
    > use of unresolved identifier 'presentTabBar'
    Thanks

  • @cinquain0
    @cinquain0 Před 2 lety

    Once you enter the url scheme you want, how does apple know to open your app across different devices? Does the link you choose register somewhere with Apple? Or does your deep link only works if your app is installed on that particular device?

    • @swiftarcade7632
      @swiftarcade7632  Před 2 lety

      Yes. The URL scheme you define is a plist entry in your app. So you define your URL scheme, and if anyone clicks on a link matching your scheme - your app will open. Yes that means that someone else could take a popular URL (like Starbucks or Spotify) and essentially hijack those links. In reality this isn't really an issue as big companies get the right to reserve their respective URLs. But it does occasionally happen.

  • @baumgartfilip
    @baumgartfilip Před 2 lety

    Is there a way to skip this system alert window asking "Open this page in "? Or do you have to implement Universal Links for that?

    • @swiftarcade7632
      @swiftarcade7632  Před 2 lety

      Good question Filip I am not sure. For scheme based URL I believe that it always pops up. I haven't played with universal links though, but maybe they don't require it. Not sure. But thanks for asking.

  • @zavatone
    @zavatone Před 3 lety +1

    One thing that's largely overlooked is security in deep links. They can be easy to spoof. How do we know if they are from a trusted source?

    • @swiftarcade7632
      @swiftarcade7632  Před 3 lety +1

      Ya great question zavatone. As the ones receiving the incoming request, we need to do that work ourselves (checking for injection and malicious parameters coming in via the URL). At the end of the day we don't really know where these are coming in from. So we need to do that validation ourselves. Great question though.

    • @harounhajem7972
      @harounhajem7972 Před 2 lety +1

      Yes was thinking of what would happen if you declare the same deeplink as some other app. Won't that collide?

  • @sagardaundkar3931
    @sagardaundkar3931 Před 3 lety

    I had a very basic question if two apps use same URLScema, Even I try to search for the same schema then which will open? And what is the reason behind it?

    • @swiftarcade7632
      @swiftarcade7632  Před 3 lety +1

      That's a very good question Sagar, and I am not actually sure what will happen. I think which every app gets onto the phone first wins? But don't quote me on that as I am not actually sure.

    • @jroceastvan
      @jroceastvan Před 2 lety

      ​@@swiftarcade7632 iOS behaviour is undefined if there are two apps registered for an URL scheme. To avoid this scenario you should try to define a handler that is specific for your app . Use a longer descriptive name. This has caused issues in the past where 3rd party apps have defined their own scheme that are duplicates of existing app schemes and it can break navigation for the other apps.

    • @swiftarcade7632
      @swiftarcade7632  Před 2 lety

      @@jroceastvan Absolutely - that is great advice. Be more specific to avoid conflicts. Thanks for sharing Jacob.

  • @moosegoose1282
    @moosegoose1282 Před 3 lety +1

    Please do notification deep link!!!!!

    • @swiftarcade7632
      @swiftarcade7632  Před 3 lety +1

      Do you mean like get an in app notification and then deeplink somewhere?

    • @moosegoose1282
      @moosegoose1282 Před 3 lety

      @@swiftarcade7632 yeah, the notification would be remote

  • @ynmfun
    @ynmfun Před 2 lety

    can you talk about universal links ?

  • @jroceastvan
    @jroceastvan Před 2 lety

    My desk is only clean like that about once every 2 years lol

    • @swiftarcade7632
      @swiftarcade7632  Před 2 lety

      Haha - I have always had a pretty clean desk. But I know what you mean!