-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrefiner-react-native.podspec
More file actions
81 lines (70 loc) · 2.98 KB
/
refiner-react-native.podspec
File metadata and controls
81 lines (70 loc) · 2.98 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
require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
Pod::Spec.new do |s|
s.name = "refiner-react-native"
s.version = package["version"]
s.summary = package["description"]
s.homepage = "https://github.com/refiner-io/mobile-sdk-react-native"
s.license = "MIT"
s.author = { package["author"]["name"] => package["author"]["email"] }
s.platforms = { :ios => "15.1" }
s.source = { :git => "https://github.com/refiner-io/mobile-sdk-react-native.git", :tag => "#{s.version}" }
# Build as static library to support bridging headers
s.static_framework = true
# Source files configuration
# Defaults to New Architecture (aligned with React Native 0.82+)
# Set RCT_NEW_ARCH_ENABLED=0 to explicitly use Legacy Architecture
if ENV['RCT_NEW_ARCH_ENABLED'] == '0'
# Legacy Architecture (excludes New Architecture spec files)
s.source_files = "ios/**/*.{h,m,swift}", "ios/*.{h,m,swift}"
s.exclude_files = "ios/RefinerReactNativeSpec/**/*"
s.pod_target_xcconfig = {
"DEFINES_MODULE" => "YES",
"SWIFT_OBJC_INTERFACE_HEADER_NAME" => "RNRefiner-Swift.h",
"SWIFT_VERSION" => "5.0",
# "SWIFT_OBJC_BRIDGING_HEADER" => "$(PODS_ROOT)/Headers/Public/refiner-react-native/RNRefiner-Bridging-Header.h",
"SWIFT_INSTALL_OBJC_HEADER" => "YES"
}
else
# New Architecture (default)
s.source_files = "ios/**/*.{h,m,swift}", "ios/*.{h,m,swift}"
# Do not exclude RefinerReactNativeSpec for New Architecture
s.pod_target_xcconfig = {
"DEFINES_MODULE" => "YES",
"SWIFT_OBJC_INTERFACE_HEADER_NAME" => "RNRefiner-Swift.h",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
"CLANG_CXX_LIBRARY" => "libc++",
"SWIFT_VERSION" => "5.0",
# "SWIFT_OBJC_BRIDGING_HEADER" => "$(PODS_ROOT)/Headers/Public/refiner-react-native/RNRefiner-Bridging-Header.h",
"SWIFT_INSTALL_OBJC_HEADER" => "YES"
}
end
s.requires_arc = true
# Conditionally compile for New Architecture
# s.pod_target_xcconfig = {
# "DEFINES_MODULE" => "YES",
# "SWIFT_OBJC_INTERFACE_HEADER_NAME" => "RNRefiner-Swift.h",
# "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
# "CLANG_CXX_LIBRARY" => "libc++",
# "SWIFT_VERSION" => "5.0"
# }
# React Native dependency handling
if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
else
s.dependency "React-Core"
# The following line is only needed for the old architecture.
# In the new architecture, this has been replaced by `install_modules_dependencies`.
s.dependency "React-RCTEventEmitter"
# New Architecture dependencies (enabled by default unless explicitly disabled)
if ENV['RCT_NEW_ARCH_ENABLED'] != '0'
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
end
end
# RefinerSDK dependency
s.dependency "RefinerSDK", "~> 1.7.1"
end