5. ・64-bit A8 processor
・32GB or 64GB of storage
・2GB of RAM
・10/100Mbps Ethernet
・WiFi 802.11a/b/g/n/ac
・1080p resolution
・HDMI 1.4
Apple TV
4th generation
・A10X Fusion
・32GB or 64GB of storage
・3GB of RAM
・Gigabit Ethernet
・Wi-Fi with MIMO 802.11ac
・2160p resolution
・HDMI 2.0
4K
16. Limited Local Storage
Service Online/Local Persistent/Temporary limit
iCloud Key-Value Store
(KVS)
Online Persistent 1MB max
CloudKit Online Persistent -
UserDefaults Local Persistent 500KB max
Keychain Local Persistent -
CacheDirectory Local Temporary May be purged
TemporaryDirectory Local Temporary May be purged
17. Limited Local Storage
Service Online/Local Persistent/Temporary limit
iCloud Key-Value Store
(KVS)
Online Persistent 1MB max
CloudKit Online Persistent -
UserDefaults Local Persistent 500KB max
Keychain Local Persistent -
CacheDirectory Local Temporary May be purged
TemporaryDirectory Local Temporary May be purged
18. Limited Local Storage
Service Online/Local Persistent/Temporary limit
iCloud Key-Value Store
(KVS)
Online Persistent 1MB max
CloudKit Online Persistent -
UserDefaults Local Persistent 500KB max
Keychain Local Persistent -
CacheDirectory Local Temporary May be purged
TemporaryDirectory Local Temporary May be purged
19. Limited Local Storage
Service Online/Local Persistent/Temporary limit
iCloud Key-Value Store
(KVS)
Online Persistent 1MB max
CloudKit Online Persistent -
UserDefaults Local Persistent 500KB max
Keychain Local Persistent -
CacheDirectory Local Temporary May be purged
TemporaryDirectory Local Temporary May be purged
69. Focus
public var preferredFocusEnvironments: [UIFocusEnvironment] { get }
public func shouldUpdateFocus(in context: UIFocusUpdateContext) -> Bool
public func setNeedsFocusUpdate()
public func updateFocusIfNeeded()
public func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator:
UIFocusAnimationCoordinator)
@available(tvOS 11.0, *)
optional public func soundIdentifierForFocusUpdate(in context: UIFocusUpdateContext) ->
UIFocusSoundIdentifier?
UIFocusEnvironmentプロトコル
94. Focus
@available(tvOS 9.0, *)
open var adjustsImageWhenAncestorFocused: Bool
@available(tvOS 9.0, *)
open var focusedFrameGuide: UILayoutGuide { get }
@available(tvOS 11.0, *)
open var overlayContentView: UIView { get }
@available(tvOS 11.0, *)
open var masksFocusEffectToContents: Bool
UIImageView for Focus
106. Focus
Focus Update Notification
extension NSNotification.Name {
@available(tvOS 11.0, *)
public static let UIFocusDidUpdate: NSNotification.Name
@available(tvOS 11.0, *)
public static let UIFocusMovementDidFail: NSNotification.Name
}
@available(tvOS 11.0, *)
public let UIFocusUpdateContextKey: String
@available(tvOS 11.0, *)
public let UIFocusUpdateAnimationCoordinatorKey: String
110. Focus
@available(tvOS 9.0, *)
open class UIFocusGuide : UILayoutGuide {
open var isEnabled: Bool
@available(tvOS 10.0, *)
open var preferredFocusEnvironments: [UIFocusEnvironment]!
}
UIFocusGuide
119. Focus
focusGuide = UIFocusGuide()
view.addLayoutGuide(focusGuide)
// Anchor the top left of the focus guide.
focusGuide.topAnchor.constraint(equalTo: button.topAnchor).isActive = true
focusGuide.leftAnchor.constraint(equalTo: collectionView.leftAnchor).isActive = true
// Anchor the width and height of the focus guide.
focusGuide.heightAnchor.constraint(equalTo: button.heightAnchor).isActive = true
focusGuide.widthAnchor.constraint(equalTo: collectionView.widthAnchor).isActive = true
focusGuide.preferredFocusEnvironments = [button]
UIFocusGuide
121. Focus
// Anchor the top left of the focus guide.
focusGuide.topAnchor.constraint(equalTo: button.topAnchor).isActive = true
focusGuide.leftAnchor.constraint(equalTo: collectionView.leftAnchor).isActive = true
UIFocusGuide
122. Focus
// Anchor the width and height of the focus guide.
focusGuide.heightAnchor.constraint(equalTo: button.heightAnchor).isActive = true
focusGuide.widthAnchor.constraint(equalTo: collectionView.widthAnchor).isActive = true
UIFocusGuide
130. Focus
po UIFocusDebugger.simulateFocusUpdateRequest(from:
imageView)
Simulating a fake focus update request from <UIImageView 0x7ff3ce2106d0>...
(<tvos_sample_for_iosdc.MainCollectionViewCell 0x7ff3ce20fe60> is currently focused)
The following issues were found that would normally prevent this environment's request from being accepted by the focus
system (these will be ignored for the purposes of this test):
- ISSUE: This environment does not contain the currently focused item.
Starting preferred focus search:
|--> Searching <UIImageView 0x7ff3ce2106d0>...
No more preferences for this environment, and there are no focusable items in this environment to prefer by default.
This environment does not prefer a valid focusable item, nor any other environments.
Simulated Result: Successfully updated focus to nil.
UIFocusDebugger
131. Focus
po UIFocusDebugger.checkFocusability(for: label)
The following issues were found that would prevent this item from being focusable:
- ISSUE: This view has isUserInteractionEnabled set to NO. Views must allow user
interaction to be focusable.
UIFocusDebugger
大きく分けて2つあります
Traditional AppsとClient server appsの2つです
Traditional AppsはiOSと同様に開発するもので、
Client server AppsはTVMLやTVJSといったApple独自のWeb技術を使って開発する手法になります。
今回は通常のTraditional Appsの開発についての話になります。