SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Extending the Reach ofYour
iOS App
Lecture 11: Working with URL Schemes and
App Extensions
Jonathan R. Engelsma, Ph.D.
TOPICS
• Motivation
• URL Schemes
• App Extensions
EXTENDING OUR REACH…
• By default, our apps only have user
eyeballs when the user launches the app
and it has the foreground.
• The average user’s launch screen is
littered with a plethora of launch
icons…
• How can we create additional
opportunities for our app to garner user
eyeballs?
STANDING ON
SHOULDERS…
• Intentionally avoid reinventing
the wheel …
• … by utilizing the haystack of
functionality already on the
user’s device.
• Ride on the success of
somebody else’s more popular
app?
URL SCHEMES
• URL Schemes let our app send actionable data to other apps
via a custom URL.
• For example, if I was writing an app for my restaurant and I
take reservations via a reservation portal that had a popular
app with a custom URL scheme, I could invoke that app from
my restaurant app to make a reservations.
SUPPORTING A CUSTOM URL
SCHEME
• In my Info.plist I need to make an URLType entry:
INVOKING A CUSTOM URL
• Enter the custom URL into
mobile Safari:
INVOKING A CUSTOM URL
• From any app1
APP EXTENSION DEMO
APP EXTENSIONS IN IOS
• “an app extension lets you
extend custom functionality and
content beyond your app and
make it available to users while
they’re using other apps or the
system”
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/
TYPES OF EXTENSIONS
• Today
• Share
• Action
• Photo Editing
• Document Provider
• Custom Keyboard
• Apple Watch
DEPLOYING EXTENSIONS
• Delivered to App Store as part of an app bundle. e.g.,
cannot be deployed stand-alone.
• The app that bundles the extension is referred to as the
container app.
• The app that invokes the extension is referred to as the
host app.
• An app can bundle more than one extension.
HOWTHEY WORK
• Every invoked instance of an extensions runs in its own
process.
• An extension cannot communicate with its container app.
• An extension cannot enable communication between its
container app and host app.
• Indirect communication is possible via openURL() or a shared
data container (e.g. NSUserDefaults)
EXTENSION LIFECYCLE
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/
ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW2
COMMUNICATION WITH
HOST APP ONLY
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/
ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW2
INDIRECT COM WITH
CONTAINING APP
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/
ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW2
API LIMITATIONS
• app extensions cannot:
• accessed a sharedApplication object.
• use APIs explicitly marked unavailable
• access camera or mic
• perform long running tasks
• receive data via AirDrop
CREATING AN APP
EXTENSION
• Assuming the Xcode project for the containing app exists:
• Step 1: decide what extension point type makes sense
• Step 2: add a new target to the project, and select iOS /
Application Extension.
• Step 3: implement the extension.
In containing app Xcode project goto File -> New ->Target
APP EXTENSION DEMO

Contenu connexe

Plus de Jonathan Engelsma

BIP Hive Scale Program Overview
BIP Hive Scale Program OverviewBIP Hive Scale Program Overview
BIP Hive Scale Program OverviewJonathan Engelsma
 
Selling Honey at Farmers Markets, Expos, etc.
Selling Honey at Farmers Markets, Expos, etc. Selling Honey at Farmers Markets, Expos, etc.
Selling Honey at Farmers Markets, Expos, etc. Jonathan Engelsma
 
Harvesting and Handling Honey for Hobby and Small Sideline Beekeepers
Harvesting and Handling Honey for Hobby and Small Sideline BeekeepersHarvesting and Handling Honey for Hobby and Small Sideline Beekeepers
Harvesting and Handling Honey for Hobby and Small Sideline BeekeepersJonathan Engelsma
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)Jonathan Engelsma
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)Jonathan Engelsma
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)Jonathan Engelsma
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03) iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03) Jonathan Engelsma
 
So You Want To Be a Beekeeper?
So You Want To Be a Beekeeper? So You Want To Be a Beekeeper?
So You Want To Be a Beekeeper? Jonathan Engelsma
 

