

The system asks you if you want to activate the. Just call it Share or whatever name you prefer. Unless you add it, sharing won’t be working properly. Go into the project section, click on the + button and select the Share extension from the list. The appID should be added to the ist file. Please follow below steps to share the file: Step1: First initialize the image. It may even net you some new customers Here I have taken an image file that has to share. Sharing is a convenient way for users to send data to each other or between devices. The Facebook developer documentation says that appID is required as your Facebook app ID. A lot of developers want to be able to share their app data via email, Messages or AirDrop. (urlScheme, options:, completionHandler: nil)Īs you can see, besides ImageData, there is also appID.
#Swift share app link download
It can be a simple UIView, UIStackView, UITableView, etc.įunc shareToFacebook(image: UIImage, urlScheme: URL, appId: String) Submit your app Download Universal Links for Developers Seamlessly link to content in your app or on your website. In that case, we should embed our views inside one view. Preparing images is quite easy, although, in the case of Facebook, you’ll need a special client ID.
#Swift share app link how to
It can be UIController’s view, but if we don’t want to get navigation elements, we should use another approach. swift mobile In this tutorial, you’ll learn, how to share images, text (or even UIView) from your iOS application on popular social media platforms and services by using Swift. Let’s start with embedding the prepared views into one UIView. To do this, we need to prepare UIImage from UIView, then change it to Data and pass it to other social media apps.

We want to pass it to Facebook or WhatsApp. Let’s say, we have a controller that shows images, labels, buttons, etc. Be it from API, hardcoded in your iOS application, or somewhere else.īut in other cases, you’ll need to prepare an image from the view displayed in the application. In many cases, you’ll have a ready image. The first thing is to prepare UIImage for sharing. So, without further ado, let the fun begin! Table of content
