Summary: Fixed the broken master for flipper iOS oss Reviewed By: jknoxville Differential Revision: D14686908 fbshipit-source-id: abdcacf279449f83c98d1635c65ff8759ee17926
42 lines
1.9 KiB
Ruby
42 lines
1.9 KiB
Ruby
project 'Sample.xcodeproj'
|
|
source 'https://github.com/facebook/Sonar.git'
|
|
source 'https://github.com/CocoaPods/Specs'
|
|
swift_version = "4.1"
|
|
|
|
target 'Sample' do
|
|
platform :ios, '9.0'
|
|
pod 'FlipperKit', :path => '../../FlipperKit.podspec'
|
|
pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', :path => '../../FlipperKit.podspec'
|
|
pod 'FlipperKit/SKIOSNetworkPlugin', :path => '../../FlipperKit.podspec'
|
|
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', :path => '../../FlipperKit.podspec'
|
|
pod 'FlipperKit/FlipperKitExamplePlugin', :path => '../../FlipperKit.podspec'
|
|
pod 'Flipper', :path => '../../Flipper.podspec'
|
|
# This post_install script adds swift version to yogakit'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|
|
|
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'])
|
|
if !(config.build_settings['OTHER_CFLAGS'].include? '-DFB_SONARKIT_ENABLED=1')
|
|
puts 'Adding -DFB_SONARKIT_ENABLED=1 in OTHER_CFLAGS...'
|
|
config.build_settings['OTHER_CFLAGS'] << '-DFB_SONARKIT_ENABLED=1'
|
|
end
|
|
else
|
|
puts 'OTHER_CFLAGS does not exist, assigining it to `$(inherited), -DFB_SONARKIT_ENABLED=1` '
|
|
config.build_settings['OTHER_CFLAGS'] = '$(inherited) -DFB_SONARKIT_ENABLED=1 '
|
|
end
|
|
app_project.save
|
|
end
|
|
end
|
|
end
|
|
end
|