WWDC24 SALE: Save 50% on all my Swift books and bundles! >>

DAY 68

Project 19, part two


Yesterday we did a lot of set up work, but now it’s time for the pay off: we’re going to send custom JavaScript code back to Safari and have it executed, giving our (hypothetical!) users the ability to manipulate web pages right on their phone.

I’m not going to pretend that Apple’s actions API is pleasant, and I’m certainly not going to argue that you need to like using JavaScript. As Jeremy Foster once said, “every developer loves and hates JavaScript a little bit” – it’s something we all need to be aware of, and perhaps even be able to write to some level, but it’s by no means required.

The point of this project isn’t to teach you JavaScript, but instead to show you what’s possible with iOS. The overwhelming majority of iPhone owners use Safari, and in just two days you’ll have finished building an app that adds functionality directly to it – what common problems can you solve?

Today you have three topics to work through, and you’ll learn about UITextView, NotificationCenter, and more.

Trivia: My first Swift app, written back when Swift was first launched in iOS 8.0, was a Safari action. They had just been introduced, and I wanted to solve a problem I had: I wanted to be able to use View Source in Safari.

Need help? Tweet me @twostraws!

 

Save 50% in my WWDC sale.

SAVE 50% To celebrate WWDC24, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

100 Days of Swift


The 100 Days of Swift is a free collection of videos, tutorials, tests, and more to help you learn Swift faster. Click here to learn more, or watch the video below.

Back to 100 Days of Swift

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.