Skip to content

Commit f24aa4f

Browse files
committed
feat: add RNIterableAPI module with support for new architecture and update podspec
1 parent dbce20c commit f24aa4f

10 files changed

Lines changed: 2997 additions & 1081 deletions

File tree

Iterable-React-Native-SDK.podspec

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,48 @@
1+
# require "json"
2+
3+
# package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4+
5+
# Pod::Spec.new do |s|
6+
# s.name = "Iterable-React-Native-SDK"
7+
# s.version = package["version"]
8+
# s.summary = package["description"]
9+
# s.homepage = package["homepage"]
10+
# s.license = package["license"]
11+
# s.authors = package["author"]
12+
13+
# s.platforms = { :ios => min_ios_version_supported }
14+
# s.source = { :git => "https://github.com/Iterable/react-native-sdk.git", :tag => "#{s.version}" }
15+
16+
# s.source_files = "ios/**/*.{h,m,mm,swift}"
17+
18+
# s.dependency "Iterable-iOS-SDK", "6.5.4"
19+
# # React Native Core dependency
20+
# install_modules_dependencies(s)
21+
22+
# end
23+
124
require "json"
225

326
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
527

628
Pod::Spec.new do |s|
7-
s.name = "Iterable-React-Native-SDK"
8-
s.version = package["version"]
9-
s.summary = package["description"]
10-
s.homepage = package["homepage"]
11-
s.license = package["license"]
12-
s.authors = package["author"]
13-
29+
# Default fields for a valid podspec
30+
s.name = "Iterable-React-Native-SDK"
31+
s.version = package["version"]
32+
s.summary = package["description"]
33+
s.description = package["description"]
34+
s.homepage = package["homepage"]
35+
s.license = package["license"]
1436
s.platforms = { :ios => min_ios_version_supported }
37+
# s.platforms = { :ios => "11.0" }
38+
s.author = package["author"]
1539
s.source = { :git => "https://github.com/Iterable/react-native-sdk.git", :tag => "#{s.version}" }
1640

17-
s.source_files = "ios/**/*.{h,m,mm,swift}"
18-
19-
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
20-
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
21-
if respond_to?(:install_modules_dependencies, true)
22-
install_modules_dependencies(s)
23-
else
24-
s.dependency "React-Core"
25-
26-
# Don't install the dependencies when we run `pod install` in the old architecture.
27-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
28-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
29-
s.pod_target_xcconfig = {
30-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
31-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
32-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
33-
}
34-
s.dependency "React-Codegen"
35-
s.dependency "RCT-Folly"
36-
s.dependency "RCTRequired"
37-
s.dependency "RCTTypeSafety"
38-
s.dependency "ReactCommon/turbomodule/core"
39-
end
40-
end
41+
s.source_files = "ios/**/*.{h,m,mm,swift}"
42+
s.private_header_files = "ios/**/*.h"
4143

4244
s.dependency "Iterable-iOS-SDK", "6.5.4"
43-
44-
end
45+
46+
# React Native Core dependency
47+
install_modules_dependencies(s)
48+
end

0 commit comments

Comments
 (0)