From ddf748a99de4386f7865d3f6028541a098676b8b Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Thu, 7 Nov 2019 10:48:44 -0800 Subject: [PATCH] Add Swift extension as a separate pod Summary: Adds swift extension file as a separate subspec, as it is not required for the objc projects. Also this fixes the current issue where the flipper sample app fails to build on xcode 11, as it fails to link the Swift specific literals. Fixes this too https://github.com/facebook/yoga/issues/565 Reviewed By: SidharthGuglani Differential Revision: D18373993 fbshipit-source-id: 0c058886a837c7ceafcd0167f878b3e0f7763aa1 --- YogaKit.podspec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/YogaKit.podspec b/YogaKit.podspec index 54c6c2b022..86d1066639 100644 --- a/YogaKit.podspec +++ b/YogaKit.podspec @@ -5,7 +5,7 @@ podspec = Pod::Spec.new do |spec| spec.name = 'YogaKit' - spec.version = '1.14.0' + spec.version = '1.17.0' spec.license = { :type => 'MIT', :file => "LICENSE" } spec.homepage = 'https://facebook.github.io/yoga/' spec.documentation_url = 'https://facebook.github.io/yoga/docs/' @@ -22,11 +22,20 @@ podspec = Pod::Spec.new do |spec| spec.platform = :ios spec.ios.deployment_target = '8.0' spec.ios.frameworks = 'UIKit' + spec.default_subspec = "Core" spec.dependency 'Yoga', '~> 1.14' - spec.source_files = 'YogaKit/Source/*.{h,m,swift}' - spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h' - spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h' - spec.swift_version = '4.0' + spec.module_name = 'YogaKit' + + spec.subspec "Core" do |ss| + ss.source_files = 'YogaKit/Source/*.{h,m}' + ss.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h' + ss.private_header_files = 'YogaKit/Source/YGLayout+Private.h' + end + + spec.subspec 'SwiftExtension' do |ss| + ss.source_files = 'YogaKit/Source/*.{swift}' + end + end # See https://github.com/facebook/yoga/pull/366