Resolving Undefined Symbols for Architecture arm64 in Xcode

Resolving Undefined Symbols for Architecture arm64 in Xcode

28 February 2025 Stephan Petzl Leave a comment Xcode

Encountering an “Undefined symbols for architecture arm64” error in Xcode can be frustrating, especially when it occurs during the integration of CocoaPods in your project. This error typically arises when there are issues with the architectures for which the pods have been built, or when linker settings are not appropriately configured. This guide will walk you through a systematic approach to resolve this issue effectively.

Step-by-Step Solution

Before diving into complex solutions, it’s crucial to check the basics. Here are the steps you can follow:

  • Verify Architectures: Ensure that the Architectures and Valid Architectures are set correctly in your Xcode project settings.
    • Navigate to Project > Target (your project name) > Build Settings.
    • Set Architectures to Standard Architectures (armv7, armv7s) and Valid Architectures to armv7, armv7s.
  • Linker Flags: Add $(inherited) to the Other Linker Flags.
    • This includes linker flags generated by CocoaPods, which might be missing from your current configuration.
  • Build Active Architecture Only: Set this option to YES in your project settings.
    • This ensures that Xcode builds for the architecture of the device you are currently targeting.
  • Pod Updates: Ensure your pods are up to date and compatible with arm64.
    • Run pod update and ensure that the pods are built for arm64 architecture.

Additional Considerations

If the above steps do not resolve the issue, consider the following:

  • Framework Linkage: Ensure all necessary frameworks are linked in your project.
    • Go to Build Phases > Link Binary With Libraries and add any missing frameworks.
  • Clean Derived Data: Sometimes, cleaning your derived data can resolve lingering build issues.
    • Navigate to ~/Library/Developer/Xcode/DerivedData/ and delete the contents.

Enhancing Your Testing Workflow with Repeato

Once you’ve resolved the architecture issues, it’s crucial to ensure your app’s functionality is thoroughly tested. This is where Repeato can be an invaluable tool. As a no-code test automation solution, Repeato allows you to create, run, and maintain automated tests for your iOS apps with ease.

Repeato’s fast test recording and execution capabilities, powered by computer vision and AI, streamline the testing process. It supports advanced features such as data-driven testing and command line script execution, which can be particularly beneficial when dealing with complex app architectures.

Additionally, Repeato’s use of text and JSON format for test data ensures seamless integration with version control systems, making it a robust alternative to other tools like Katalon.

For more detailed guidance on using Repeato, visit our documentation section.

Like this article? there’s more where that came from!