Docs with an updated install instruction (#343)
Summary: This PR updates the installation instruction. It missed few crucial information and thus the projects installing flipper as a dependency were facing issues. It addresses the issue #341. It also brings the sample application at par with the documentation. Pull Request resolved: https://github.com/facebook/flipper/pull/343 Reviewed By: danielbuechele Differential Revision: D13507298 Pulled By: priteshrnandgaonkar fbshipit-source-id: 5a4b23d79930cb7eeb491e359b616d3558e260fb
This commit is contained in:
committed by
Facebook Github Bot
parent
470c770e97
commit
da37ab78bd
@@ -11,15 +11,26 @@ target 'SampleSwift' do
|
||||
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', :path => '../../FlipperKit.podspec'
|
||||
pod 'FlipperKit/FlipperKitExamplePlugin', :path => '../../FlipperKit.podspec'
|
||||
pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', :path => '../../FlipperKit.podspec'
|
||||
|
||||
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
|
||||
file_name = Dir.glob("*.xcodeproj")[0]
|
||||
app_project = Xcodeproj::Project.open(file_name)
|
||||
app_project.native_targets.each do |target|
|
||||
target.build_configurations.each do |config|
|
||||
if (config.build_settings['OTHER_SWIFT_FLAGS'])
|
||||
if !(config.build_settings['OTHER_SWIFT_FLAGS'].include? '-DFB_SONARKIT_ENABLED')
|
||||
puts 'Adding -DFB_SONARKIT_ENABLED ...'
|
||||
swift_flags = config.build_settings['OTHER_SWIFT_FLAGS']
|
||||
if swift_flags.split.last != '-Xcc'
|
||||
config.build_settings['OTHER_SWIFT_FLAGS'] << ' -Xcc'
|
||||
end
|
||||
config.build_settings['OTHER_SWIFT_FLAGS'] << ' -DFB_SONARKIT_ENABLED'
|
||||
end
|
||||
else
|
||||
puts 'OTHER_SWIFT_FLAGS does not exist thus assigning it to `$(inherited) -Xcc -DFB_SONARKIT_ENABLED`'
|
||||
config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -Xcc -DFB_SONARKIT_ENABLED'
|
||||
end
|
||||
app_project.save
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user