Plus de Jonathan Engelsma (9)

BIP Hive Scale Program Overview
BIP Hive Scale Program OverviewBIP Hive Scale Program Overview
BIP Hive Scale Program Overview
 
Selling Honey Online
Selling Honey OnlineSelling Honey Online
Selling Honey Online
 
Selling Honey at Farmers Markets, Expos, etc.
Selling Honey at Farmers Markets, Expos, etc. Selling Honey at Farmers Markets, Expos, etc.
Selling Honey at Farmers Markets, Expos, etc.
 
Harvesting and Handling Honey for Hobby and Small Sideline Beekeepers
Harvesting and Handling Honey for Hobby and Small Sideline BeekeepersHarvesting and Handling Honey for Hobby and Small Sideline Beekeepers
Harvesting and Handling Honey for Hobby and Small Sideline Beekeepers
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 7)
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 09)
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 06)
 
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03) iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 03)
 
So You Want To Be a Beekeeper?
So You Want To Be a Beekeeper? So You Want To Be a Beekeeper?
So You Want To Be a Beekeeper?
 

Dernier

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 

Dernier (20)

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 11)

  • 1. Extending the Reach ofYour iOS App Lecture 11: Working with URL Schemes and App Extensions Jonathan R. Engelsma, Ph.D.
  • 2. TOPICS • Motivation • URL Schemes • App Extensions
  • 3. EXTENDING OUR REACH… • By default, our apps only have user eyeballs when the user launches the app and it has the foreground. • The average user’s launch screen is littered with a plethora of launch icons… • How can we create additional opportunities for our app to garner user eyeballs?
  • 4. STANDING ON SHOULDERS… • Intentionally avoid reinventing the wheel … • … by utilizing the haystack of functionality already on the user’s device. • Ride on the success of somebody else’s more popular app?
  • 5. URL SCHEMES • URL Schemes let our app send actionable data to other apps via a custom URL. • For example, if I was writing an app for my restaurant and I take reservations via a reservation portal that had a popular app with a custom URL scheme, I could invoke that app from my restaurant app to make a reservations.
  • 6. SUPPORTING A CUSTOM URL SCHEME • In my Info.plist I need to make an URLType entry:
  • 7. INVOKING A CUSTOM URL • Enter the custom URL into mobile Safari:
  • 8. INVOKING A CUSTOM URL • From any app1
  • 10. APP EXTENSIONS IN IOS • “an app extension lets you extend custom functionality and content beyond your app and make it available to users while they’re using other apps or the system” https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/
  • 11. TYPES OF EXTENSIONS • Today • Share • Action • Photo Editing • Document Provider • Custom Keyboard • Apple Watch
  • 12. DEPLOYING EXTENSIONS • Delivered to App Store as part of an app bundle. e.g., cannot be deployed stand-alone. • The app that bundles the extension is referred to as the container app. • The app that invokes the extension is referred to as the host app. • An app can bundle more than one extension.
  • 13. HOWTHEY WORK • Every invoked instance of an extensions runs in its own process. • An extension cannot communicate with its container app. • An extension cannot enable communication between its container app and host app. • Indirect communication is possible via openURL() or a shared data container (e.g. NSUserDefaults)
  • 15. COMMUNICATION WITH HOST APP ONLY https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW2
  • 16. INDIRECT COM WITH CONTAINING APP https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW2
  • 17. API LIMITATIONS • app extensions cannot: • accessed a sharedApplication object. • use APIs explicitly marked unavailable • access camera or mic • perform long running tasks • receive data via AirDrop
  • 18. CREATING AN APP EXTENSION • Assuming the Xcode project for the containing app exists: • Step 1: decide what extension point type makes sense • Step 2: add a new target to the project, and select iOS / Application Extension. • Step 3: implement the extension.
  • 19. In containing app Xcode project goto File -> New ->Target