Summary: This diff fixes the warnings raised from FlipperKit. Also this diff updates the deployement target of FlipperKit to iOS 10. Even wilde assumes the min deployment OS version to be iOS 10. In layout plugin we use [UIAccessibiltyTraiTabBar](https://developer.apple.com/documentation/uikit/uiaccessibility/uiaccessibilitytraits/1648592-tabbar), which assumes iOS 10 and above. Partially fixes https://github.com/facebook/flipper/issues/803 Still there are some warnings which are coming from the dependencies outside of Flipper. Reviewed By: passy Differential Revision: D19941558 fbshipit-source-id: 31809fedb9aa297bc318b5af72e29e8444f0142f
66 lines
2.8 KiB
Ruby
66 lines
2.8 KiB
Ruby
project 'SampleSwift.xcodeproj'
|
|
source 'https://github.com/facebook/Sonar.git'
|
|
source 'https://github.com/CocoaPods/Specs'
|
|
|
|
target 'SampleSwift' do
|
|
platform :ios, '10.0'
|
|
pod 'Flipper', :path => '../../Flipper.podspec'
|
|
pod 'FlipperKit', :path => '../../FlipperKit.podspec'
|
|
pod 'FlipperKit/SKIOSNetworkPlugin', :path => '../../FlipperKit.podspec'
|
|
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', :path => '../../FlipperKit.podspec'
|
|
pod 'FlipperKit/FlipperKitExamplePlugin', :path => '../../FlipperKit.podspec'
|
|
pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', :path => '../../FlipperKit.podspec'
|
|
|
|
# If you use `use_frameworks!` in your Podfile,
|
|
# uncomment the below $static_framework array and also
|
|
# the pre_install section. This will cause Flipper and
|
|
# it's dependencies to be built as a static library and all other pods to
|
|
# be dynamic.
|
|
# $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
|
|
# 'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion',
|
|
# 'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
|
|
# 'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']
|
|
#
|
|
# pre_install do |installer|
|
|
# Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
|
|
# installer.pod_targets.each do |pod|
|
|
# if $static_framework.include?(pod.name)
|
|
# def pod.build_type;
|
|
# Pod::Target::BuildType.static_library
|
|
# end
|
|
# end
|
|
# end
|
|
# end
|
|
|
|
post_install do |installer|
|
|
installer.pods_project.targets.each do |target|
|
|
if target.name == 'YogaKit'
|
|
target.build_configurations.each do |config|
|
|
config.build_settings['SWIFT_VERSION'] = '4.1'
|
|
end
|
|
end
|
|
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'])
|
|
unless 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
|
|
installer.pods_project.save
|
|
end
|
|
end
|