I was playing around with Xcode 10.2 since the update and when I try to run my app on ANY simulator with iOS version less than 10, the simulator will not start and crash then show the error below:
dyld: Library not loaded: /usr/lib/libauto.dylib Referenced from: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation Reason: no suitable image found. Did find: /usr/lib/libauto.dylib: mach-o, but not built for iOS simulator
I tried to create another new project fresh without touching anything, set the deployment target to iOS 9 and run on iOS 9 simulator again, same error was shown.
UPDATE
It seems like this issue only occur when your code base contain swift. Created a new project with objective c code base did not crash the simulator. For swift yes.
SUMMARY
Anyone has any idea ?
FINAL UPDATE
Apple just release Xcode 10.2.1 and it is part of the known issue for simulator, please refer to the link below for the workaround/fix:
https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_1_release_notes
Appreciate @russbishop 's reply, answer accepted
Open Xcode, Goto Preferences, Select Component. Click on Simulators of your choice then it will start the process of download & installing the simulators.
If you wish to run your app on an iPhone SE (2nd generation), run npx react-native run-ios --simulator='iPhone SE (2nd generation)' . The device names correspond to the list of devices available in Xcode. You can check your available devices by running xcrun simctl list devices from the console.
This is a known bug affecting iOS 8.x and 9.x. You can work around it by creating /usr/lib/swift
directories in the relevant simulator runtime root.
Downloaded simulator runtimes are located in /Library/Developer/CoreSimulator/Profiles/Runtimes
.
For example, to fix the iOS 9.3 simulator:
sudo mkdir '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 9.3.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With