From 1687299d601bb3fd818d61cf7596a85d9494fdb3 Mon Sep 17 00:00:00 2001 From: Maksymilian Galas Date: Mon, 15 Apr 2024 19:43:42 +0200 Subject: [PATCH] Fix errors when compiling with Swift file on iOS lower than 14 --- RNLiveMarkdown.podspec | 1 - .../RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h | 3 +++ .../MarkdownTextInputDecoratorViewComponentDescriptor.h | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RNLiveMarkdown.podspec b/RNLiveMarkdown.podspec index a2d52c80..781f3d49 100644 --- a/RNLiveMarkdown.podspec +++ b/RNLiveMarkdown.podspec @@ -30,6 +30,5 @@ Pod::Spec.new do |s| s.subspec "common" do |ss| ss.source_files = "cpp/**/*.{cpp,h}" ss.header_dir = "RNLiveMarkdown" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/cpp\"" } end end diff --git a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h index 7590b996..169990d7 100644 --- a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h +++ b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorState.h @@ -1,4 +1,5 @@ #pragma once +#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) #include @@ -32,3 +33,5 @@ class JSI_EXPORT MarkdownTextInputDecoratorState final { } // namespace react } // namespace facebook + +#endif diff --git a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorViewComponentDescriptor.h b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorViewComponentDescriptor.h index c145e45c..8eaa1b01 100644 --- a/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorViewComponentDescriptor.h +++ b/cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorViewComponentDescriptor.h @@ -1,4 +1,5 @@ #pragma once +#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) #include "MarkdownTextInputDecoratorShadowNode.h" #include @@ -15,3 +16,5 @@ class MarkdownTextInputDecoratorViewComponentDescriptor final } // namespace react } // namespace facebook + +#endif