Take this

Software Development / Web Development

Advanced Swift 2 Application Development

Learn to develop powerful iOS and WatchOS applications by harnessing the full potential of Swift 2


About This Video

  • Master advanced iOS and WatchOS frameworks and technologies such as CoreData, CoreLocation, and CoreAnimation
  • Gain a deeper understanding of application development within Swift 2 and see the reasons behind each development decision
  • Delve into CoreData and NSManaged properties to build a data-driven application

In Detail

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.

Full details


  • Setting the Scene and Using CocoaPods for Dependency Management
    The Course Overview
    This video describes the overview of the entire course.
    Reviewing the Project Code
    Before we start on the course, we need to review the current code base. • Open the project files in Xcode to see the current code • Review the User Interface in Storyboards • Review the Swift code in the project files
    Installing CocoaPods
    Before we can begin integrating pods into our project, we need to install CocoaPods. • Open the terminal in order to access the command line • Install cocoaPods by typing:gem install –n /usr/local/bin cocoapods • Verify the version by typing:pod --version
    Reviewing Pods
    Now that we have installed CocoaPods, we need to determine the pods we want to install and review its suitability. • Find the pod in the terminal using pod search webimage • Go to www.cocoacontrols.com and search for SDWebImage to review the framework suitability • Review the comments and visit the source page for further instructions
    Creating a Podfile to Manage Dependencies
    We have decided on a pod we want to include, so now we want to install it in our project. • Open the terminal and go to the directory. Create a podfile using pod init • Open the podfile and include the pod using pod 'SDWebImage' • Go to the terminal and install the framework using pod install
    Using SDWebImage for Lazy Image Loading
    The pod has been installed, so now it is time to use it. • Pen DreamSeekr.xcworkspace and go to the DreamTableViewController class • Import the SDWebimage framework using this: import SDWebImage • Replace the code in the collectionView delegate method for implementation of images with third-party code
  • Using Animations to Bring Your App to Life
    Animating Our Views with UIView
    We need to add an animation that will present a view and then fade out to reveal our main screen. • Create a view programmatically • Add the view to the parent view • Use UIView class animations to animate the alpha property
    Working with CALayer
    CALayers are an important component in the land of iOS, and we need to see how they fit into our world. • Instantiate a subclass of UIView • Access the layer properties on the view • Build and run the application to see the results
    Animating with CABasicAnimation
    Animating layers is different from animating views, so we will discover how this is done. • Create a CABasicAniamtion with a keyPath • Add the animation to the layer • Build and run the application to see the results
    Creating Our Logo in CAShapeLayer
    We want to animate our logo, so we will create the letter D using a CAShapeLayer. • Create a CAShapeLayer and set the frame • Build the UIBezierPath and add it to the Shape Layer • Add the shape layer as a sublayer
  • Using Core Data to Persist Your Data
    Understanding Core Data Terminology
    In order to take advantage of better data persistence and working with the preferred methodology, we should make use of Core Data. • Add the Core Data Model to the project • Create a helper class to manage the Core Data functionality • Create the required CoreDataPersistent Store and Managed Object Contexts
    Creating Entities and Attributes in the Core Data Editor
    In order to work with the data, we must first create Entities and Attributes, as well as an associated NSManagedObject. • Create an entity within Core Data Editor and add attributes • Add properties as NSManagedProperties to an NSManagedObject subclass • Create a method to populate data in NSManagedObject
    Saving Data
    Now that we have our Entities, we should know how to save our data in the database. • Create a save method • Insert entities into the managed object context • Populate the entities and save the context
    Retrieving Data Using NSFetchedResultsController
    Having saved some data in our database, the next thing we want to do is retrieve it. • Create an NSFetchedResultsController variable • Perform a fetch using try fetchedResultsController.performFetch() • Populate tableview with the results
    Updating Data
    We need a way to uniquely identify data for updating and duplication checking. • Create a unique identifier attribute • Select an object using the unique identifier • Update the object with new data to replace the old data
    Deleting Data
    Sometimes, we need to remove data from the database, so we will make use of Core Data’s inbuilt functionality to do this. • Add UITableViewRowAction to a cell • Use delete object on the managedObjectContext • Update the tableview
    Updating the Database
    Changing the schema without migrating properly will cause your users to crash. • Create a new database version • Add NSMigratePersistentStoresAutomaticallyOptionNSInferMappingModelAutomaticallyOption as options to the persistent store coordinator • Run the application to see the data migrate
  • Implementing Core Location and MapKit
    Implementing Core Location to Receive Your users’ Location Updates
    We want to be able to work with our user’s location to provide great location-based services. • Create an instance of LocationManager • Set the usage type and start updating the location • Add a user message into Info.plist
    Creating a MapView and Centering on Their Position
    In order to display our user’s information, we need to create a MapView. • Import MapKit and create a MKMapView • Add a Map Viewas a view in loadView • Present or push to the view controller
    Creating Map Annotations to Display Your Data
    In order to present the information in the MapView, we will need to generate annotations. • Fetch the data you want to present from core data • Create an MKAnnotation with coordinates • Add annotations to MapView
    Working with MapView Delegate Methods
    There are many delegate methods we would want to work with, but one of the most important is selecting the annotation. • Set the mapview delegate • Implement the mapview delegate protocol on UIViewController • Add in functionality with the didSelectAnnotation method
  • Creating a WatchOS 2 Application
    Adding a Watch Target
    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. • Add a watch target to the project • Choose the WatchOS components • Review the new schemes created
    Working with the Interface Builder
    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. • Open the interface builder in Watch App • Drag tableview onto the interface • Create a table row controller to manage data
    Making Use of App Groups
    In order to make use of Core Data in both targets, we need to use the App Groups entitlement. • Add an App Group entitlement to the project • Share classes between targets • Set the Core Data path using the App Group URL
    Working with WCSession
    We want to send messages across from iOS and Watch OS applications, and we can do this with WCSession. • Create a WCSession default session and set the delegate at both ends • Send a message using the send method • Receive the message using the delegate callback
    Navigating Through the App
    As with the iOS app, we can navigate across multiple controllers and pass data between them. • Create a segue in the Interface Builder and name it • Send data across to the next controller using a context • Awaken the next controller with the context and check the value
    Implementing a Complication
    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. • Create a subclass of NSObject with the CLKComplicationDataSource protocol • Add in the relevant delegate methods • Ensure that the correct template types are added to the target
  • Testing Your Application
    Introducing Unit Tests
    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. • Go to the project • Click on add target and select Unit Tests • Enter the relevant information and click on enter
    Setting Up and Tearing Down Tests
    There is often repetitive code that we will want to implement before and after each test. Fortunately, XCTestCase provides a way to do this. • Go to XCTestCase and create a setup method • Populate this with the code you want to run before each test • Create a teardown method populated with code to run after the test
    Using XCAssert to Validate Code
    We will need a way to validate the results we receive on each test. • Create a test method • Run code • Validate the results using XCAssert
    Looking at Code Coverage Reports
    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. • Edit the scheme and go to tests • Check the Gather Coverage Data box • Run the tests and review the report
    Using Xcode to Record UI Tests
    Unit tests are good, but we also want to validate that our UI is working as expected, so we need to introduce UI Tests. • Add a UI Test target to the project • Click on a test and begin recording • Navigate around the app and see the tests being recorded
  • Preparing an App for Submission
    Creating a Distribution Certificate
    In order to be able to upload our application, we must first sign it with a Distribution certificate and provisioning profiles. • Go to Membercenter and click on the Certificates, Identifers and Provisioning profiles section • Add a certificate and follow instructions • Create provisioning profiles on App Ids and sign with the certificate
    Setting Up the App in iTunes Connect
    Before we can upload our binary, we must create a new application in iTunesConnect. • Go to itunesconnect.apple.com and sign in • Go to apps and create a new app • Add in the relevant information
    Archiving the App and Uploading It to iTunes Connect
    Now that we have everything we need set up, we want to create an archive and upload it to iTunesConnect. • Add code signing and provisioning profiles to build settings • Select Generic iOS Device and archive the application • Upload to iTunesConnect in Organizer


  • Swift 2.0
  • iOS

Similar Courses

More Courses by this Instructor