Yohann explores the pro and cons of reusing existing iOS code for view controllers and for data objects. He will then demonstrate how to reuse the existing code from the iOS application into the Apple TV target. He will also show how to reference the da layer. Learn how to reuse classes from your data layer and utilities classes.
- [Voiceover] In order to interact with the Apple TV app,…I need to add the code that controls it.…The code is already returned in the iOS app,…so I need to port the code from the iOS app…into the Apple TV app.…There are multiple ways to do that.…One way would be just to copy the code from the iOS app…into the Apple TV app and then modify it for Apple TV.…Alternatively, I can reference the iOS files…into the bundle for the Apple TV target.…
For the sake of learning, I will show you both ways.…First, let's take a look at the FirstViewController.h…content within the iOS app.…There is not much going on here.…So I don't need to copy any code…into the FirstViewController of the Apple TV.…But if I look at the FirstViewController.m file…from the iOS app, I see some logic here.…Now is a good time to try to copy and paste…these lines of code into the tvOS app.…
I will select the code within each action methods…and copy them to the clipboard.…I am right-clicking and pressing Copy.…Now I will open the FirstViewController.m…
- Setting up Apple TV for Xcode
- Developing for tvOS
- Adding a new target to the project
- Running targets in the Simulator
- Working with the tvOS UIKit
- Adding images and sounds to the app
- Building the user interfaces
- Adding and connecting modal views
- Connecting the tab screens to the code
- Adding a tvOS app with iTunes Connect
- Publishing tvOS apps
- Adding advertisements to tvOS apps
Skill Level Intermediate
1. Getting Started
2. tvOS UIKit
Work with the storyboard1m 2s
3. Porting an App
4. iTunes Connect
5. App Publishing
6. Extra Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.