Open MaheshKaemSolutions opened 10 months ago
Hi @MaheshKaemSolutions . Do you find any solution for this??
@miklosherald09 actually this library doesn't support simulators, but you can build this library on real device and it's working fine over there.
For people encounters this problem, it can be resolved by the following steps:
Podfile
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
Then, it should look like
target 'NewRN' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'NewRNTests' 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,
# :ccache_enabled => true
)
# Adding these lines below.
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
end
Don't forget to execute npx pod-install
in your root directory or pod install
in ios
directory.
arm64
to Any iOS Simulator SDK in Build Settings->Arthitectures->Excluded Architectures->Debug->Any iOS Simulator SDKThen, it looks like the following screenshot
Finally, clean
your xcode and run any simulator if you like. It should work as expected.
Current Behavior Getting this error In /Volumes/MaheshWork/RNDThermalPrinter/node_modules/react-native-thermal-receipt-printer/ios/PrinterSDK/libPrinterSDK.a(GCDAsyncSocket.o), building for iOS Simulator, but linking in object file built for iOS, file '/Volumes/MaheshWork/RNDThermalPrinter/node_modules/react-native-thermal-receipt-printer/ios/PrinterSDK/libPrinterSDK.a' for architecture arm64 even after removing flipper related lines from podfile and appDelegate.mm. Expected Behavior
How to reproduce