forked from wix/react-native-navigation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReactNativeNavigation.podspec
More file actions
94 lines (78 loc) · 2.94 KB
/
ReactNativeNavigation.podspec
File metadata and controls
94 lines (78 loc) · 2.94 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
require 'json'
require 'find'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
# Detect if this is a Swift project by looking for user AppDelegate.swift files
start_dir = File.expand_path('../..', __FILE__)
swift_delegate_path = nil
Find.find(start_dir) do |path|
if path =~ /AppDelegate\.swift$/
swift_delegate_path = path
break
end
end
# Debug output
if swift_project
puts "ReactNativeNavigation: Swift AppDelegate detected - enabling Swift-compatible configuration"
else
puts "ReactNativeNavigation: Objective-C AppDelegate detected - using standard configuration"
end
Pod::Spec.new do |s|
s.name = "ReactNativeNavigation"
s.version = package['version']
s.summary = package['description']
s.authors = "Wix.com"
s.homepage = package['homepage']
s.license = package['license']
s.platform = :ios, "11.0"
s.module_name = 'ReactNativeNavigation'
s.default_subspec = 'Core'
s.subspec 'Core' do |ss|
s.source = { :git => "https://github.com/wix/react-native-navigation.git", :tag => "#{s.version}" }
s.source_files = 'lib/ios/**/*.{h,m,mm,cpp}'
s.exclude_files = "lib/ios/ReactNativeNavigationTests/**/*.*", "lib/ios/OCMock/**/*.*"
# Only expose headers for Swift projects
if swift_project
s.public_header_files = [
'lib/ios/RNNAppDelegate.h'
]
end
end
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -DFOLLY_CFG_NO_COROUTINES=1'
# Base xcconfig settings
xcconfig_settings = {
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly" "$(PODS_ROOT)/Headers/Private/React-Core" "$(PODS_ROOT)/Headers/Private/Yoga"',
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
}
# Only add DEFINES_MODULE for Swift projects
if swift_project
xcconfig_settings["DEFINES_MODULE"] = "YES"
end
s.pod_target_xcconfig = xcconfig_settings
if fabric_enabled
install_modules_dependencies(s)
s.compiler_flags = folly_compiler_flags + ' ' + '-DRCT_NEW_ARCH_ENABLED' + ' ' + '-DUSE_HERMES=1'
s.requires_arc = true
s.dependency "React"
s.dependency "React-RCTFabric"
s.dependency "React-cxxreact"
s.dependency "React-Fabric"
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon"
s.dependency "React-runtimeexecutor"
s.dependency "React-rncore"
s.dependency "React-RuntimeCore"
else
s.compiler_flags = folly_compiler_flags
end
s.dependency 'React-Core'
s.dependency 'React-CoreModules'
s.dependency 'React-RCTImage'
s.dependency 'React-RCTText'
s.dependency 'HMSegmentedControl'
s.frameworks = 'UIKit'
end