platform :ios, '9.0' require_relative '../scripts/autolink-ios' if ENV['USE_FRAMEWORKS'] == '1' puts "Installing pods with use_frameworks!" use_frameworks! end # Add Flipper Poods def flipper_pods() flipperkit_version = '0.23.4' pod 'FlipperKit', '~>' + flipperkit_version, :configuration => 'Debug' pod 'FlipperKit/FlipperKitLayoutPlugin', '~>' + flipperkit_version, :configuration => 'Debug' pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version, :configuration => 'Debug' pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version, :configuration => 'Debug' end # Post Install processing for Flipper def flipper_post_install(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| cflags = config.build_settings['OTHER_CFLAGS'] || '$(inherited) ' unless cflags.include? '-DFB_SONARKIT_ENABLED=1' puts 'Adding -DFB_SONARKIT_ENABLED=1 in OTHER_CFLAGS...' cflags << ' -DFB_SONARKIT_ENABLED=1' end config.build_settings['OTHER_CFLAGS'] = cflags end app_project.save end installer.pods_project.save end def pods() project 'RNTesterPods.xcodeproj' # Enable TurboModule use_react_native!(path: "..") pod 'ReactCommon/turbomodule/samples', :path => '../ReactCommon' # Additional Pods which aren't included in the default Podfile pod 'React-ART', :path => '../Libraries/ART' pod 'React-RCTPushNotification', :path => '../Libraries/PushNotificationIOS' # Additional Pods which are classed as unstable # # To use fabric: add `fabric_enabled` option to the use_react_native method above, like below # use_react_native!(path: "..", fabric_enabled: true) end target 'RNTester' do pods() if ENV['USE_FRAMEWORKS'] != '1' flipper_pods() end end target 'RNTesterUnitTests' do pods() pod 'React-RCTTest', :path => "RCTTest" end target 'RNTesterIntegrationTests' do pods() pod 'React-RCTTest', :path => "RCTTest" end post_install do |installer| if ENV['USE_FRAMEWORKS'] != '1' flipper_post_install(installer) end installer.pods_project.targets.each do |target| puts target.name end end