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
|
||||
|
||||
@@ -353,10 +353,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"$(OTHER_CFLAGS)",
|
||||
"-DFB_SONARKIT_ENABLED=1",
|
||||
);
|
||||
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
@@ -379,7 +376,6 @@
|
||||
"\"CFNetwork\"",
|
||||
"-framework",
|
||||
"\"Security\"",
|
||||
"-DFB_SONARKIT_ENABLED=1",
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/FlipperKit/FlipperKit.modulemap\" -Xcc -DFB_SONARKIT_ENABLED";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.flipper.SampleSwift;
|
||||
@@ -417,10 +413,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"$(OTHER_CFLAGS)",
|
||||
"-DFB_SONARKIT_ENABLED=1",
|
||||
);
|
||||
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
@@ -443,7 +436,6 @@
|
||||
"\"CFNetwork\"",
|
||||
"-framework",
|
||||
"\"Security\"",
|
||||
"-DFB_SONARKIT_ENABLED=1",
|
||||
);
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) -Xcc -fmodule-map-file=\"${PODS_ROOT}/Headers/Public/FlipperKit/FlipperKit.modulemap\" -Xcc -DFB_SONARKIT_ENABLED";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.flipper.SampleSwift;
|
||||
|
||||
Reference in New Issue
Block a user