Transcript from the "Swift Overview" Lesson
>> Let's start talking about the language, Swift, okay? That's the icon, that's the logo, the little orange bird. So Swift was created by Apple a few years ago, it was actually a complete surprise. No one was actually waiting for that. At WWDC, the Apple annual event, they came with the idea that, we have a new language.
[00:00:26] Because at that time Objective C, by the way, Objective C was created in the 80s, okay? Was actually looking we're for most developers, so that's why they created Swift, okay? So just make a new step. But it's not like any other Apple product that they're used to, it's open-source.
[00:00:47] So it's actually an open source language. So Apple is actually the main promoter of the language but there is a consortium that is actually upgrading the language or evolving the language as other languages such as the ACMA script and many other things. And there are other big companies behind Swift not just Apple, for example IBM.
[00:01:10] IBM is also supporting Swift a lot and actually you can bright backhand Swift code in the IBM Cloud and also another cloud systems but because it's open source today you have a compiler for Linux. So that means that you can actually run Swift code on any server and that means you can do back in Swift as well.
[00:02:30] It's mult-platform as we mentioned before. Swift as a compiler for Apple platforms, that's Intel based and also the Apple platform like the new M-1 chips. But also the previous Apple platforms that you have perhaps on an iPad, those are not Intel based well actually the Swift compiler will compile code for those platforms.
[00:02:55] But also we have a compiler for Linux as I mentioned before. So it's multi-platform. It's easy to learn. So, in the next probably hour, you will get the full idea of Swift. We cannot go into covering 100% of Swift with just an introduction, but you will feel at home most of the time.
[00:03:19] So it's easy to learn in this, let's say in this decade. So it's less ceremonial, okay? That means that there are a lot of code that we write every day and Swift is trying all the time to make that code shorter, with less code, less bureaucracy, that kind of idea.
[00:03:46] Got some modern ideas implemented and we're going to see that later. So I'm not sure if this but a lot of languages, a lot of platforms are actually getting out of the official classic OOP, Object Oriented Programming. Like everything must be a class like in Java. So, we're getting out of that.
[00:04:08] So maybe we're going to use OOP when we feel, okay we need that, but also we have other options. And it includes no safety. And for some of you or most of you, this is kind of new, okay? So we will have some minutes talking about this. But actually, this is good news, because it's reducing the amount of bags that our code will have, okay?
[00:04:36] The famous new pointer exception, a new reference exception. I'm not saying it's not gonna happen here, but it's going to be reduced a lot, thanks to new safety. And it's multi-paradigm, okay? So if you wanna write an OOP, you can do that. If you wanna do linear programming, it's okay, you can do that.
[00:06:36] And then we have compiled languages, where we actually need to ship machine code. And if you're going to compile code for Intel-based chips, Intel-based CPUs, it works only on Intel, okay? Not on another platform. So actually this is where we are right now with Swift. Swift is a compiled language.
[00:07:01] We are going to compile code, okay? I know that if you are a full stack developer, if you are just doing web, that also sounds scary, it sounds like, I don't know C or something like that. But it's also complicated. There are some differences when we're doing these kinds of apps but it's not a big deal, okay?
[00:07:22] But Swift is actually a compiled language, okay? And what we're gonna be building are actually iPhone applications. So the result of our project is gonna be an IPA file. It's an iPhone application, actually even if it works on iPad, it's called an iPhone application because they created this file format when the iPhone appeared.
[00:07:48] So, the IPA file is just a ZIP package, so you can actually unzip it and see what's inside after you build it. So, it includes our compiled Swift code, meta data, we're going to see what meta data is, and assets. Images, icons, PDF, whatever we're shipping with the ABI can also be HTML if you want, you can actually ship a web app.
[00:08:34] So you cannot send the IPA file to another person through email and ask them to install that through USB cable or something like that, or directly from the mail application. It doesn't work like that, okay? On Android, you can, let's say decrease security and then you can install an IAPK that is not coming from the store, but that's not gonna happen so simply on iOS, okay?
[00:09:07] So you actually need to publish that app to the App Store. Also you have enterprise distribution. So if you're making apps for a corporation, for a company that has employees with iPhones or iPads, well actually you can ship an internal app that is not actually public so it's not in the App Store.
[00:09:26] And for us we can also install our app in our iPhone or iPad. If you have an iPhone or an iPad, you will be able to install your app from Xcode, okay? But only on your development computers or your developer devices, that's kind of the idea, okay? That means that if you're going to make a Swift application like the one that we're going to do today and you wanna share that application with others, you actually need to technically use the App Store.
[00:10:02] The App Store has something known as TestFlight inside, TestFlight lets you create some alpha testing and beta testing programs. So you can actually share your app with other users without actually making the app public for everyone, okay? But for that, you will need to pay for an Apple Developer Account and follow some rules.
[00:10:27] To test on your own iPhone, your own app, you don't need to pay anything