Skip to content

Commit

Permalink
podfile [nfc]: Set up Flipper Pods by calling a function exposed by RN.
Browse files Browse the repository at this point in the history
Instead of spelling out the exact same code ourselves.

Corresponds to the portion of facebook/react-native@619d5d60d that
was missing in its backport to RN v0.62
(facebook/react-native@b4d1fcfb2); we took all of that incomplete
backport in 9a144c5.

After aligning our Podfile code with the corresponding code in the
RN v0.63 script, in zulip#4322, this change can be done as an NFC commit
after the RN v0.63 upgrade commit.
  • Loading branch information
chrisbobbe authored and gnprice committed Jan 22, 2021
1 parent bcc1356 commit 6d6a3d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 46 deletions.
46 changes: 1 addition & 45 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,6 @@ require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'

# Add Flipper Pods
def add_flipper_pods!(versions = {}, configurations: ['Debug'])
versions['Flipper'] ||= '~> 0.54.0'
versions['Flipper-DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.2'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.1'

pod 'FlipperKit', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configurations => configurations

# List all transitive dependencies for FlipperKit pods
# to avoid them being linked in Release builds
pod 'Flipper', versions['Flipper'], :configurations => configurations
pod 'Flipper-DoubleConversion', versions['Flipper-DoubleConversion'], :configurations => configurations
pod 'Flipper-Folly', versions['Flipper-Folly'], :configurations => configurations
pod 'Flipper-Glog', versions['Flipper-Glog'], :configurations => configurations
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configurations => configurations
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configurations => configurations
pod 'FlipperKit/Core', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/CppBridge', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FBDefines', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configurations => configurations
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configurations => configurations
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
end

target 'ZulipMobile' do
# Pods from React Native
use_react_native!
Expand All @@ -66,7 +22,7 @@ target 'ZulipMobile' do
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
add_flipper_pods!
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,6 @@ SPEC CHECKSUMS:
Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 41176d3adc18f246bc5353c7e0ab01ff73feadfe
PODFILE CHECKSUM: 0eb2bf1b0f7972fc7183f5eac73708f76355c614

COCOAPODS: 1.9.3

0 comments on commit 6d6a3d8

Please sign in to comment.