ShareLink and ShareSheet in iOS 16

Поділитися
Вставка
  • Опубліковано 6 лип 2024
  • In this video, I am going to introduce you to ShareLink which was introduced in iOS 16 and it is a much simpler way to gather information from your app that you may which to share with others via the ShareSheet option.
    We will look at the basic initializers and what affect each of the arguments have when sharing via a text message or email and then we will take a look at a more practical example.
    If you want to support my work, you can buy me a coffee :)
    ko-fi.com/stewartlynch
    Table of Contents:
    0:00 Introduction
    1:57 The Basics
    16:00 Practical Example
    Starter Project Files:
    www.createchsol.com/StarterPro...
    Completed Project:
    github.com/StewartLynch/Share...
    References mentioned in video:
    Image Renderer in iOS 16
    • ImageRenderer iOS 16
    Other References:
    Stewart Lynch's UA-cam Channel:
    / stewartlynch
    Stewart Lynch on Twitter:
    / stewartlynch
  • Наука та технологія

КОМЕНТАРІ • 29

  • @patgoo2
    @patgoo2 Рік тому +1

    Very good video showing how to use ShareLinks and code hints. The video/audio pacing was great.

  • @kenturnbull9679
    @kenturnbull9679 Рік тому

    Very well done and IMHO very useful. Great followup to imageRenderer

  • @EricTMCode
    @EricTMCode 9 місяців тому

    Thank you Stewart, great work as usual 🙏

  • @andrejkling3886
    @andrejkling3886 Рік тому

    Thank you so much Stewart... That's useful amazing lessons

  • @user-lg2ik9zp7r
    @user-lg2ik9zp7r Рік тому

    Excellent video and explanation!!

  • @paulberghege
    @paulberghege Рік тому

    Thanks, great for reference. And the 'control shift click' tip is just pure gold!

    • @StewartLynch
      @StewartLynch  Рік тому +1

      You should watch my 3 part series on Xcode tips as there are a lot of worthwhile shortcuts to know.

    • @paulberghege
      @paulberghege Рік тому

      @@StewartLynch definitely will do now :)

  • @DrAgon-nc6pe
    @DrAgon-nc6pe 4 місяці тому

    Very well explained, thank you very much 🙏👍🙂

  • @Ivanovich935
    @Ivanovich935 Рік тому

    Nice! It was a lot of help! Thanks Stewart!

  • @holycrosscv
    @holycrosscv Рік тому

    Wow, I wish I had seen this excellent video yesterday. I needed to implement a sharesheet from a .sheet that worked for both iOS and ipadOS in iOS 15. I banged my head on the keyboard for quite a while. :) Wow is this MUCH more elegant and simple! Thanks for another spectacular video. I could not get the Control-Shift-Option trick to work. I would get just the normal option box. I do use the addon Multiliner, which does the same thing. I agree; easier to follow the code!

  • @ecx007
    @ecx007 Рік тому

    Excelent video, thank you!! The content is very important for me

  • @GaryLutchansky
    @GaryLutchansky Рік тому

    Per usual, fantastic content! Now you've got me trying to add a Share to my app.
    I'd like to have a context menu appear when a list item is pressed. The equivalent in your Wine example would be to have a list of wine items. Long-press one and bring up a share for that item. I'm struggling trying to determine where to render my view so it's available to share. Thoughts?

    • @StewartLynch
      @StewartLynch  Рік тому

      You may not be able to use a sharelink in this instance. I have not tried it myself, but I have run in to some limitations and resort to a UIViewRepresentable to create a ShareSheet using UIKit

  • @mkhasson97
    @mkhasson97 Рік тому

    Thank you Stewart for this awesome tutorial, could you please explain how to create own Action Extension in iSwiftUI? Thank you in advance.

    • @StewartLynch
      @StewartLynch  Рік тому +1

      I am afraid that I don’t know what you mean by an Action extension. Can you explain more please?

  • @thomasfahlke4253
    @thomasfahlke4253 Рік тому

    Hello Stewart, thank you very much for the extensive explanation as always. Is it possible to pre-populate the e-mail account as well as the recipient of mail and messages with ShareLink?

    • @StewartLynch
      @StewartLynch  Рік тому

      I don’t believe so because mail is only one of the options.

  • @JustinSpraggins
    @JustinSpraggins 9 місяців тому

    do you know if it's possible to go directly to a app's share extension with the passed data? And not have to show the share sheet and then tap the say Snapchat app icon, Instead just open the Snapchat share extension directly from your app.

  • @spreen_co
    @spreen_co Рік тому +1

    would be great if you could address transferable. that's the real crux. just sharing a link results in an ugly preview. giving it a text as well produces wonky behaviour with different apps. only resolution is to use transferable but that's a crazy can of worms

  • @perlmunger
    @perlmunger Місяць тому

    Nice tutorial! Thanks for that! Do you know if there is any way to load the ShareLink's item: property lazily? I want to generate a CSV of the current data in my view, but not when the view appears. Only when the user taps the share button. Does this have to be done by loading a separate view with a button that just mimics a share button using the SF symbols share icon?

    • @StewartLynch
      @StewartLynch  Місяць тому +1

      Unfortunately no. You have to revert to the older version

    • @perlmunger
      @perlmunger Місяць тому

      @@StewartLynch Ok. Thanks!

  • @yuniorsanchez8578
    @yuniorsanchez8578 5 місяців тому

    Just one question, why if you try sharing using WhatsApp instead of iMessage the image is no attached just the message?

    • @StewartLynch
      @StewartLynch  5 місяців тому

      No idea. Sorry. I do not use WhatsApp

    • @yuniorsanchez8578
      @yuniorsanchez8578 5 місяців тому

      @@StewartLynch i think thats a bug if you give it a try, and you try to share the rendered image and a mssage over whatsapp only the message is shared, but if you only have the renderimage it shares it over whatsapp, also i get a lot of webkit error when using sharelink, do you expirience the same?

  • @meowing1109
    @meowing1109 5 місяців тому

    Hey Stewart, great tutorial! What if I want to share let's say to Instagram DM or Snapchat DM modally but without showing the share sheet first? I've been trying to copy the behavior like Lapse or Locket Widget for their 3rd party sharing feature because it's more direct and simplified, but it seems there are lack of resources online. Wondering if you have any idea about how to achieve that? Thanks and good day!

    • @StewartLynch
      @StewartLynch  5 місяців тому

      YOu may have to revert to the UIKit version for that unfortunately. There are some definite limitations to this API