The number of smartphone users is increasing every single day, and as more and more of them are looking for new and interesting ways to improve their lives through mobile applications, the need for a language that will deploy on all platforms has become a necessity. This is where Swift 2 steps in, a beautifully crafted and evolving language released by Apple and used across iOS, WatchOS, tvOS, and MacOS native applications. Swift brings additional functionality and stability to your applications, allowing you to create new and exciting ideas with ease.
This step-by-step guide will help you craft beautiful, well-structured, and stable applications and help you bring innovation to life. As soon as we begin, we'll take a look at what it takes to integrate third-party libraries into our project using CocoaPods, see what the pros and cons are, and get to know how we can set our criteria on suitable libraries.
Throughout the course, we will delve deep into topics such as animation on views and layers, powering strongly data driven and location-driven applications using CoreData and MapKit, integrating our application with WatchOS, and sharing code and data between each application. Finally, we will test our application using Unit Tests and UI Tests, then walk through the process of submitting it to the App Store.
This course truly covers a vast range of topics, providing a hands-on guide throughout each subject area, and ensuring you have the right tools and knowledge to create an advanced-level application. By the end of this course, you will be able to develop iOS applications using Swift 2 and work with some of the more advanced developer frameworks.
About The Author
Paul Napier is an iOS and Android developer working at one of the largest television networks in Australia. His development background covers over a decade working through a wide area of the development stack. Though his passion lies in all things mobile and in working to encourage great project structure, code cleanliness, and the development processes.
He holds a degree in Russian and Business Studies from the University of Leeds, and his background includes sales, iOS, tvOS and Android development, as well as business analysis and social network engineering.
Before we start on the course, we need to review the current code base.
Before we can begin integrating pods into our project, we need to install CocoaPods.
Now that we have installed CocoaPods, we need to determine the pods we want to install and review its suitability.
We have decided on a pod we want to include, so now we want to install it in our project.
The pod has been installed, so now it is time to use it.
We need to add an animation that will present a view and then fade out to reveal our main screen.
CALayers are an important component in the land of iOS, and we need to see how they fit into our world.
Animating layers is different from animating views, so we will discover how this is done.
We want to animate our logo, so we will create the letter D using a CAShapeLayer.
In order to take advantage of better data persistence and working with the preferred methodology, we should make use of Core Data.
In order to work with the data, we must first create Entities and Attributes, as well as an associated NSManagedObject.
Now that we have our Entities, we should know how to save our data in the database.
Having saved some data in our database, the next thing we want to do is retrieve it.
We need a way to uniquely identify data for updating and duplication checking.
Sometimes, we need to remove data from the database, so we will make use of Core Data’s inbuilt functionality to do this.
Changing the schema without migrating properly will cause your users to crash.
We want to be able to work with our user’s location to provide great location-based services.
In order to display our user’s information, we need to create a MapView.
In order to present the information in the MapView, we will need to generate annotations.
There are many delegate methods we would want to work with, but one of the most important is selecting the annotation.
Before we can start creating a Watch application that will be paired to our iOS application, we need to add a WatchOS target to our project.
The watch Interface builder has many similarities to iOS but many differences as well. So we want to create a table view to display our dreams.
In order to make use of Core Data in both targets, we need to use the App Groups entitlement.
We want to send messages across from iOS and Watch OS applications, and we can do this with WCSession.
As with the iOS app, we can navigate across multiple controllers and pass data between them.
A complication is a new way for users to get snapshots of data for your watch app on their device screen and get immediate access to your app.
The quality of our code is only as good as the quality of our tests, so let’s add some unit tests to validate our code base.
There is often repetitive code that we will want to implement before and after each test. Fortunately, XCTestCase provides a way to do this.
We will need a way to validate the results we receive on each test.
When we write our tests, we don’t always know whether we are writing breadth or depth in testing. Code coverage reports allow us to see how much of our code is being tested.
Unit tests are good, but we also want to validate that our UI is working as expected, so we need to introduce UI Tests.
In order to be able to upload our application, we must first sign it with a Distribution certificate and provisioning profiles.
Before we can upload our binary, we must create a new application in iTunesConnect.
Now that we have everything we need set up, we want to create an archive and upload it to iTunesConnect.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.