From 0d339b67542b0e26026d8abda487cc18e983360b Mon Sep 17 00:00:00 2001 From: vvveiii Date: Thu, 13 Aug 2020 20:44:27 +0800 Subject: [PATCH] [YogaKit] support tvOS - add YogaKitTVSample target --- Yoga.podspec | 2 +- YogaKit.podspec | 4 +- YogaKit/YogaKitSample/Podfile | 20 +- YogaKit/YogaKitSample/Podfile.lock | 8 +- .../YogaKitSample.xcodeproj/project.pbxproj | 240 ++++++++++++++++-- .../YogaKitTVSample/AppDelegate.h | 17 ++ .../YogaKitTVSample/AppDelegate.m | 45 ++++ .../Content.imageset/Contents.json | 11 + .../Back.imagestacklayer/Contents.json | 6 + .../Contents.json | 17 ++ .../Content.imageset/Contents.json | 11 + .../Front.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 11 + .../Middle.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 16 ++ .../Back.imagestacklayer/Contents.json | 6 + .../App Icon.imagestack/Contents.json | 17 ++ .../Content.imageset/Contents.json | 16 ++ .../Front.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 16 ++ .../Middle.imagestacklayer/Contents.json | 6 + .../Contents.json | 32 +++ .../Contents.json | 24 ++ .../Top Shelf Image.imageset/Contents.json | 24 ++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 24 ++ .../Base.lproj/Main.storyboard | 28 ++ .../YogaKitSample/YogaKitTVSample/Info.plist | 34 +++ .../YogaKitTVSample/ViewController.h | 15 ++ .../YogaKitTVSample/ViewController.m | 64 +++++ .../YogaKitSample/YogaKitTVSample/dummy.swift | 1 + YogaKit/YogaKitSample/YogaKitTVSample/main.m | 19 ++ 32 files changed, 724 insertions(+), 34 deletions(-) create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.h create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.m create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/Contents.json create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Base.lproj/LaunchScreen.storyboard create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Base.lproj/Main.storyboard create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/Info.plist create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/ViewController.h create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/ViewController.m create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/dummy.swift create mode 100644 YogaKit/YogaKitSample/YogaKitTVSample/main.m diff --git a/Yoga.podspec b/Yoga.podspec index 76244f65..2feb55ec 100644 --- a/Yoga.podspec +++ b/Yoga.podspec @@ -18,7 +18,7 @@ Pod::Spec.new do |spec| :git => 'https://github.com/facebook/yoga.git', :tag => spec.version.to_s, } - spec.platforms = { :ios => "8.0", :osx => "10.7", :tvos => "10.0", :watchos => "2.0" } + spec.platforms = { :ios => "8.0", :osx => "10.7", :tvos => "9.0", :watchos => "2.0" } spec.module_name = 'yoga' spec.requires_arc = false spec.pod_target_xcconfig = { diff --git a/YogaKit.podspec b/YogaKit.podspec index 7ee2569b..43dd3c01 100644 --- a/YogaKit.podspec +++ b/YogaKit.podspec @@ -19,9 +19,7 @@ podspec = Pod::Spec.new do |spec| :tag => "1.18.0", } - spec.platform = :ios - spec.ios.deployment_target = '8.0' - spec.ios.frameworks = 'UIKit' + spec.platforms = { :ios => "8.0", :tvos => "9.0" } spec.module_name = 'YogaKit' spec.dependency 'Yoga', '~> 1.14.1' # Fixes the bug related the xcode 11 not able to find swift related frameworks. diff --git a/YogaKit/YogaKitSample/Podfile b/YogaKit/YogaKitSample/Podfile index c399a1d8..5da19a24 100644 --- a/YogaKit/YogaKitSample/Podfile +++ b/YogaKit/YogaKitSample/Podfile @@ -1,11 +1,21 @@ -platform :ios, '9.0' + use_frameworks! -targetsArray = ['YogaKitSample', 'YogaKitSampleTests'] -targetsArray.each do |t| - target t do +target 'YogaKitSample' do + platform :ios, '9.0' pod 'Yoga', :path => '../../Yoga.podspec' pod 'YogaKit', :path => '../../YogaKit.podspec' pod 'IGListKit', '~> 4.0.0' - end end + +target 'YogaKitSampleTests' do + platform :ios, '9.0' + pod 'Yoga', :path => '../../Yoga.podspec' + pod 'YogaKit', :path => '../../YogaKit.podspec' +end + +target 'YogaKitTVSample' do + platform :tvos, '9.0' + pod 'Yoga', :path => '../../Yoga.podspec' + pod 'YogaKit', :path => '../../YogaKit.podspec' +end \ No newline at end of file diff --git a/YogaKit/YogaKitSample/Podfile.lock b/YogaKit/YogaKitSample/Podfile.lock index fe638ba8..dd3cbc0f 100644 --- a/YogaKit/YogaKitSample/Podfile.lock +++ b/YogaKit/YogaKitSample/Podfile.lock @@ -25,9 +25,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: IGListDiffKit: 665d6cf43ce726e676013db9c7d6c4294259b6b2 IGListKit: fd5a5d21935298f5849fa49d426843cff97b77c7 - Yoga: 1b62f19e549f5e174fc935ba76a47a8d9b60211e - YogaKit: fa5270a9482b444b2f42e2ab92fdbd03854a97f3 + Yoga: d3d19e78d35f47f72da4bb51b1362311a3ab2a7c + YogaKit: 9876eab67794362a58e64dc9e7e24adadd374e75 -PODFILE CHECKSUM: 88aca7a173462716bce24678d37a225fcff1c193 +PODFILE CHECKSUM: 47eeddfbd971090a3aa5e26f13d982c79f3daf34 -COCOAPODS: 1.9.1 +COCOAPODS: 1.9.3 diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj index 9fd0cf31..383880d8 100644 --- a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj +++ b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj @@ -13,12 +13,21 @@ 151960FA24E5314C00F7BF06 /* YogaKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 151960F924E5314C00F7BF06 /* YogaKitTests.m */; }; 151960FC24E532B700F7BF06 /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 151960FB24E532B700F7BF06 /* dummy.swift */; }; 15A7CB5995C9DAB1C8803834 /* Pods_YogaKitSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C80A931E90C7F3088CB86822 /* Pods_YogaKitSample.framework */; }; + 15E1C33C24E568410086A4E6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E1C33B24E568410086A4E6 /* AppDelegate.m */; }; + 15E1C33F24E568410086A4E6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E1C33E24E568410086A4E6 /* ViewController.m */; }; + 15E1C34224E568410086A4E6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15E1C34024E568410086A4E6 /* Main.storyboard */; }; + 15E1C34424E568420086A4E6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 15E1C34324E568420086A4E6 /* Assets.xcassets */; }; + 15E1C34724E568420086A4E6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 15E1C34524E568420086A4E6 /* LaunchScreen.storyboard */; }; + 15E1C34A24E568420086A4E6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 15E1C34924E568420086A4E6 /* main.m */; }; + 15E1C34F24E56A8A0086A4E6 /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15E1C34E24E56A8A0086A4E6 /* dummy.swift */; }; + 15E1C35124E56AB60086A4E6 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15E1C35024E56AB60086A4E6 /* libc++.tbd */; }; 1D885DC3D17809A4C3E245F3 /* Pods_YogaKitSampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BB0C63590A97352D30E310E /* Pods_YogaKitSampleTests.framework */; }; 40BD9F461E477A09002790A9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F451E477A09002790A9 /* AppDelegate.swift */; }; 40BD9F4B1E47850C002790A9 /* BasicViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F4A1E47850C002790A9 /* BasicViewController.swift */; }; 40BD9F501E479079002790A9 /* SingleLabelCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F4F1E479079002790A9 /* SingleLabelCollectionCell.swift */; }; 40BD9F521E479173002790A9 /* LayoutInclusionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40BD9F511E479173002790A9 /* LayoutInclusionViewController.swift */; }; 638A94481E1F06D100A726AD /* ExamplesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 638A94471E1F06D100A726AD /* ExamplesViewController.swift */; }; + FF76EAD6A7089159C35EED45 /* Pods_YogaKitTVSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8925233409AB43504C102C31 /* Pods_YogaKitTVSample.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -63,14 +72,29 @@ 151960EF24E530E700F7BF06 /* YogaKitSampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YogaKitSampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 151960F924E5314C00F7BF06 /* YogaKitTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YogaKitTests.m; path = ../../Tests/YogaKitTests.m; sourceTree = ""; }; 151960FB24E532B700F7BF06 /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dummy.swift; sourceTree = ""; }; + 15E1C33824E568410086A4E6 /* YogaKitTVSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YogaKitTVSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 15E1C33A24E568410086A4E6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 15E1C33B24E568410086A4E6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 15E1C33D24E568410086A4E6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 15E1C33E24E568410086A4E6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 15E1C34124E568410086A4E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 15E1C34324E568420086A4E6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 15E1C34624E568420086A4E6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 15E1C34824E568420086A4E6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 15E1C34924E568420086A4E6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 15E1C34E24E56A8A0086A4E6 /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dummy.swift; sourceTree = ""; }; + 15E1C35024E56AB60086A4E6 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/lib/libc++.tbd"; sourceTree = DEVELOPER_DIR; }; 1D2FF4D5FCA6A8C54A4074A3 /* Pods-YogaKitSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample.debug.xcconfig"; sourceTree = ""; }; 40BD9F451E477A09002790A9 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40BD9F4A1E47850C002790A9 /* BasicViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BasicViewController.swift; path = ViewControllers/BasicViewController.swift; sourceTree = ""; }; 40BD9F4F1E479079002790A9 /* SingleLabelCollectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SingleLabelCollectionCell.swift; path = Views/SingleLabelCollectionCell.swift; sourceTree = ""; }; 40BD9F511E479173002790A9 /* LayoutInclusionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LayoutInclusionViewController.swift; path = ViewControllers/LayoutInclusionViewController.swift; sourceTree = ""; }; 4BB0C63590A97352D30E310E /* Pods_YogaKitSampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YogaKitSampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 51E1DF9045F526AA9E84841F /* Pods-YogaKitTVSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitTVSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitTVSample/Pods-YogaKitTVSample.release.xcconfig"; sourceTree = ""; }; + 5D4F0C780E18ECECE25B2319 /* Pods-YogaKitTVSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitTVSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitTVSample/Pods-YogaKitTVSample.debug.xcconfig"; sourceTree = ""; }; 638A94471E1F06D100A726AD /* ExamplesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExamplesViewController.swift; sourceTree = ""; }; 82F0896A88112E957EF37C7F /* Pods-YogaKitSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample.release.xcconfig"; sourceTree = ""; }; + 8925233409AB43504C102C31 /* Pods_YogaKitTVSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YogaKitTVSample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A26128CF4F9CAE93983FF74F /* Pods-YogaKitSampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSampleTests/Pods-YogaKitSampleTests.debug.xcconfig"; sourceTree = ""; }; C80A931E90C7F3088CB86822 /* Pods_YogaKitSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_YogaKitSample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FF607399A6E2DE06593D1FA8 /* Pods-YogaKitSampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YogaKitSampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-YogaKitSampleTests/Pods-YogaKitSampleTests.release.xcconfig"; sourceTree = ""; }; @@ -95,6 +119,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 15E1C33524E568410086A4E6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 15E1C35124E56AB60086A4E6 /* libc++.tbd in Frameworks */, + FF76EAD6A7089159C35EED45 /* Pods_YogaKitTVSample.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -103,6 +136,7 @@ children = ( 13687D451DF8748400E7C260 /* YogaKitSample */, 151960F024E530E700F7BF06 /* YogaKitSampleTests */, + 15E1C33924E568410086A4E6 /* YogaKitTVSample */, 13687D441DF8748400E7C260 /* Products */, 13687D831DF87D1E00E7C260 /* Frameworks */, E1C759E3C8E84821213ECE8D /* Pods */, @@ -114,6 +148,7 @@ children = ( 13687D431DF8748400E7C260 /* YogaKitSample.app */, 151960EF24E530E700F7BF06 /* YogaKitSampleTests.xctest */, + 15E1C33824E568410086A4E6 /* YogaKitTVSample.app */, ); name = Products; sourceTree = ""; @@ -134,10 +169,12 @@ 13687D831DF87D1E00E7C260 /* Frameworks */ = { isa = PBXGroup; children = ( + 15E1C35024E56AB60086A4E6 /* libc++.tbd */, 13687D861DF87D2400E7C260 /* Foundation.framework */, 13687D841DF87D1E00E7C260 /* UIKit.framework */, C80A931E90C7F3088CB86822 /* Pods_YogaKitSample.framework */, 4BB0C63590A97352D30E310E /* Pods_YogaKitSampleTests.framework */, + 8925233409AB43504C102C31 /* Pods_YogaKitTVSample.framework */, ); name = Frameworks; sourceTree = ""; @@ -151,6 +188,23 @@ path = YogaKitSampleTests; sourceTree = ""; }; + 15E1C33924E568410086A4E6 /* YogaKitTVSample */ = { + isa = PBXGroup; + children = ( + 15E1C33A24E568410086A4E6 /* AppDelegate.h */, + 15E1C33B24E568410086A4E6 /* AppDelegate.m */, + 15E1C33D24E568410086A4E6 /* ViewController.h */, + 15E1C33E24E568410086A4E6 /* ViewController.m */, + 15E1C34024E568410086A4E6 /* Main.storyboard */, + 15E1C34324E568420086A4E6 /* Assets.xcassets */, + 15E1C34524E568420086A4E6 /* LaunchScreen.storyboard */, + 15E1C34824E568420086A4E6 /* Info.plist */, + 15E1C34924E568420086A4E6 /* main.m */, + 15E1C34E24E56A8A0086A4E6 /* dummy.swift */, + ); + path = YogaKitTVSample; + sourceTree = ""; + }; 40BD9F481E4784B3002790A9 /* ViewControllers */ = { isa = PBXGroup; children = ( @@ -175,6 +229,8 @@ 82F0896A88112E957EF37C7F /* Pods-YogaKitSample.release.xcconfig */, A26128CF4F9CAE93983FF74F /* Pods-YogaKitSampleTests.debug.xcconfig */, FF607399A6E2DE06593D1FA8 /* Pods-YogaKitSampleTests.release.xcconfig */, + 5D4F0C780E18ECECE25B2319 /* Pods-YogaKitTVSample.debug.xcconfig */, + 51E1DF9045F526AA9E84841F /* Pods-YogaKitTVSample.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -211,7 +267,6 @@ 151960EB24E530E700F7BF06 /* Sources */, 151960EC24E530E700F7BF06 /* Frameworks */, 151960ED24E530E700F7BF06 /* Resources */, - 1883DD5DF55125032E2DEF71 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -223,6 +278,24 @@ productReference = 151960EF24E530E700F7BF06 /* YogaKitSampleTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + 15E1C33724E568410086A4E6 /* YogaKitTVSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 15E1C34D24E568420086A4E6 /* Build configuration list for PBXNativeTarget "YogaKitTVSample" */; + buildPhases = ( + EEAEE027484A739D2AFF1F33 /* [CP] Check Pods Manifest.lock */, + 15E1C33424E568410086A4E6 /* Sources */, + 15E1C33524E568410086A4E6 /* Frameworks */, + 15E1C33624E568410086A4E6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = YogaKitTVSample; + productName = YogaKitTVSample; + productReference = 15E1C33824E568410086A4E6 /* YogaKitTVSample.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -243,6 +316,11 @@ ProvisioningStyle = Automatic; TestTargetID = 13687D421DF8748300E7C260; }; + 15E1C33724E568410086A4E6 = { + CreatedOnToolsVersion = 11.6; + LastSwiftMigration = 1160; + ProvisioningStyle = Automatic; + }; }; }; buildConfigurationList = 13687D3E1DF8748300E7C260 /* Build configuration list for PBXProject "YogaKitSample" */; @@ -261,6 +339,7 @@ targets = ( 13687D421DF8748300E7C260 /* YogaKitSample */, 151960EE24E530E700F7BF06 /* YogaKitSampleTests */, + 15E1C33724E568410086A4E6 /* YogaKitTVSample */, ); }; /* End PBXProject section */ @@ -281,29 +360,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 15E1C33624E568410086A4E6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15E1C34724E568420086A4E6 /* LaunchScreen.storyboard in Resources */, + 15E1C34424E568420086A4E6 /* Assets.xcassets in Resources */, + 15E1C34224E568410086A4E6 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1883DD5DF55125032E2DEF71 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-YogaKitSampleTests/Pods-YogaKitSampleTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/IGListDiffKit/IGListDiffKit.framework", - "${BUILT_PRODUCTS_DIR}/IGListKit/IGListKit.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGListDiffKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGListKit.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-YogaKitSampleTests/Pods-YogaKitSampleTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 513B543F92B2E4F4D1EE1CE7 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -344,6 +413,28 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + EEAEE027484A739D2AFF1F33 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-YogaKitTVSample-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -388,6 +479,17 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 15E1C33424E568410086A4E6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15E1C33F24E568410086A4E6 /* ViewController.m in Sources */, + 15E1C34A24E568420086A4E6 /* main.m in Sources */, + 15E1C34F24E56A8A0086A4E6 /* dummy.swift in Sources */, + 15E1C33C24E568410086A4E6 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -398,6 +500,25 @@ }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + 15E1C34024E568410086A4E6 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 15E1C34124E568410086A4E6 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 15E1C34524E568420086A4E6 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 15E1C34624E568420086A4E6 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 13687D581DF8748400E7C260 /* Debug */ = { isa = XCBuildConfiguration; @@ -496,6 +617,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = YogaKitSample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -512,6 +634,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = YogaKitSample/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -584,6 +707,72 @@ }; name = Release; }; + 15E1C34B24E568420086A4E6 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5D4F0C780E18ECECE25B2319 /* Pods-YogaKitTVSample.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = YogaKitTVSample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitTVSample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Debug; + }; + 15E1C34C24E568420086A4E6 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 51E1DF9045F526AA9E84841F /* Pods-YogaKitTVSample.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = YogaKitTVSample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitTVSample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -614,6 +803,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 15E1C34D24E568420086A4E6 /* Build configuration list for PBXNativeTarget "YogaKitTVSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15E1C34B24E568420086A4E6 /* Debug */, + 15E1C34C24E568420086A4E6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 13687D3B1DF8748300E7C260 /* Project object */; diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.h b/YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.h new file mode 100644 index 00000000..b933a6ed --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// YogaKitTVSample +// +// Created by lvv on 2020/8/13. +// Copyright © 2020 facebook. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.m b/YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.m new file mode 100644 index 00000000..04938d79 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/AppDelegate.m @@ -0,0 +1,45 @@ +// +// AppDelegate.m +// YogaKitTVSample +// +// Created by lvv on 2020/8/13. +// Copyright © 2020 facebook. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +@end diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..2e003356 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 00000000..de59d885 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..2e003356 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..2e003356 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..795cce17 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 00000000..de59d885 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..795cce17 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..795cce17 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json new file mode 100644 index 00000000..f47ba43d --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -0,0 +1,32 @@ +{ + "assets" : [ + { + "filename" : "App Icon - App Store.imagestack", + "idiom" : "tv", + "role" : "primary-app-icon", + "size" : "1280x768" + }, + { + "filename" : "App Icon.imagestack", + "idiom" : "tv", + "role" : "primary-app-icon", + "size" : "400x240" + }, + { + "filename" : "Top Shelf Image Wide.imageset", + "idiom" : "tv", + "role" : "top-shelf-image-wide", + "size" : "2320x720" + }, + { + "filename" : "Top Shelf Image.imageset", + "idiom" : "tv", + "role" : "top-shelf-image", + "size" : "1920x720" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 00000000..b65f0cdd --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + }, + { + "idiom" : "tv-marketing", + "scale" : "1x" + }, + { + "idiom" : "tv-marketing", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 00000000..b65f0cdd --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + }, + { + "idiom" : "tv-marketing", + "scale" : "1x" + }, + { + "idiom" : "tv-marketing", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/Contents.json b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Base.lproj/LaunchScreen.storyboard b/YogaKit/YogaKitSample/YogaKitTVSample/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..660ba53d --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Base.lproj/Main.storyboard b/YogaKit/YogaKitSample/YogaKitTVSample/Base.lproj/Main.storyboard new file mode 100644 index 00000000..a5c40f19 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Base.lproj/Main.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/Info.plist b/YogaKit/YogaKitSample/YogaKitTVSample/Info.plist new file mode 100644 index 00000000..25869efc --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + arm64 + + UIUserInterfaceStyle + Automatic + + diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/ViewController.h b/YogaKit/YogaKitSample/YogaKitTVSample/ViewController.h new file mode 100644 index 00000000..beebe657 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// YogaKitTVSample +// +// Created by lvv on 2020/8/13. +// Copyright © 2020 facebook. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/ViewController.m b/YogaKit/YogaKitSample/YogaKitTVSample/ViewController.m new file mode 100644 index 00000000..949fb7dc --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/ViewController.m @@ -0,0 +1,64 @@ +// +// ViewController.m +// YogaKitTVSample +// +// Created by lvv on 2020/8/13. +// Copyright © 2020 facebook. All rights reserved. +// + +#import "ViewController.h" +@import YogaKit; + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + CGSize containerSize = self.view.bounds.size; + + UIView *root = self.view; + root.backgroundColor = UIColor.whiteColor; + [root configureLayoutWithBlock:^(YGLayout * _Nonnull layout) { + layout.isEnabled = YES; + layout.width = YGPointValue(containerSize.width); + layout.height = YGPointValue(containerSize.height); + layout.alignItems = YGAlignCenter; + layout.justifyContent = YGJustifyCenter; + }]; + + UIView *child1 = [[UIView alloc] init]; + child1.backgroundColor = UIColor.blueColor; + [child1 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) { + layout.isEnabled = YES; + layout.width = YGPointValue(100); + layout.height = YGPointValue(10); + layout.marginBottom = YGPointValue(25); + }]; + [root addSubview:child1]; + + UIView *child2 = [[UIView alloc] init]; + child2.backgroundColor = UIColor.greenColor; + [child2 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) { + layout.isEnabled = YES; + layout.alignSelf = YGAlignFlexEnd; + layout.width = YGPointValue(200); + layout.height = YGPointValue(200); + }]; + [root addSubview:child2]; + + UIView *child3 = [[UIView alloc] init]; + child3.backgroundColor = UIColor.yellowColor; + [child3 configureLayoutWithBlock:^(YGLayout * _Nonnull layout) { + layout.isEnabled = YES; + layout.alignSelf = YGAlignFlexStart; + layout.width = YGPointValue(100); + layout.height = YGPointValue(100); + }]; + [root addSubview:child3]; +} + +@end diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/dummy.swift b/YogaKit/YogaKitSample/YogaKitTVSample/dummy.swift new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/dummy.swift @@ -0,0 +1 @@ + diff --git a/YogaKit/YogaKitSample/YogaKitTVSample/main.m b/YogaKit/YogaKitSample/YogaKitTVSample/main.m new file mode 100644 index 00000000..fd154fab --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitTVSample/main.m @@ -0,0 +1,19 @@ +// +// main.m +// YogaKitTVSample +// +// Created by lvv on 2020/8/13. +// Copyright © 2020 facebook. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + NSString * appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +}