Closed billnbell closed 8 months ago
OK I was able to fix it. 3 things need changing fr RN 0.72.3.
require 'json'
version = JSON.parse(File.read('package.json'))["version"]
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
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 = "RNVectorIcons"
s.version = version
s.summary = "Customizable Icons for React Native with support for NavBar/TabBar, image source and full styling."
s.homepage = "https://github.com/oblador/react-native-vector-icons"
s.license = "MIT"
s.author = { "Joel Arvidsson" => "joel@oblador.se" }
s.platforms = { :ios => "12.4", :tvos => "9.0" }
s.source = { :git => "https://github.com/oblador/react-native-vector-icons.git", :tag => "v#{s.version}" }
s.source_files = 'RNVectorIconsManager/**/*.{h,m,mm,swift}'
s.resources = "Fonts/*.ttf"
s.preserve_paths = "**/*.js"
s.pod_target_xcconfig = {
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
}
if fabric_enabled
s.dependency "React-utils"
s.subspec "xxxutils" do |ss|
ss.dependency "ReactCommon"
ss.dependency "React-utils"
ss.source_files = "react/utils/**/*.{cpp,h}"
ss.header_dir = "react/utils"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\"" }
end
end
install_modules_dependencies(s)
end
- return std::make_shared<facebook::react::RNVectorIconsSpecJSI>(params);
+ return std::make_shared<facebook::react::NativeRNVectorIconsSpecJSI>(params);
Changing RNVectorIconsManager/RNVectorIconsManager.m to RNVectorIconsManager/RNVectorIconsManager.mm fixed my build
@billnbell Similar to my question in #1538, should #1530 solve this?
I've tested with NO_FLIPPER=1 USE_FRAMEWORKS=static RCT_NEW_ARCH_ENABLED=1 pod install
and it seems to compile fine with the patch
Although it also seems to compile without in my testing
Yes!
OK I was able to fix it. 3 things need changing fr RN 0.72.3.
- Rename RNVectorIconsManager/RNVectorIconsManager.m to RNVectorIconsManager/RNVectorIconsManager.mm
- Fix RNVectorIcons.podspec (for lower version < 0.72 you will need to check for fabric before adding install_modules_dependencies(s))
require 'json' version = JSON.parse(File.read('package.json'))["version"] fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1' 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 = "RNVectorIcons" s.version = version s.summary = "Customizable Icons for React Native with support for NavBar/TabBar, image source and full styling." s.homepage = "https://github.com/oblador/react-native-vector-icons" s.license = "MIT" s.author = { "Joel Arvidsson" => "joel@oblador.se" } s.platforms = { :ios => "12.4", :tvos => "9.0" } s.source = { :git => "https://github.com/oblador/react-native-vector-icons.git", :tag => "v#{s.version}" } s.source_files = 'RNVectorIconsManager/**/*.{h,m,mm,swift}' s.resources = "Fonts/*.ttf" s.preserve_paths = "**/*.js" s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" } if fabric_enabled s.dependency "React-utils" s.subspec "xxxutils" do |ss| ss.dependency "ReactCommon" ss.dependency "React-utils" ss.source_files = "react/utils/**/*.{cpp,h}" ss.header_dir = "react/utils" ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\"" } end end install_modules_dependencies(s) end
- FIx name of turbo module
- return std::make_shared<facebook::react::RNVectorIconsSpecJSI>(params); + return std::make_shared<facebook::react::NativeRNVectorIconsSpecJSI>(params);
where did you get these files from? @billnbell
It's under node_modules/react-native-vector-icons/RNVectorIcons.podspec
This error is happening on 0.72.4, with RCT_NEW_ARCH_ENABLED=1
This error is happening on 0.72.4, with RCT_NEW_ARCH_ENABLED=1
Same with 0.72.5
Will this be addressed? Edit: Ah, downgrading to 9.2.0 worked for me 😀
Closing in favour of #1538
▸ Compiling RNVectorIconsManager.m