From 1a36b637abb43fe5857ef82cb760f421a15e100b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Herculano?= Date: Tue, 12 Aug 2025 11:57:38 +0200 Subject: [PATCH 1/4] build pod statically --- ReactNativeCmp.podspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReactNativeCmp.podspec b/ReactNativeCmp.podspec index 475b84c..32e8907 100644 --- a/ReactNativeCmp.podspec +++ b/ReactNativeCmp.podspec @@ -12,6 +12,8 @@ Pod::Spec.new do |s| s.license = package["license"] s.authors = package["author"] + s.static_framework = true + s.platforms = { :ios => min_ios_version_supported } s.source = { :git => "https://github.com/SourcePointUSA/react-native-sourcepoint-cmp.git", :tag => "#{s.version}" } From ee47f3b6f133322c54e94d164ad04af11f78b0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Herculano?= Date: Tue, 12 Aug 2025 12:00:19 +0200 Subject: [PATCH 2/4] remove legacy .podspec file --- sourcepoint-react-native-cmp.podspec | 43 ---------------------------- 1 file changed, 43 deletions(-) delete mode 100644 sourcepoint-react-native-cmp.podspec diff --git a/sourcepoint-react-native-cmp.podspec b/sourcepoint-react-native-cmp.podspec deleted file mode 100644 index e116ebe..0000000 --- a/sourcepoint-react-native-cmp.podspec +++ /dev/null @@ -1,43 +0,0 @@ -require "json" - -package = JSON.parse(File.read(File.join(__dir__, "package.json"))) -folly_compiler_flags = "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32" - -Pod::Spec.new do |s| - s.name = "sourcepoint-react-native-cmp" - s.version = package["version"] - s.summary = package["description"] - s.homepage = package["homepage"] - s.license = package["license"] - s.authors = package["author"] - - s.platforms = { :ios => min_ios_version_supported } - s.source = { :git => "https://github.com/SourcePointUSA/react-native-sourcepoint-cmp.git", :tag => "#{s.version}" } - - s.source_files = "ios/**/*.{h,m,mm,swift}" - - s.dependency "ConsentViewController", "7.6.7" - - # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. - # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. - if respond_to?(:install_modules_dependencies, true) - install_modules_dependencies(s) - else - s.dependency "React-Core" - - # Don't install the dependencies when we run `pod install` in the old architecture. - if ENV["RCT_NEW_ARCH_ENABLED"] == "1" - s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" - s.pod_target_xcconfig = { - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"", - "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -fmodules -fcxx-modules", - "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", - } - s.dependency "React-Codegen" - s.dependency "RCT-Folly" - s.dependency "RCTRequired" - s.dependency "RCTTypeSafety" - s.dependency "ReactCommon/turbomodule/core" - end - end -end From c8a892f43a65cf78eafbbeafe4205bd02c1315d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Herculano?= Date: Tue, 12 Aug 2025 12:34:21 +0200 Subject: [PATCH 3/4] update Podfile.lock --- example/ios/Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 63803f6..2d3f27a 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1989,7 +1989,7 @@ SPEC CHECKSUMS: ReactAppDependencyProvider: 04d5eb15eb46be6720e17a4a7fa92940a776e584 ReactCodegen: c63eda03ba1d94353fb97b031fc84f75a0d125ba ReactCommon: 76d2dc87136d0a667678668b86f0fca0c16fdeb0 - ReactNativeCmp: 33c8b61e60031d937d4e8790b6b9ef18ef93786a + ReactNativeCmp: 8638f236ae3f8577336e6567afa06f834a891768 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 SPMobileCore: 220d109e404cb17169f7e26f2a34c6022b80079a Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf From e27f1e88259ddca638f6c55f7677bb74e3d8d972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Herculano?= Date: Tue, 12 Aug 2025 17:23:05 +0200 Subject: [PATCH 4/4] conditionally import -Swift.h file --- ios/ReactNativeCmp.h | 7 ++++++- ios/ReactNativeCmp.mm | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ios/ReactNativeCmp.h b/ios/ReactNativeCmp.h index bdccff3..6e592b7 100644 --- a/ios/ReactNativeCmp.h +++ b/ios/ReactNativeCmp.h @@ -1,6 +1,11 @@ #import #import -#import "ReactNativeCmp-Swift.h" + +#if __has_include() + #import +#else + #import "ReactNativeCmp-Swift.h" +#endif @interface ReactNativeCmp : NativeReactNativeCmpSpecBase diff --git a/ios/ReactNativeCmp.mm b/ios/ReactNativeCmp.mm index 0be03e3..76e7878 100644 --- a/ios/ReactNativeCmp.mm +++ b/ios/ReactNativeCmp.mm @@ -1,5 +1,10 @@ #import "ReactNativeCmp.h" -#import "ReactNativeCmp-Swift.h" + +#if __has_include() + #import +#else + #import "ReactNativeCmp-Swift.h" +#endif @implementation ReactNativeCmp { ReactNativeCmpImpl *sdk;