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.source_files   = 'ios/**/*.{h,m,swift,cpp}'
17  s.preserve_paths = 'ios/**/*.{h,m,swift}'
18  s.exclude_files  = 'ios/Unsafe/**/*.{h,m,mm,swift,cpp}'
19  s.requires_arc   = true
20  s.header_dir     = 'EXDevLauncher'
21
22  s.resource_bundles = {
23    'EXDevLauncher' => [
24      'ios/assets',
25      'ios/main.jsbundle',
26      'ios/Views/EXDevLauncherErrorView.storyboard'
27    ]
28  }
29
30  s.xcconfig = {
31    'GCC_PREPROCESSOR_DEFINITIONS' => "EX_DEV_LAUNCHER_ENABLED=1 EX_DEV_LAUNCHER_VERSION=#{s.version}",
32    'OTHER_SWIFT_FLAGS' => '-DEX_DEV_LAUNCHER_ENABLED=1'
33  }
34
35  # Swift/Objective-C compatibility
36  s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" }
37
38  s.dependency "React"
39  s.dependency "expo-dev-menu-interface"
40  s.dependency "EXUpdatesInterface"
41
42  s.subspec 'Unsafe' do |unsafe|
43    unsafe.source_files = 'ios/Unsafe/**/*.{h,m,mm,swift,cpp}'
44    unsafe.compiler_flags = '-x objective-c++ -std=c++1z -fno-objc-arc' # Disable Automatic Reference Counting
45  end
46
47  s.subspec 'Main' do |main|
48    main.dependency "expo-dev-launcher/Unsafe"
49  end
50
51  s.default_subspec = 'Main'
52end
53