English
English
简体中文
Register
Log In
English
English
简体中文
Register
Log In
Language
English
English
简体中文
Register
Log In

Why has the error Undefined symbols for architecture arm64 occurred when I used a Mac with M1 chip to compile my project for iOS?

Last Updated on2023-10-16 03:08:10
Error code sample:
Undefined symbols for architecture arm64: "OBJC_CLASS$ThingAudioEngine", referenced from: objc-class-ref in ThingSpeechKit(ThingSpeechVADetector.o) "OBJC_CLASS$ThingSceneIntent", referenced from: objc-class-ref in ThingSiriShortcutModule(ThingSceneShortcutManager.o) "OBJC_CLASS$_DWKWebView", referenced from: objc-class-ref in ThingHybridContainer(ThingHybridContainerVC.o) ld: symbol(s) not found for architecture arm64.
Solution:
Perform the following steps for troubleshooting:
  • 1. Add the following code block to the Podfile:
    post_install do |installer| installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end end
  • 2. Open your project in Xcode, chooseBuild Settings>Excluded Architectures, and then add the optionAny iOS Simulator SDKwith the valuearm64.
  • 3. Runpod install.
  • Click for services and help

    Help Center