作者:zhaojiapin_313 | 来源:互联网 | 2022-10-21 20:20
我试图运行一个现有的应用程序,以查看它与最新的Xcode beta配合使用的情况,并尝试在现有项目中使用SwiftUI。在模拟器上运行项目时,出现以下运行时崩溃:
dyld: Symbol not found: __ZTISt11logic_error
Referenced from: /Users/lucas/Library/Developer/CoreSimulator/Devices/224333CF-0388-4F57-9633-6CAB37B33510/data/Containers/Bundle/Application//.app/
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
in /Users//Library/Developer/CoreSimulator/Devices/224333CF-0388-4F57-9633-6CAB37B33510/data/Containers/Bundle/Application//.app/
将所有内容都设置为iOS 13可以使错误消失,但是在不久的将来将无法使用。还尝试删除与音频和AV框架相关的所有内容,但无济于事。
1> mackworth..:
显然是相同的错误,但是符号不同:
dyld: Symbol not found: __ZTISt9bad_alloc
Referenced from:
Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.1.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
in
@杰里米的答案对我有用。为了找到它,该文件位于
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox.tbd
您取出的行是:
weak-def-symbols: [ __ZTI11CAException, __ZTIN8DSPGraph9ExceptionE, __ZTINSt3__112bad_weak_ptrE,
__ZTINSt3__117bad_function_callE, __ZTISt11logic_error, __ZTISt12length_error,
__ZTISt12out_of_range, __ZTISt13runtime_error, __ZTISt16invalid_argument,
__ZTISt18bad_variant_access, __ZTISt8bad_cast, __ZTISt9bad_alloc,
__ZTISt9exception, __ZTS11CAException, __ZTSN8DSPGraph9ExceptionE,
__ZTSNSt3__112bad_weak_ptrE, __ZTSNSt3__117bad_function_callE,
__ZTSSt11logic_error, __ZTSSt12length_error, __ZTSSt12out_of_range,
__ZTSSt13runtime_error, __ZTSSt16invalid_argument, __ZTSSt18bad_variant_access,
__ZTSSt8bad_cast, __ZTSSt9bad_alloc, __ZTSSt9exception ]