1require "json" 2 3package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 5Pod::Spec.new do |s| 6 s.name = 'expo-dev-launcher' 7 s.version = package['version'] 8 s.summary = package['description'] 9 s.description = package['description'] 10 s.license = package['license'] 11 s.author = package['author'] 12 s.homepage = package['homepage'] 13 s.platform = :ios, '13.0' 14 s.swift_version = '5.2' 15 s.source = { :git => 'https://github.com/github_account/expo-development-client.git', :tag => "#{s.version}" } 16 s.static_framework = true 17 s.source_files = 'ios/**/*.{h,m,mm,swift,cpp}' 18 s.preserve_paths = 'ios/**/*.{h,m,mm,swift}' 19 s.exclude_files = 'ios/Unsafe/**/*.{h,m,mm,swift,cpp}', 'ios/Tests/**/*.{h,m,swift}' 20 s.requires_arc = true 21 s.header_dir = 'EXDevLauncher' 22 23 s.resource_bundles = { 24 'EXDevLauncher' => [ 25 'ios/assets', 26 'ios/main.jsbundle', 27 'ios/Views/EXDevLauncherErrorView.storyboard' 28 ] 29 } 30 31 new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1' 32 33 other_c_flags = '$(inherited)' 34 dev_launcher_url = ENV['EX_DEV_LAUNCHER_URL'] || "" 35 if dev_launcher_url != "" 36 escaped_dev_launcher_url = Shellwords.escape(dev_launcher_url).gsub('/','\\/') 37 other_c_flags += " -DEX_DEV_LAUNCHER_URL=\"\\\"" + escaped_dev_launcher_url + "\\\"\"" 38 end 39 other_swift_flags = "$(inherited)" 40 if ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] == '1' 41 other_swift_flags += ' -DEX_DEV_CLIENT_NETWORK_INSPECTOR' 42 end 43 44 if new_arch_enabled 45 other_c_flags += ' -DRN_FABRIC_ENABLED -DRCT_NEW_ARCH_ENABLED' 46 end 47 48 s.xcconfig = { 49 'GCC_PREPROCESSOR_DEFINITIONS' => "EX_DEV_LAUNCHER_VERSION=#{s.version}", 50 'OTHER_CFLAGS' => other_c_flags, 51 } 52 53 # Swift/Objective-C compatibility 54 s.pod_target_xcconfig = { 55 'DEFINES_MODULE' => 'YES', 56 'OTHER_CFLAGS[config=Debug]' => other_c_flags, 57 'OTHER_SWIFT_FLAGS[config=Debug]' => other_swift_flags, 58 "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Public/RNReanimated\"", 59 'FRAMEWORK_SEARCH_PATHS' => '"${PODS_CONFIGURATION_BUILD_DIR}/RNReanimated"', 60 "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", 61 } 62 63 s.user_target_xcconfig = { 64 "HEADER_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-launcher/Swift Compatibility Header\"", 65 } 66 67 s.dependency "React-Core" 68 s.dependency 'React-RCTAppDelegate' 69 s.dependency "expo-dev-menu-interface" 70 s.dependency "EXManifests" 71 s.dependency "EXUpdatesInterface" 72 s.dependency "expo-dev-menu" 73 s.dependency "ExpoModulesCore" 74 75 unless defined?(install_modules_dependencies) 76 # `install_modules_dependencies` is defined from react_native_pods.rb. 77 # when running with `pod ipc spec`, this method is not defined and we have to require manually. 78 require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods") 79 end 80 install_modules_dependencies(s) 81 82 s.subspec 'Unsafe' do |unsafe| 83 unsafe.source_files = 'ios/Unsafe/**/*.{h,m,mm,swift,cpp}' 84 unsafe.compiler_flags = '-x objective-c++ -std=c++1z -fno-objc-arc' # Disable Automatic Reference Counting 85 end 86 87 s.subspec 'Main' do |main| 88 main.dependency "expo-dev-launcher/Unsafe" 89 end 90 91 s.test_spec 'Tests' do |test_spec| 92 test_spec.source_files = 'ios/Tests/**/*.{h,m,mm,swift}' 93 test_spec.dependency 'Quick' 94 test_spec.dependency 'Nimble' 95 test_spec.dependency "React-CoreModules" 96 test_spec.dependency "OHHTTPStubs" 97 # ExpoModulesCore requires React-hermes or React-jsc in tests, add ExpoModulesTestCore for the underlying dependencies 98 test_spec.dependency 'ExpoModulesTestCore' 99 end 100 101 s.default_subspec = 'Main' 102 103end 104