Files
flipper/iOS/Tutorial/Podfile
Lorenzo Blasa 883993d2ec Bump SocketRocket 0.7.0
Summary:
About to release React Native 0.72.1. This version of React Native has to depend on SocketRocket 0.7.0, released yesterday.

Cocoapods is failing to install dependencies with the following error:
```
In snapshot (Podfile.lock):
    SocketRocket (= 0.7.0)

  In Podfile:
    FlipperKit/FlipperKitReactPlugin (= 0.182.0) was resolved to 0.182.0, which depends on
      FlipperKit/Core (= 0.182.0) was resolved to 0.182.0, which depends on
        SocketRocket (~> 0.6.0)

    React-Core/RCTWebSocket (from `../react-native/`) was resolved to 1000.0.0, which depends on
      SocketRocket (= 0.7.0)

    React-CoreModules (from `../react-native/React/CoreModules`) was resolved to 1000.0.0, which depends on
      SocketRocket
```

By bumping the SocketRocket dependencies and publishing a new version of FlipperKit, we would be able to release React Native.

Reviewed By: passy, cipolleschi

Differential Revision: D47125059

fbshipit-source-id: d0797880c502c14db9f0261c3e8abf2652e7bba2
2023-06-29 10:21:06 -07:00

62 lines
2.5 KiB
Ruby

project 'Tutorial.xcodeproj'
swift_version = "4.1"
flipperkit_version = '0.202.0'
use_frameworks!
target 'Tutorial' do
platform :ios, '11.0'
pod 'FlipperKit', '~>' + flipperkit_version
# Layout and network plugins are not yet supported for swift projects
pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', '~>' + flipperkit_version
pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version
# 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 static and all other pods to
# be dynamic.
$static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
'CocoaAsyncSocket', 'ComponentKit', 'Flipper-DoubleConversion',
'Flipper-Glog', 'Flipper-PeerTalk', 'Yoga', 'YogaKit',
'CocoaLibEvent', 'OpenSSL-Universal', 'Flipper-Boost-iOSX', 'Flipper-Fmt']
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::BuildType.static_library
end
end
end
end
# This post_install hook adds the -DFB_SONARKIT_ENABLED flag to OTHER_SWIFT_FLAGS, necessary to build swift target
post_install do |installer|
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