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  # TODO(eric): remove once updates integration is sorted out
32  s.xcconfig = {
33    'GCC_PREPROCESSOR_DEFINITIONS' => "EX_DEV_LAUNCHER_ENABLED=1 EX_DEV_LAUNCHER_VERSION=#{s.version}",
34    'OTHER_SWIFT_FLAGS' => '-DEX_DEV_LAUNCHER_ENABLED=1'
35  }
36
37  # Swift/Objective-C compatibility
38  s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" }
39
40  s.dependency "React-Core"
41  s.dependency "expo-dev-menu-interface"
42  s.dependency "EXManifests"
43  s.dependency "EXUpdatesInterface"
44  s.dependency "expo-dev-menu"
45  s.dependency "ExpoModulesCore"
46
47  s.subspec 'Unsafe' do |unsafe|
48    unsafe.source_files = 'ios/Unsafe/**/*.{h,m,mm,swift,cpp}'
49    unsafe.compiler_flags = '-x objective-c++ -std=c++1z -fno-objc-arc' # Disable Automatic Reference Counting
50  end
51
52  s.subspec 'Main' do |main|
53    main.dependency "expo-dev-launcher/Unsafe"
54  end
55
56  s.test_spec 'Tests' do |test_spec|
57    test_spec.source_files = 'ios/Tests/**/*.{h,m,swift}'
58    test_spec.dependency 'Quick'
59    test_spec.dependency 'Nimble'
60    test_spec.dependency "React-CoreModules"
61    test_spec.dependency "OHHTTPStubs"
62    # `hermes_enabled` should be enabled for test integrations
63    test_spec.dependency 'React-hermes'
64    test_spec.dependency 'hermes-engine'
65  end
66
67  s.default_subspec = 'Main'
68end
69