forked from microsoft/react-native-test-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReactTestApp-DevSupport.podspec
More file actions
46 lines (39 loc) · 1.62 KB
/
ReactTestApp-DevSupport.podspec
File metadata and controls
46 lines (39 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'json'
# For some reason, functions defined here are not visible in the Podspec:
# undefined method `deployment_target' for Pod:Module.
# But procedures and lambdas work fine.
deployment_target = lambda do |target_platform|
xcodeproj = File.join(__dir__, target_platform, 'ReactTestApp.xcodeproj')
project = Xcodeproj::Project.open(xcodeproj)
setting = case target_platform
when 'ios'
'IPHONEOS_DEPLOYMENT_TARGET'
when 'macos'
'MACOSX_DEPLOYMENT_TARGET'
end
project.build_configurations[0].resolve_build_setting(setting)
end
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
version = package['version']
Pod::Spec.new do |s|
s.name = 'ReactTestApp-DevSupport'
s.version = version
s.author = { package['author']['name'] => package['author']['email'] }
s.license = package['license']
s.homepage = package['homepage']
s.source = { :git => package['repository']['url'], :tag => version }
s.summary = package['description']
s.ios.deployment_target = deployment_target.call('ios')
s.osx.deployment_target = deployment_target.call('macos')
s.dependency 'React-Core'
s.dependency 'React-jsi'
s.pod_target_xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
'DEFINES_MODULE' => 'YES',
}
s.source_files = 'common/AppRegistry.{cpp,h}',
'ios/ReactTestApp/AppRegistryModule.{h,mm}',
'ios/ReactTestApp/Public/*.h',
'ios/ReactTestApp/ReactTestApp-DevSupport.m'
s.public_header_files = 'ios/ReactTestApp/Public/*.h'
end