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, '11.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_ENABLED=1 EX_DEV_LAUNCHER_VERSION=#{s.version}",
33    'OTHER_SWIFT_FLAGS' => '-DEX_DEV_LAUNCHER_ENABLED=1'
34  }
35
36  # Swift/Objective-C compatibility
37  s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" }
38
39  s.dependency "React-Core"
40  s.dependency "expo-dev-menu-interface"
41  s.dependency "EXManifests"
42  s.dependency "EXUpdatesInterface"
43
44  s.subspec 'Unsafe' do |unsafe|
45    unsafe.source_files = 'ios/Unsafe/**/*.{h,m,mm,swift,cpp}'
46    unsafe.compiler_flags = '-x objective-c++ -std=c++1z -fno-objc-arc' # Disable Automatic Reference Counting
47  end
48
49  s.subspec 'Main' do |main|
50    main.dependency "expo-dev-launcher/Unsafe"
51  end
52
53  s.test_spec 'Tests' do |test_spec|
54    test_spec.platform     = :ios, '12.0'
55    test_spec.source_files = 'ios/Tests/**/*.{h,m,swift}'
56    test_spec.dependency 'Quick'
57    test_spec.dependency 'Nimble'
58    test_spec.dependency "React-CoreModules"
59    test_spec.dependency "OHHTTPStubs"
60  end
61
62  s.default_subspec = 'Main'
63end
64