When using a machine with M1 chip, running the app on an iOS simulator and picking any file will close the app without any errors on the react native console. I was able to get an error when running the app using xcode

Describe what you expected to happen:
npx react-native info output:
System:
OS: macOS 11.2.3
CPU: (8) x64 Apple M1
Memory: 124.29 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.11.0 - /usr/local/bin/node
Yarn: Not Found
npm: 7.6.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK: Not Found
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: /undefined - /usr/bin/xcodebuild
Languages:
Java: Not Found
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.3 => 0.63.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
library version: 5.0.1
iOS: 14.4
Having the same issue with MacBook Pro M1 (Big Sur 11.2.1) and iOS Simulator (14.4). Exact same error as described above.
I have cross tested the same project on a Mac Pro with Catalina and Intel - works flawlessly.
Any idea what the reason could be?
Facing the same issue with MBP M1. Looking for the fix.
One solution was to delete line 113. But I don't know if it will cause a problem.
https://developer.apple.com/documentation/coreservices/1448939-uttypecreatepreferredidentifierf according the documentation uti can be null. idk what cause it but on silicon macs its return null and crash.
for now i changed like this: if (uti) {
CFRelease(uti);
}
everything is fine on emulator, also on physical device uti isn't null and CFRelease(uti) works.
https://developer.apple.com/documentation/coreservices/1448939-uttypecreatepreferredidentifierf according the documentation uti can be null. idk what cause it but on silicon macs its return null and crash.
for now i changed like this:
if (uti) { CFRelease(uti); }
everything is fine on emulator, also on physical device uti isn't null and CFRelease(uti) works.
Thanks! This is working perfectly.
https://developer.apple.com/documentation/coreservices/1448939-uttypecreatepreferredidentifierf according the documentation uti can be null. idk what cause it but on silicon macs its return null and crash.
for now i changed like this:if (uti) { CFRelease(uti); }
everything is fine on emulator, also on physical device uti isn't null and CFRelease(uti) works.Thanks! This is working perfectly.
i'm happy to help but i forgot to mention about type issue, type returns null and it may occurs some problems.
for example in android, if type has not valid value, then the request throw an error 'Network Error'.
in ios it didnt happen to me and i implement all features that expected, but it may useful to be careful 馃憤