Closed karthikeyancontus closed 1 month ago
I just found the issue, could you please give the solution for this,
try to install the "react-native-screens": "^3.34.0" and the run as usual you will get an error Showing All Messages Ld /Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/RNScreens/RNScreens.framework/RNScreens normal (in target 'RNScreens' from project 'Pods') cd /Users/user/Desktop/mirrorfly/rn/empty_project/AwesomeProject/ios/Pods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -Xlinker -reproducible -target arm64-apple-ios11.0-simulator -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk -O0 -L/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -L/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/RNScreens -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/RNScreens -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/DoubleConversion -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/RCT-Folly -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/RCTTypeSafety -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-Codegen -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-Core -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-NativeModulesApple -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-RCTImage -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-RCTNetwork -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-cxxreact -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-debug -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-hermes -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-jsi -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-jsiexecutor -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-jsinspector -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-logger -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-perflogger -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/React-utils -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/ReactCommon -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/SocketRocket -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/Yoga -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/fmt -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/glog -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/libevent -F/Users/user/Desktop/mirrorfly/rn/empty_project/AwesomeProject/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal -F/Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/hermes-engine/Pre-built -filelist /Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNScreens.build/Objects-normal/arm64/RNScreens.LinkFileList -install_name @rpath/RNScreens.framework/RNScreens -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNScreens.build/Objects-normal/arm64/RNScreens_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -stdlib\=libc++ -fobjc-arc -fobjc-link-runtime -framework JavaScriptCore -framework RCTImage -framework React -framework folly -framework Foundation -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNScreens.build/Objects-normal/arm64/RNScreens_dependency_info.dat -o /Users/user/Library/Developer/Xcode/DerivedData/AwesomeProject-dqbxlciswarfvdbytrqesdvpnjfi/Build/Products/Debug-iphonesimulator/RNScreens/RNScreens.framework/RNScreens
Undefined symbols for architecture arm64:
"facebook::jsi::HostObject::~HostObject()", referenced from:
RNScreens::RNScreensTurboModule::RNScreensTurboModule(std::1::function<std::1::array<int, 2ul> (int)>, std::1::function<void (int, double)>, std::1::function<void (int, bool)>, std::1::function<void (int)>) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::~RNScreensTurboModule() in RNScreensTurboModule.o
"facebook::jsi::Value::Value(facebook::jsi::Value&&)", referenced from:
facebook::jsi::Value::operator=(facebook::jsi::Value&&) in RNScreensTurboModule.o
"facebook::jsi::Value::Value(facebook::jsi::Runtime&, facebook::jsi::Value const&)", referenced from:
facebook::jsi::detail::toValue(facebook::jsi::Runtime&, facebook::jsi::Value const&) in RNScreensTurboModule.o
"facebook::jsi::Value::~Value()", referenced from:
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
RNScreens::RNScreensTurboModule::startTransition(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const, unsigned long) in RNScreensTurboModule.o
...
"facebook::jsi::JSError::JSError(facebook::jsi::Runtime&, std::1::basic_string<char, std::__1::char_traits
Undefined symbol: facebook::jsi::HostObject::~HostObject()
Undefined symbol: facebook::jsi::Value::Value(facebook::jsi::Value&&)
Undefined symbol: facebook::jsi::Value::Value(facebook::jsi::Runtime&, facebook::jsi::Value const&)
Undefined symbol: facebook::jsi::Value::~Value()
Undefined symbol: facebook::jsi::JSError::JSError(facebook::jsi::Runtime&, std::1::basic_string<char, std::__1::char_traits
Undefined symbol: facebook::jsi::JSError::~JSError()
Undefined symbol: facebook::jsi::Value::asNumber() const
Undefined symbol: typeinfo for facebook::jsi::HostObject
Undefined symbol: typeinfo for facebook::jsi::JSError
Undefined symbol: vtable for facebook::jsi::HostObject
Linker command failed with exit code 1 (use -v to see invocation)
to avoid the above error, you have to add as use_frameworks! :linkage => :static in Pod file, if you add this you will get the topic heading error
i have try just now, my package.json is
{
"name": "Imprj",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.23.1",
"@react-native-masked-view/masked-view": "^0.3.1",
"@react-navigation/bottom-tabs": "^6.5.20",
"@react-navigation/native": "^6.1.17",
"@react-navigation/stack": "^6.3.29",
"add": "^2.0.6",
"axios": "^1.6.8",
"base64-arraybuffer": "^1.0.2",
"js-md5": "^0.8.3",
"moment": "^2.30.1",
"react": "18.2.0",
"react-native": "0.74.1",
"react-native-elements": "^3.4.3",
"react-native-exception-handler": "^2.10.10",
"react-native-fast-image": "^8.6.3",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.16.0",
"react-native-image-picker": "4.0.6",
"react-native-image-zoom-viewer": "^3.0.1",
"react-native-local-mongodb": "^4.0.0",
"react-native-permissions": "^4.1.5",
"react-native-qrcode-svg": "^6.3.1",
"react-native-reanimated": "^3.11.0",
"react-native-root-siblings": "^5.0.1",
"react-native-safe-area-context": "^4.9.0",
"react-native-screens": "^3.31.1",
"react-native-vector-icons": "^9.2.0",
"react-native-video": "^6.0.0",
"react-native-xmpp-z": "^1.1.8",
"socket.io-client": "^4.7.5"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.74.83",
"@react-native/eslint-config": "0.74.83",
"@react-native/metro-config": "0.74.83",
"@react-native/typescript-config": "0.74.83",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.2.0",
"typescript": "5.0.4"
},
"resolutions": {
"react-native-reanimated": "^3.11.0"
},
"engines": {
"node": ">=18"
}
}
and my podfile also added width
use_frameworks!
while build width xcode, i found some errors like
ld: Undefined symbols:
_OBJC_CLASS_$_RCTEventDispatcher, referenced from:
__OBJC_$_CATEGORY_RCTEventDispatcher_$_Reanimated in RCTEventDispatcher+Reanimated.o
hermes::vm::NopCrashManager::~NopCrashManager(), referenced from:
std::__1::default_delete<hermes::vm::NopCrashManager>::operator()[abi:v160006](hermes::vm::NopCrashManager*) const in ReanimatedRuntime.o
facebook::jsi::HostObject::getPropertyNames(facebook::jsi::Runtime&), referenced from:
vtable for reanimated::WorkletRuntimeCollector in REAModule.o
vtable for reanimated::ShareableJSRef in Shareables.o
facebook::jsi::HostObject::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&), referenced from:
vtable for reanimated::WorkletRuntimeCollector in REAModule.o
vtable for reanimated::ShareableJSRef in Shareables.o
facebook::jsi::HostObject::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&), referenced from:
vtable for reanimated::NativeReanimatedModule in NativeReanimatedModule.o
vtable for facebook::react::TurboModule in NativeReanimatedModule.o
vtable for reanimated::NativeReanimatedModuleSpec in NativeReanimatedModuleSpec.o
vtable for reanimated::WorkletRuntimeCollector in REAModule.o
vtable for reanimated::ShareableJSRef in Shareables.o
vtable for reanimated::WorkletRuntime in WorkletRuntime.o
facebook::jsi::HostObject::~HostObject(), referenced from:
facebook::react::TurboModule::~TurboModule() in NativeReanimatedModule.o
reanimated::WorkletRuntimeCollector::WorkletRuntimeCollector(facebook::jsi::Runtime&) in REAModule.o
reanimated::WorkletRuntimeCollector::~WorkletRuntimeCollector() in REAModule.o
facebook::jsi::DecoratedHostObject::~DecoratedHostObject() in ReanimatedHermesRuntime.o
reanimated::ShareableJSRef::~ShareableJSRef() in Shareables.o
reanimated::WorkletRuntime::WorkletRuntime(facebook::jsi::Runtime&, std::__1::shared_ptr<facebook::react::MessageQueueThread> const&, std::__1::shared_ptr<reanimated::JSScheduler> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in WorkletRuntime.o
reanimated::WorkletRuntime::~WorkletRuntime() in WorkletRuntime.o
then while i fixed the errors with added code in podfile like:
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('RNReanimated') | pod.name.eql?('react-native-video')
def pod.build_type
Pod::BuildType.static_library
end
end
end
end
after this width npx pod-install, i run the project in xcode, and then build success.
So I think the library 'react-native-screens' errors, can be solved like this. Or just change react-native-screens versions to 3.31.1 like me!
to avoid the above error, you have to add as use_frameworks! :linkage => :static in Pod file, if you add this you will get the topic heading error
You can try like this upside!
Still it's looks like Dynamic
target 'AwesomeProject' do config = use_native_modules! use_frameworks!
flags = get_default_flags()
use_react_native!( :path => config[:reactNativePath],
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# :flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'AwesomeProjectTests' do inherit! :complete
end
post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pod_targets.each do |pod|
if pod.name.eql?('RNScreens') | pod.name.eql?('react-native-screens')
def pod.build_type
Pod::BuildType.static_library
end
end
end
end end
Still it's looks like Dynamic
target 'AwesomeProject' do config = use_native_modules! use_frameworks!
Flags change depending on the env values.
flags = get_default_flags()
use_react_native!( :path => config[:reactNativePath], # Hermes is now enabled by default. Disable by setting this flag to false. :hermes_enabled => flags[:hermes_enabled], :fabric_enabled => flags[:fabric_enabled], # Enables Flipper. # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. # :flipper_configuration => flipper_config, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." )
target 'AwesomeProjectTests' do inherit! :complete # Pods for testing end
post_install do |installer| # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pod_targets.each do |pod| if pod.name.eql?('RNScreens') | pod.name.eql?('react-native-screens') def pod.build_type Pod::BuildType.static_library end end end
end end
Could you show how is your package.json ? So, I can try build with it.
{ "name": "AwesomeProject", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest", "ios:clean": "rm -rf ios/Pods/ ios/Podfile.lock ios/build && rm -rf ~/Library/Developer/Xcode/DerivedData", "file:clean": "rm -rf package-lock.json node_modules" }, "dependencies": { "react": "18.2.0", "react-native": "0.72.10", "react-native-multiplier": "file:react-native-multiplier-0.1.0.tgz", "react-native-screens": "^3.34.0", "realm": "^11.9.0" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/eslint-config": "^0.72.2", "@react-native/metro-config": "^0.72.11", "@tsconfig/react-native": "^3.0.0", "@types/react": "^18.0.24", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.2.1", "eslint": "^8.19.0", "jest": "^29.2.1", "metro-react-native-babel-preset": "0.76.8", "prettier": "^2.4.1", "react-native-xmpp-z": "^1.1.8", "react-test-renderer": "18.2.0", "typescript": "4.8.4" }, "engines": { "node": ">=16" } } try this...
{ "name": "AwesomeProject", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest", "ios:clean": "rm -rf ios/Pods/ ios/Podfile.lock ios/build && rm -rf ~/Library/Developer/Xcode/DerivedData", "file:clean": "rm -rf package-lock.json node_modules" }, "dependencies": { "react": "18.2.0", "react-native": "0.72.10", "react-native-multiplier": "file:react-native-multiplier-0.1.0.tgz", "react-native-screens": "^3.34.0", "realm": "^11.9.0" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/eslint-config": "^0.72.2", "@react-native/metro-config": "^0.72.11", "@tsconfig/react-native": "^3.0.0", "@types/react": "^18.0.24", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.2.1", "eslint": "^8.19.0", "jest": "^29.2.1", "metro-react-native-babel-preset": "0.76.8", "prettier": "^2.4.1", "react-native-xmpp-z": "^1.1.8", "react-test-renderer": "18.2.0", "typescript": "4.8.4" }, "engines": { "node": ">=16" } } try this...
And this is my test Podfile
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.disabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
use_frameworks!
target 'TestPrj' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
:hermes_enabled => false,##flags[:hermes_enabled],
:fabric_enabled => false, ##flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'TestPrjTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('RNScreens') || pod.name.eql?('RNReanimated')|| pod.name.eql?('RealmJS')
def pod.build_type
Pod::BuildType.static_library
end
end
end
end
end
package.json
{
"name": "TestPrj",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"react": "18.2.0",
"react-native": "0.72.10",
"react-native-screens": "3.31.1",
"realm": "^11.9.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.11",
"@tsconfig/react-native": "^3.0.0",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.76.8",
"prettier": "^2.4.1",
"react-test-renderer": "18.2.0",
"typescript": "4.8.4"
},
"engines": {
"node": ">=16"
}
}
with fixed code in Podfile
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('RNScreens') || pod.name.eql?('RNReanimated')|| pod.name.eql?('RealmJS')
def pod.build_type
Pod::BuildType.static_library
end
end
end
end
i build success. Also you can find other solutions at https://github.com/software-mansion/react-native-screens/issues/1963
Thanks this worked for me,
as well could you please let me know that is this warning
WARN Module RNXMPP requires main queue setup since it overrides constantsToExport
but doesn't implement requiresMainQueueSetup
. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
hi any update reg this warning, I hope this won't block any functions
Thanks this worked for me,
as well could you please let me know that is this warning
WARN Module RNXMPP requires main queue setup since it overrides
constantsToExport
but doesn't implementrequiresMainQueueSetup
. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
hi any update reg this warning, I hope this won't block any functions
Thanks this worked for me, as well could you please let me know that is this warning WARN Module RNXMPP requires main queue setup since it overrides
constantsToExport
but doesn't implementrequiresMainQueueSetup
. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
The code is updated now at 'RNXMPP.m'
+ (BOOL)requiresMainQueueSetup
{
return NO;
}
Hi, thanks for the update. I can see the code in your GitHub repository, but it hasn't been updated on NPM. Could you please update NPM with the latest release? Thanks in advance!
Hi, thanks for the update. I can see the code in your GitHub repository, but it hasn't been updated on NPM. Could you please update NPM with the latest release? Thanks in advance!
It's updated yet.
Thanks for the update and support @reylen
Build/Products/Debug-iphonesimulator/XMPPFramework/XMPPFramework.framework/XMPPRoom.mom" not found. while Build time I got this error even though I have
require 'json'
package = JSON.parse(File.read(File.join(dir, 'package.json')))
Pod::Spec.new do |s| s.name = 'RNXMPP' s.version = package['version'] s.summary = package['description'] s.description = package['description'] s.homepage = package['homepage'] s.license = package['license'] s.author = package['author'] s.source = { :git => 'https://github.com/reylen/react-native-xmpp-z.git', :tag => s.version }
s.requires_arc = true s.platform = :ios, '10.0'
s.dependency 'React-Core' s.dependency 'XMPPFramework' s.preserve_paths = 'package.json', 'index.js' s.source_files = 'ios/RNXMPP/XMPPFramework.h', 'ios/RNXMPP/RNXMPPService.m', 'ios/RNXMPP/RNXMPPService.h', 'ios/RNXMPP/RNXMPPConstants.h', 'ios/RNXMPP/RNXMPPConstants.m', 'ios/RNXMPP/RNXMPP.h', 'ios/RNXMPP/RNXMPP.m' end