Xcode 10.2.1 运行Swift版本APP在模拟器iOS

2019-06-17  本文已影响0人  Smalla

报错信息:

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

原因:苹果更新Xcode版本导致的Bug,如图Image-01所示:

Image-01

解决方案:

打开终端或iTerm,拷贝以下命令行,运行即可:

sudo mkdir '/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS X.X.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift'

(其中X.X代表当前模拟器iOS版本号,如:8.4)

参考链接:

https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_1_release_notes?language=objc

上一篇 下一篇

猜你喜欢

热点阅读