Building an iOS 9 Share Extension with Swift 2.0

Опубликовано: 30 Октябрь 2015
на канале: Deege
28,424
302

Today I want to share with you building share extensions using Swift. We're going to write a simple app that lets us select an image in our photo album, and share it to our application.

** The code on GitHub is written and compiled for Swift 3.1 and iOS 10.3 on Xcode 8.3. (Updated 04-06-17) **

So first what is a share extension? A share extension is a mini app we can associate with our main app, that can run from the common share sheet.

For example, when you select an image, and then select the share icon, you have a choice of applications to share the image to. The usual suspects are Facebook, Twitter, Message and so on. Our goal is to make our application available here.

So I said that this is really a mini app that we can associate with our main app.

That means the life cycle of the share app is a bit different for our main app. A share extension is started by the user selecting the icon for our app.

#swift #programming #tutorial


Like the video? Don't forget to subscribe! ➜ http://www.deegeu.com/subscribe


Keep up to date with the newsletter! ➜ http://www.deegeu.com/newsletter/

Transcript and code: http://www.deegeu.com/ios-share-exten...

Concepts: iOS, swift, share extension, SLComposeServiceViewController, NSExtensionItem, NSExtensionActivationRule, TRUEPREDICATE

Social Links: Don't hesitate to contact me if you have any further questions.
WEBSITE : [email protected]
TWITTER :   / deege  
FACEBOOK:   / deegeu.programming.tutorials  
GOOGLE+ : http://google.com/+Deegeu-programming...

About Me: http://www.deegeu.com/about-programmi...

Related Videos:

The iOS/Swift Survival Guide
   • The iOS/Swift Survival Guide - Swift ...  

Media credits:
All images are owned by DJ Spiess unless listed below:

No copyright infringement intended.

Music:
Dispersion Relation by Kevin MacLeod is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/...)
Source: http://incompetech.com/music/royalty-...
Artist: http://incompetech.com/