Skip to content

Commit

Permalink
Simplify podspec
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldonadel committed May 22, 2023
1 parent 00ae79a commit 46e854d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
2 changes: 1 addition & 1 deletion apps/fabric-tester/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ SPEC CHECKSUMS:
EXManifests: 37a0bb3514806cf432f6538fcc9825107fc23436
Expo: 0b569a9cefb602d6cb80633c990153ab921aa652
expo-dev-client: b9a1eefeb4c93677753c734ad72072db3404caf9
expo-dev-launcher: 4fbecc36d52d25be131e4a4ab89596ab1bb95b3c
expo-dev-launcher: e7f3023e9095825855c56ea3892cdf50ad284889
expo-dev-menu: 4b131e68ea69510870efa44659f1f9ddc7b9621b
expo-dev-menu-interface: f74523f940ba5306b0d2f37a488a77b44d57f572
ExpoAppleAuthentication: 7bdf1a2962ebfe9b00eb4183a17b78d736e57185
Expand Down
26 changes: 2 additions & 24 deletions packages/expo-dev-launcher/expo-dev-launcher.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ Pod::Spec.new do |s|
'GCC_PREPROCESSOR_DEFINITIONS' => "EX_DEV_LAUNCHER_VERSION=#{s.version}"
}

fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
fabric_flags = '-DRN_FABRIC_ENABLED -DRCT_NEW_ARCH_ENABLED'
folly_version = '2021.07.22.00'
folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
boost_compiler_flags = '-Wno-documentation'

other_c_flags = '$(inherited)'
dev_launcher_url = ENV['EX_DEV_LAUNCHER_URL'] || ""
if dev_launcher_url != ""
Expand All @@ -53,7 +46,7 @@ Pod::Spec.new do |s|
# Swift/Objective-C compatibility
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'OTHER_CFLAGS[config=Debug]' => other_c_flags + " " + folly_flags + " " + fabric_flags,
'OTHER_CFLAGS[config=Debug]' => other_c_flags,
'OTHER_SWIFT_FLAGS[config=Debug]' => other_swift_flags,
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
Expand All @@ -63,29 +56,14 @@ Pod::Spec.new do |s|
"HEADER_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-launcher/Swift Compatibility Header\"",
}

s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Public/React-hermes\" \"$(PODS_ROOT)/Headers/Public/hermes-engine\"",
"OTHER_CFLAGS" => other_c_flags + " " + folly_flags + " " + fabric_flags
}

s.dependency "React-Core"
s.dependency "expo-dev-menu-interface"
s.dependency "EXManifests"
s.dependency "EXUpdatesInterface"
s.dependency "expo-dev-menu"
s.dependency "ExpoModulesCore"

compiler_flags = folly_compiler_flags

if fabric_enabled
compiler_flags << ' ' << fabric_flags

s.dependency 'React-RCTFabric'
s.dependency 'RCT-Folly', folly_version
end

s.compiler_flags = compiler_flags
install_modules_dependencies(s)

s.subspec 'Unsafe' do |unsafe|
unsafe.source_files = 'ios/Unsafe/**/*.{h,m,mm,swift,cpp}'
Expand Down
4 changes: 2 additions & 2 deletions packages/expo-dev-launcher/ios/EXDevLauncherBridgeDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@

static NSString *const kRNConcurrentRoot = @"concurrentRoot";

#endif

@interface EXDevLauncherBridgeDelegate () <RCTTurboModuleManagerDelegate, RCTCxxBridgeDelegate> {
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
facebook::react::ContextContainer::Shared _contextContainer;
}
@end

#endif

@implementation EXDevLauncherBridgeDelegate

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
Expand Down

0 comments on commit 46e854d

Please sign in to comment.