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,swift,cpp}' 18 s.preserve_paths = 'ios/**/*.{h,m,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 s.xcconfig = { 32 'GCC_PREPROCESSOR_DEFINITIONS' => "EX_DEV_LAUNCHER_VERSION=#{s.version}" 33 } 34 35 other_c_flags = '$(inherited)' 36 dev_launcher_url = ENV['EX_DEV_LAUNCHER_URL'] || "" 37 if dev_launcher_url != "" 38 escaped_dev_launcher_url = Shellwords.escape(dev_launcher_url).gsub('/','\\/') 39 other_c_flags += " -DEX_DEV_LAUNCHER_URL=\"\\\"" + escaped_dev_launcher_url + "\\\"\"" 40 end 41 other_swift_flags = "$(inherited)" 42 if ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] == '1' 43 other_swift_flags += ' -DEX_DEV_CLIENT_NETWORK_INSPECTOR' 44 end 45 46 # Swift/Objective-C compatibility 47 s.pod_target_xcconfig = { 48 'DEFINES_MODULE' => 'YES', 49 'OTHER_CFLAGS[config=Debug]' => other_c_flags, 50 'OTHER_SWIFT_FLAGS[config=Debug]' => other_swift_flags, 51 } 52 53 s.user_target_xcconfig = { 54 "HEADER_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-launcher/Swift Compatibility Header\"", 55 } 56 57 s.dependency "React-Core" 58 s.dependency "expo-dev-menu-interface" 59 s.dependency "EXManifests" 60 s.dependency "EXUpdatesInterface" 61 s.dependency "expo-dev-menu" 62 s.dependency "ExpoModulesCore" 63 64 unless defined?(install_modules_dependencies) 65 # `install_modules_dependencies` is defined from react_native_pods.rb. 66 # when running with `pod ipc spec`, this method is not defined and we have to require manually. 67 require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods") 68 end 69 install_modules_dependencies(s) 70 71 s.subspec 'Unsafe' do |unsafe| 72 unsafe.source_files = 'ios/Unsafe/**/*.{h,m,mm,swift,cpp}' 73 unsafe.compiler_flags = '-x objective-c++ -std=c++1z -fno-objc-arc' # Disable Automatic Reference Counting 74 end 75 76 s.subspec 'Main' do |main| 77 main.dependency "expo-dev-launcher/Unsafe" 78 end 79 80 s.test_spec 'Tests' do |test_spec| 81 test_spec.source_files = 'ios/Tests/**/*.{h,m,swift}' 82 test_spec.dependency 'Quick' 83 test_spec.dependency 'Nimble' 84 test_spec.dependency "React-CoreModules" 85 test_spec.dependency "OHHTTPStubs" 86 # ExpoModulesCore requires React-hermes or React-jsc in tests, add ExpoModulesTestCore for the underlying dependencies 87 test_spec.dependency 'ExpoModulesTestCore' 88 end 89 90 s.default_subspec = 'Main' 91 92end 93