Jeff's Series

Transcript

Tap on time to skip ahead

00:10

00:10

I want to start with how to bootstrap a Typhoon powered application. Let’s take a look at the application again just as a quick review. It’s a UI navigation controller that has really just two views. This is the Champion view which lists all the champions that I’ve retrieved data for. When you tap on a champion, like Annie, You see the champion skins that are available. Both of these are UI collection views. That’s the application.

00:47

00:47

Let’s head on back to Xcode and I want to review- cover how I’ve set up the project. I’ve decided to use storyboards so the main interface here is the main storyboard. The storyboard file itself is contained in the view folder of the application module. I’ll go ahead and open that. As I mentioned, you can see here, it’s a very simple application. We have a UI Navigation Controller, the initial view controller is the Champion Collection View Controller, which displays a list of champions with some ambient magic going on in the background. Then when you tap a champion, it passes some key data over to the Champion Skin Collection View Controller. It will retrieve and display a list of champion skins. The Champion Collection View Controller has one task, that is display champions. The Champion Skin View Controller has one tasks, that is display skin images for the selected champion.

01:54

01:54

I’ve chosen to include Typhoon view Cocoapods. We can see here, I just have a reference to the version 3.16 of Typhoon in my pod file and running Pod Install will retrieve and install that into my project.

02:14

02:14

There’s a couple other things I want to show you. Let’s head over to my settings. Of course, the bundle identifier I’ve chosen is using reverse domain name syntax io.nimblenoggin.LoLBookOfChampions. I’m also using the, as I mentioned before, the storyboards and the main storyboard here.

02:42

02:42

How do we bootstrap a Typhoon powered application? In order to show you that, there’s a couple of ways actually. I’m going to show you the PLIST integration which is the way that I prefer. What you do is specify in your Info PLIST, I’m sure that you should be familiar with this file. This is a file that contains some basic information about your application. Let me call attention to this entry, TyphoonInitialAssemblies. It is a list of Typhoon assemblies, that I’ll talk about in the next video, that you can specify here and when the application starts, Typhoon will load and process these assemblies. By using PLIST integration, Typhoon can inject dependencies into and integrate with storyboards. I’ve already specified that I’m using a storyboard for this application. Any of the view controllers in the storyboard can be injected with dependencies via Typhoon.

03:56

03:56

These are just a list of all the assemblies that make up my application. I’ve broken them down by module so I have an ApplicationAssembly, a CoreComponentsAssembly and a DataDragonAssembly. Those are simply references to classes or files in each of my modules. Here’s the application assemble inside the app module. Inside the core module I have the core components assembly. Then, of course, inside of dataDragon, I have the dataDragon components assembly.

04:45

04:45

By referencing those assemblies in my PLIST, I don’t have to do anything else. I don’t have to reference Typhoon in any of my classes. I just declare the assemblies in the PLIST and Typhoon does the rest. I will note that there is another way to integrate and bootstrap your application with Typhoon. I’m not going to cover that. I prefer this way but you can read about that on the GitHub wiki.