Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
tvOS App Development
Search
toshi0383
April 16, 2016
Programming
540
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
tvOS App Development
toshi0383
April 16, 2016
More Decks by toshi0383
See All by toshi0383
CoreDataはじめました
toshi0383
0
190
Swiftコードバトル必勝法
toshi0383
1
380
Sheets API使ってみた
toshi0383
2
440
visionOSについてGlobeeが取り組んでいること
toshi0383
0
630
agile20150512-150512055145-lva1-app6892.pdf
toshi0383
0
270
たのしいAirPlay
toshi0383
1
820
Profiling using Signpost
toshi0383
2
1.1k
AVPlayer周りの設計tips
toshi0383
6
950
cmdshelf::from("Swift")
toshi0383
3
970
Other Decks in Programming
See All in Programming
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.2k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
370
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
3.7k
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
1.9k
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.5k
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
AI Augmentation Techniques with Liberty
ivargrimstad
1
420
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
370
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
150
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
120
オーケストレーション記述言語 Katari
yukikurage
0
250
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
220
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
48k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
BBQ
matthewcrist
90
10k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
460
We Are The Robots
honzajavorek
0
440
WENDY [Excerpt]
tessaabrams
14
40k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
3
1.2k
Visualization
eitanlees
153
17k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Darren the Foodie - Storyboard
khoart
PRO
4
4.1k
Transcript
TVOS APP DEVELOPMENT APRIL 16, 2016 SAT. 1 — ©
Toshihiro Suzuki 2016
TOSHIHIRO SUZUKI > ླ ढ़༟ > @toshi0383 > iOS/Mac/tvOS develper
> currently at NEXTSCAPE 2 — © Toshihiro Suzuki 2016
TOSHIHIRO SUZUKI > Develops Apps and contribute to OSS >
Drives go-kart > Drummer > Snowboarder > try! Swift attendee 3 — © Toshihiro Suzuki 2016
TVOS IS A NEW PLATFORM WE CAN USE THE NEWEST
APIS 4 — © Toshihiro Suzuki 2016
TO TRY OUT NEW THINGS 5 — © Toshihiro Suzuki
2016
IS FUN. 6 — © Toshihiro Suzuki 2016
APPLETV 7 — © Toshihiro Suzuki 2016
HAS VERY UNIQUE USER INTERFACE. IT'S OUR NEW TOY !
8 — © Toshihiro Suzuki 2016
ALSO THERE IS 9 — © Toshihiro Suzuki 2016
NO SCREEN ROTATIONS 10 — © Toshihiro Suzuki 2016
WHICH IS GREAT. 11 — © Toshihiro Suzuki 2016
TODAY I WILL SHARE > our daily development and codebase.
> tvOS specific topics > Readability tips 12 — © Toshihiro Suzuki 2016
PROJECT ! 13 — © Toshihiro Suzuki 2016
THE APP > is kind of like Netflix. > Already
available on iOS/Android, AndroidTV, TVs > We're middle of development. We're not the owner of the service. 14 — © Toshihiro Suzuki 2016
DAILY DEVELOPMENT 15 — © Toshihiro Suzuki 2016
LIBRARY 16 — © Toshihiro Suzuki 2016
CARTHAGE $ cat Cartfile github "rs/SDWebImage" "master" github "toshi0383/TVMLKitchen" github
"cbpowell/MarqueeLabel-Swift" github "duemunk/Async" github "ReactiveX/RxSwift" github "ikesyo/Himotoki" github "ishkawa/APIKit" ~> 1.3 github "realm/realm-cocoa" github "radex/SwiftyUserDefaults" "master" github "malcommac/SwiftDate github "AliSoftware/OHHTTPStubs" I checkin Carthage/Build/tvOS to repo. ! git history data gets larger " Build is fast 17 — © Toshihiro Suzuki 2016
OTHER LIBRARIES > inamiy/DebugLog > Fabric (Crashlytics) > DRM Manager
SDK (Static Library written in C) 18 — © Toshihiro Suzuki 2016
SWIFTLINT FOR CODE FORMATTING 19 — © Toshihiro Suzuki 2016
SWIFTGEN FOR CODE GENERATING 20 — © Toshihiro Suzuki 2016
TESTING ! 21 — © Toshihiro Suzuki 2016
PLAIN XCTEST > runs on Bitrise on every git-push >
mostly tests for models > couple of async test > No UITests any more (we've quit) 22 — © Toshihiro Suzuki 2016
OHHTTPSTUBS 23 — © Toshihiro Suzuki 2016
TEST FAILS ❌ 24 — © Toshihiro Suzuki 2016
You might get unwanted assertionFailure() caused by server API response.
25 — © Toshihiro Suzuki 2016
SOLUTION /// Calls assertionFailure unless isRunningTests() is true /// This
is useful in such case like when /// unstable API causes UITests failure. (which happens like always...) /// - parameter msg: func assertionError(msg: String = "") { if !isRunningTests() { assertionFailure(msg) } } 26 — © Toshihiro Suzuki 2016
ISRUNNINGTESTS() /// Detects if app is running xctest /// -
returns: true if running xctest func isRunningTests() -> Bool { let env = NSProcessInfo.processInfo().environment - if let path = env["XCInjectBundle"] { // Xcode7.2 - return NSString(string: path).pathExtension == "xctest" - } + if let _ = env["XCTestConfigurationFilePath"] { // Xcode7.3 + return true + } if let _ = env["UITest"] { return true } return false } 27 — © Toshihiro Suzuki 2016
"UITEST" ENV VARIABLE /// HogeUITests.swift func setup() { ... let
app = XCUIApplication() app.launchEnvironment["UITest"] = "" 28 — © Toshihiro Suzuki 2016
BETA DISTRIBUTING ! 29 — © Toshihiro Suzuki 2016
30 — © Toshihiro Suzuki 2016
TVOS IS NOT SUPPORTED. 31 — © Toshihiro Suzuki 2016
32 — © Toshihiro Suzuki 2016
MAKEFILE TEST_DESTINATION=-destination "platform=tvOS Simulator,name=Apple TV 1080p,OS=latest" TEST=xcodebuild $(XCODEFLAGS) -scheme $(SCHEME)
clean test $(TEST_DESTINATION) .PHONY: test beta release archive clean ipa-beta ipa ship test: set -o pipefail $(TEST) 33 — © Toshihiro Suzuki 2016
MAKEFILE archive: ./script/check-xcode-version.sh if [ $? -ne 0 ];then exit
1;fi ./script/prepare_for_release.sh if [ ! -d $(BUILD_DIR)/script ];then mkdir -p $(BUILD_DIR)/script;fi xcodebuild -project $(PROJECT).xcodeproj -scheme $(SCHEME) \ -destination "generic/platform=tvOS" \ -xcconfig ./config/App-tvOS.xcconfig \ -archivePath $(ARCHIVE_PATH) \ PROVISIONING_PROFILE=$(PROVISIONING_PROFILE) \ -verbose \ archive | xcpretty --color ipa: xcodebuild -exportArchive -archivePath $(ARCHIVE_PATH) -exportPath $(BUILD_DIR) \ -exportOptionsPlist $(EXPORT_OPTION_PLIST) \ PROVISIONING_PROFILE=$(PROVISIONING_PROFILE) \ -destination "generic/platform=tvOS" 34 — © Toshihiro Suzuki 2016
35 — © Toshihiro Suzuki 2016
TVOS IS NOT SUPPORTED. 36 — © Toshihiro Suzuki 2016
GITHUB RELEASE PAGE fastlane ios upload ipa:$(IPA_PATH) My boss will
download this app and hand it to testers and customers. 37 — © Toshihiro Suzuki 2016
HOW TO INSTALL A BETA APP TO DEVICE You always
need a Xcode 38 — © Toshihiro Suzuki 2016
NOTE TVOS APPS CANNOT DISTRIBUTE USING ENTERPRISE PROVISIONING PROFILES 39
— © Toshihiro Suzuki 2016
TVOS SPECIFIC TOPICS > Focus Engine > TopShelf > TVML
> UITabBar << > UITableView << > AVPlayerViewController << 40 — © Toshihiro Suzuki 2016
UITABBAR <UITabBarController: 0x7fb3d5230c70> is trying to set 7 view controllers
when only 5 view controllers are supported on this platform. Any additional view controllers will not be shown. 41 — © Toshihiro Suzuki 2016
UITABLEVIEW 42 — © Toshihiro Suzuki 2016
AVPLAYERVIEWCONTROLLER 43 — © Toshihiro Suzuki 2016
READABILITY TIPS ! 44 — © Toshihiro Suzuki 2016
TIPS #1 USE SWIFTLINT It's good for your health. 45
— © Toshihiro Suzuki 2016
TIPS #2 Use typealias for important types typealias JSON =
[String: AnyObject] typealias ProductId = String typealias GenreId = String struct Product: Decodable { let productId: ProductId? let productQualityType: ProductQuality? 46 — © Toshihiro Suzuki 2016
TIPS #3 WRITE COMMENT, WRITE TESTS You will forget everything
in next week. I guarantee. 47 — © Toshihiro Suzuki 2016
TIPS #4 IT'S OKAY TO CODE IN YOUR LANGUAGE. enum
RequestSortType: Int { case ৽ணॱ = 1, ̑̌Իॱ = 3, ਓؾॱ = 4 } switch sortType { case .৽ணॱ: break case .̑̌Իॱ: break case .ਓؾॱ: break } 48 — © Toshihiro Suzuki 2016
TIPS #5 USE RXSWIFT WHERE NEEDED. func update(force: Bool) ->
Observable<Void> { return Observable.create { observer in guard force || needsUpdate(self, interval: Constants.APIBatchUpdateInterval) else { observer.onCompleted() return AnonymousDisposable{} } let task = self.updateChannel().bindTo(self.updateTitleList) .subscribeCompleted { observer.onCompleted() self.lastSuccessfulUpdate = NSDate() } return AnonymousDisposable{task.dispose()} } } 49 — © Toshihiro Suzuki 2016
WRAP UP I TALKED ABOUT > our daily development and
codebase. > tvOS specific topics > Readability tips 50 — © Toshihiro Suzuki 2016
AGAIN, TVOS IS A NEW PLATFORM. 51 — © Toshihiro
Suzuki 2016
IT'S BEEN GREAT EXPERIENCE TO BE PART OF THIS ECOSYSTEM.
52 — © Toshihiro Suzuki 2016
FEEL FREE TO ASK ME ANY QUESTIONS ABOUT TVOS. 53
— © Toshihiro Suzuki 2016
BTW, IF YOU WANT A TVML AND NATIVE HYBRID TVOS
APP I'VE HEARD OF TVMLKITCHEN. 54 — © Toshihiro Suzuki 2016
THANK YOU ! 55 — © Toshihiro Suzuki 2016