iOS App Development with Swift

Introduction

Maximiliano Firtman

Maximiliano Firtman

Independent Consultant
iOS App Development with Swift

Check out a free preview of the full iOS App Development with Swift course

The "Introduction" Lesson is part of the full, iOS App Development with Swift course featured in this preview video. Here's what you'd learn in this lesson:

Maximiliano Firtman introduces the course by providing some personal background with mobile development and discussing an overview of what material will be covered in this course. Pre-requisites, a frontend map demonstration, and a brief discussion of the UI frameworks available to use with Swift are also provided in this segment.

Preview
Close

Transcript from the "Introduction" Lesson

[00:00:00]
>> Good morning, welcome to Introduction to Swift and iOS app development. My name is Maximiliano, I can go by Max, straight on Twitter. We are going to spend today creating an app on iOS with Swift and a framework known as Swift UI. Actually, really really quickly, I am a mobile web developer.

[00:00:22]
So I have been doing web development since 1996 and mobile app development since 2001. That's of course before the iPhone. So the iPhone appeared in 2007. So was doing, when the iPhone appeared I was doing mobile app, so the time in other platforms. So my experience in iOS started actually the year where the App Store and the SDK appear.

[00:00:50]
So I have published around 40 apps. Most of these apps were actually for clients. I have a certain doing objective C, that was actually the way to create apps back in the original days. It is still there, but now we are going to focus on Swift. So I have a start doing Swift, 2017.

[00:01:10]
SwiftUI, the framework that we are going to, we working on today, a few years ago. Actually, I have this is the worship on IOS number 99. Okay, from my experience, so I've been doing this for a while as you can see. So let's jump directly into the worship.

[00:01:31]
So we are going to be covering the basics of Swift. So Swift as a language, then Xcode, that's the ID and SwiftUI that's the framework that we are going to be using today. We're going to see how to test and debug our app, the user interface, so how user interface works with UI.

[00:01:50]
So we're going to create some screens, we're going to create an actual app, I will show you the app in a minute. We are going to see how to navigate between screens using different techniques. And for that we're going to be focusing on iOS design pattern that may not be the same on other platforms such as Android.

[00:02:09]
So we're going to be focusing on iOS app development today. We're going to see how to work with data with Swift and swiftUI. So how data binding works. Then we're going to connect with Web Services. And we're going to also bridge to a web app. In case you're a web developer, and you wanna connect or you wanna merge somehow a native app with your web app, we're going to see how to do that.

[00:02:34]
So how do you bridge Swift with JavaScript? That's the goal. So prerequisites, so you need a Mac, and you need Xcode. Unfortunately, we don't have a way to create swift iOS applications on other operating systems. So actually you need to go and download Xcode. Xcode is a free application available in the app store on your Mac.

[00:02:58]
So we have a Mac computer, you just go to the App Store and search for Xcode, it's free. It takes a while, okay, to download and also to install the app, it takes actually a couple of minutes. Also we have a companion or website that's the URL firtmam.github.io/intro-swift.

[00:03:15]
There you will find some code that I will be coding later and also some links on assets that I will show you in a minute. Okay, I will show you this URL a couple of times anyway, and so no worries but if you wanna bookmark that URL, that's a good idea.

[00:03:34]
So in terms of prerequisites of your know how or knowledge that I'm expecting you to know, any programming language will work. So if you have experience with JavaScript, if you have experience with Java, or Kotlin, that will be enough. Okay, so you don't need to have experience on IOS, or in this specific language, Swift.

[00:03:53]
So if you've kept JavaScript basic knowledge, that will be good enough. So, this is worship for frontend masters. So, let's look a little bit about the frontend map today. So if you're doing frontend, most of the time, we're talking about the web, but actually today, we have also this idea of creating an ad client.

[00:04:16]
So sometimes we have a backend of course. And then we have a website or a PWA, a progressive web app, and we have native clients, okay? Today we're going to be focusing on native clients, okay? We are going to be creating native clients, okay? When you pick that kind of app development, today you have two ways, you can use official SDK or you can use cross platform SDKs.

[00:04:45]
Cross-platform SDK are for example, react native, flutter, native script, summary, and so on. Today we're going to be focusing on the official SDKs. From the official SDKs of course every platform has its own toolkit, language of course we will be focusing on Apple platforms. As you can see here I'm not saying iOS yet, because actually within the Apple world, we have a lot of operating systems with its own unique features and abilities.

[00:05:17]
And today we're going to be focused on iOS, okay? So iOS that's iPhone, and a little bit of iPod Touch. No one cares about that budget typically, but it's also there, it's also using iOS. However, what we're going to be building will also be compatible with iPad OS, because iOS and iPad OS are still kind of the same platform.

[00:05:41]
But we're not going to spend time because we don't have more time to actually see specific things about the iPad. Or how to take advantage of some or the largest screen or actually some iPad specific situations, okay? But it's going to be compatible with iPad that's how we mind that.

