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, '12.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 # Swift/Objective-C compatibility 36 s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" } 37 dev_launcher_url = ENV['EX_DEV_LAUNCHER_URL'] || "" 38 if dev_launcher_url != "" 39 escaped_dev_launcher_url = Shellwords.escape(dev_launcher_url).gsub('/','\\/') 40 s.pod_target_xcconfig = { 41 'DEFINES_MODULE' => 'YES', 42 'OTHER_CFLAGS[config=Debug]' => "$(inherited) -DEX_DEV_LAUNCHER_URL=\"\\\"" + escaped_dev_launcher_url + "\\\"\"" 43 } 44 end 45 46 s.user_target_xcconfig = { 47 "HEADER_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-launcher/Swift Compatibility Header\"", 48 } 49 50 s.dependency "React-Core" 51 s.dependency "expo-dev-menu-interface" 52 s.dependency "EXManifests" 53 s.dependency "EXUpdatesInterface" 54 s.dependency "expo-dev-menu" 55 s.dependency "ExpoModulesCore" 56 57 s.subspec 'Unsafe' do |unsafe| 58 unsafe.source_files = 'ios/Unsafe/**/*.{h,m,mm,swift,cpp}' 59 unsafe.compiler_flags = '-x objective-c++ -std=c++1z -fno-objc-arc' # Disable Automatic Reference Counting 60 end 61 62 s.subspec 'Main' do |main| 63 main.dependency "expo-dev-launcher/Unsafe" 64 end 65 66 s.test_spec 'Tests' do |test_spec| 67 test_spec.source_files = 'ios/Tests/**/*.{h,m,swift}' 68 test_spec.dependency 'Quick' 69 test_spec.dependency 'Nimble' 70 test_spec.dependency "React-CoreModules" 71 test_spec.dependency "OHHTTPStubs" 72 end 73 74 s.default_subspec = 'Main' 75 76end 77