Skip to content

Commit

Permalink
Add Swift extension as a separate pod
Browse files Browse the repository at this point in the history
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 #565

Reviewed By: SidharthGuglani

Differential Revision: D18373993

fbshipit-source-id: 0c058886a837c7ceafcd0167f878b3e0f7763aa1
  • Loading branch information
priteshrnandgaonkar authored and facebook-github-bot committed Nov 7, 2019
1 parent 4d16ee4 commit ddf748a
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions YogaKit.podspec
Expand Up @@ -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/'
Expand All @@ -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
Expand Down

0 comments on commit ddf748a

Please sign in to comment.