[00:06:03]
And inside iOS official, Native Client develop Comment, today, we can pick three families of languages. So objective C, Swift, or C, or C++. So actually from the official ID's, you can use any of these languages. As you probably know, at this point, because of the title of this course, we will be focusing on Swift.

[00:06:29]
But Have in mind that when you are creating a Swift application, you can actually mix and match. So you can actually have some parts of your app written in Swift, and some parts of your app written in C, C++, Objective C or even something known as Objective C++.

[00:06:46]
It doesn't matter what it is at this point. But you can actually mix these. And within Swift, also we need to pick a UI framework. So right now inside Apple official SDKs platform, we can use UI kit, let's say that's kind of the classic UI kit frame work.

[00:07:10]
Then we have a Sprite kit that's more for games, if you wanna create games or kind of 2D or 3D experiences, also there are more frameworks like AR kit for a mental reality and so on. And SwiftUI, SwiftUI is the new UI framework available from Apple. We are going to be focusing on SwiftUI, okay?

[00:07:33]
So this is the new way to create apps, of course you are UIKit is still there, but UIKit was created in 2008. Yeah, it was modernized some things over the years, but it's still some kind of fun old framework. Okay, so on SwiftUI is brand new. And if you're coming from web frameworks such as react, Angular Vue js, belty, and so on, you will see familiar ideas.

[00:08:05]
So it's actually similar to these web frameworks. Okay, it's using reactive programming, data binding and the same idea of creating components and things on the screen. Okay, so you will feel at home there. So this is what we're going to be covering today. Okay, so because we are covering already using SwiftUI and Swift, actually.

[00:08:31]
What we are going to be covering is also somehow compatible with all the Apple platform because SwiftUI it's actually multi platform. We're not going to be focusing on that today, but how many mind that every single we're going to see today. Will also be, let's say 90% compatible with watchOS for the Apple Watch, tvOS for the Apple TV, okay?

[00:08:57]
And macOS. So you can re-use the same, let's say for now components that we are going to create on all the platforms. But we are not going to cover those differences or how to compile the app for those specific platforms, okay? But the the experience that you will get from today it's also useful for the other Apple platforms, okay?

[00:09:20]
Do you have any questions at this point? Yeah.
>> What would be a reason that would draw someone to Objective C or C and C++ family over Swift and like why swift over those two things?
>> Okay, so I'm actually Objective C, I'm not sure if you have ever seen Objective C.

[00:09:41]
It's actually, is completely different to any other language that you're used to. Okay, unless you have experienced with a small talk, okay? It looks completely different. So, Swift, we're going to see that during the day but Swift is a modern language. Let's say that it looks like JavaScript if you want, okay from that sort of point of view.

[00:10:01]
So it looks modern, it's not giving up a lot of work, to actually make an app. Objective C, for example, just to give you a one quick sample. In Objective C, you cannot concatenate the strings with a plus sign. Okay, so, just an example. However, there are still a lot of apps in Objective C, mostly those apps were written like 10 years ago before Swift appear, and they're still there.

[00:10:31]
Okay, you still need to maintain those apps. And I mean, the company didn't make the decision to actually create the app again, but because you can actually create new parts of the app in Swift, and actually call Objective C code. You can continue using Objective C, but in the past five years or so, I think I've done only one or two Objective C workshops.

[00:10:55]
So there are still some companies using Objective C and requesting Objective C developers, but it's for only 5% or less than 5% of the audience in terms of iOS development, okay? So, in terms of C and C++, most of the time it's because you are using or you have code that you are sharing with Android or with Windows that is also written in C, or you have some libraries, within the company.

[00:11:24]
Now, you have some codex library, decodex, or decoders or some things around cryptographic libraries they already written in C, so you just use them, okay? But to be honest if you're doing an app what we typically know is an app with a list and some some screens, you're not gonna use C for that, it's actually more complicated.

[00:11:46]
Because the UI frameworks are actually not available from C. So it's actually not simpler by the way SwiftUI, the UI framework that we're going to use. It's only available from Swift. UIKit, the other one, let's say the classic one is available from our Objective C and Swift from both languages, okay?

[00:12:08]
You got a question?
>> In JavaScript we don't have a real OOP concept, will it be a factor in this?
>> Okay, so the question is around do we have real OOP object oriented programming in Swift? Actually, let's say that if you compare it with JavaScript, let's say it's closer to being an real OOP language, but it's also it's Swift nature, it's also different than Java, C#.

[00:12:40]
And other OOP languages, I know it similar if you ask the same on Python, is Python a OOP language, and, yeah, sometimes it's flexible. So, let's say that swift also is flexible. So you can do OOP. By the way, we are going to see that and today we are not going to do a lot of OOP, you're going to see a SwiftUI is not based on object oriented programming, so we will focus on a different paradigm.

[00:13:10]
But you can do OOP if you want, but have in mind that there is some flexibility in the language, that if you are an OOP, like a really fun, you will find that flexibility something annoying. Okay, like you can mess with objects that you don't own or things like that.

[00:13:34]
Okay, we will get there.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now