From 8a19a859f25ebe2b9f8d184dd67849cff4ded6b5 Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Mon, 1 Apr 2019 06:56:38 -0700 Subject: [PATCH] Update Componentkit, Yoga, YogaKit Summary: Fixed the broken master for flipper iOS oss Reviewed By: jknoxville Differential Revision: D14686908 fbshipit-source-id: abdcacf279449f83c98d1635c65ff8759ee17926 --- docs/getting-started.md | 40 +++++++++++-------- iOS/FlipperKit.podspec | 6 +-- .../SKComponentHostingViewDescriptor.mm | 7 ---- .../SKComponentLayoutWrapper.mm | 6 --- .../SKComponentRootViewDescriptor.mm | 6 +-- iOS/Sample/Podfile | 7 ++++ iOS/SampleSwift/Podfile | 7 ++++ 7 files changed, 42 insertions(+), 37 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 5700d60d1..a931141ac 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -114,16 +114,16 @@ target 'MyApp' do pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', '~>' + flipperkit_version pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version - # This post_install script adds swift version to yogakit's pod target. + # This post_install script adds min deployment iOS version to yoga's pod target. # It also adds -DFB_SONARKIT_ENABLED=1 flag to OTHER_CFLAGS, necessary to build expose Flipper classes in the header files post_install do |installer| - installer.pods_project.targets.each do |target| - if ['YogaKit'].include? target.name - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = swift_version - end - end - end + installer.pods_project.targets.each do |target| + if ('Yoga' == target.name) + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0' + end + end + end file_name = Dir.glob("*.xcodeproj")[0] app_project = Xcodeproj::Project.open(file_name) app_project.native_targets.each do |target| @@ -191,17 +191,17 @@ target 'MyApp' do pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version - # If you use `use_frameworks!` in your Podfile, - # uncomment the below $static_framework array and also - # the pre_install section. This will cause Flipper and - # it's dependencies to be static and all other pods to + # If you use `use_frameworks!` in your Podfile, + # uncomment the below $static_framework array and also + # the pre_install section. This will cause Flipper and + # it's dependencies to be static and all other pods to # be dynamic. # $static_framework = ['FlipperKit', 'Flipper', 'Folly', - # 'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion', - # 'glog', 'PeerTalk', 'RSocket', 'Yoga', 'YogaKit', + # 'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion', + # 'glog', 'PeerTalk', 'RSocket', 'Yoga', 'YogaKit', # 'CocoaLibEvent', 'OpenSSL-Static', 'boost-for-react-native'] - + # pre_install do |installer| # installer.pod_targets.each do |pod| # if $static_framework.include?(pod.name) @@ -210,10 +210,18 @@ target 'MyApp' do # end # end -# This post_install script adds -DFB_SONARKIT_ENABLED flag to OTHER_SWIFT_FLAGS, necessary to build swift target +# This post_install script adds min deployment iOS version to yoga's pod target. +# It also adds -DFB_SONARKIT_ENABLED flag to OTHER_SWIFT_FLAGS, necessary to build swift target post_install do |installer| file_name = Dir.glob("*.xcodeproj")[0] app_project = Xcodeproj::Project.open(file_name) + installer.pods_project.targets.each do |target| + if ('Yoga' == target.name) + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0' + end + end + end app_project.native_targets.each do |target| target.build_configurations.each do |config| if (config.build_settings['OTHER_SWIFT_FLAGS']) diff --git a/iOS/FlipperKit.podspec b/iOS/FlipperKit.podspec index e58547188..e97eb76ff 100644 --- a/iOS/FlipperKit.podspec +++ b/iOS/FlipperKit.podspec @@ -1,6 +1,6 @@ folly_compiler_flags = '-DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0' -yoga_version = '~> 1.9' -yogakit_version = '~>1.10' +yoga_version = '~> 1.12.0-pre.1' +yogakit_version = '~> 1.12.0-pre.1' flipperkit_version = '0.19.0' Pod::Spec.new do |spec| spec.name = 'FlipperKit' @@ -116,7 +116,7 @@ Pod::Spec.new do |spec| ss.header_dir = "FlipperKitLayoutComponentKitSupport" ss.dependency 'FlipperKit/Core' ss.dependency 'Yoga', yoga_version - ss.dependency 'ComponentKit' + ss.dependency 'ComponentKit', '~> 0.25' ss.dependency 'FlipperKit/FlipperKitLayoutPlugin' ss.compiler_flags = folly_compiler_flags ss.dependency 'FlipperKit/FlipperKitLayoutPlugin' diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm index 07dd923f1..1deeee099 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm @@ -8,15 +8,8 @@ #if FB_SONARKIT_ENABLED #import "SKComponentHostingViewDescriptor.h" - -// TODO T41966103 Remove conditional imports -#if FLIPPER_OSS -#import -#import -#else #import #import -#endif #import #import #import diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm index c5abbacb3..e92e5befb 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm @@ -11,14 +11,8 @@ #import #import -// TODO T41966103 Remove conditional imports -#if FLIPPER_OSS -#import -#import -#else #import #import -#endif #import static char const kLayoutWrapperKey = ' '; diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm index 443b325fe..f2f80d1c3 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm @@ -10,13 +10,9 @@ #import "SKComponentRootViewDescriptor.h" // TODO T41966103 Remove conditional imports -#if FLIPPER_OSS -#import -#import -#else + #import #import -#endif #import #import #import diff --git a/iOS/Sample/Podfile b/iOS/Sample/Podfile index 7016e5191..653f753c5 100644 --- a/iOS/Sample/Podfile +++ b/iOS/Sample/Podfile @@ -16,6 +16,13 @@ target 'Sample' do post_install do |installer| file_name = Dir.glob("*.xcodeproj")[0] app_project = Xcodeproj::Project.open(file_name) + installer.pods_project.targets.each do |target| + if ('Yoga' == target.name) + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0' + end + end + end app_project.native_targets.each do |target| target.build_configurations.each do |config| if (config.build_settings['OTHER_CFLAGS']) diff --git a/iOS/SampleSwift/Podfile b/iOS/SampleSwift/Podfile index 0d87853d6..f16a6eb19 100644 --- a/iOS/SampleSwift/Podfile +++ b/iOS/SampleSwift/Podfile @@ -14,6 +14,13 @@ target 'SampleSwift' do post_install do |installer| file_name = Dir.glob("*.xcodeproj")[0] app_project = Xcodeproj::Project.open(file_name) + installer.pods_project.targets.each do |target| + if ('Yoga' == target.name) + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0' + end + end + end app_project.native_targets.each do |target| target.build_configurations.each do |config| if (config.build_settings['OTHER_SWIFT_FLAGS'])