Quick answer: The linker found code that uses a class or function and found no library that defines it. In a Unity iOS build the cause is almost always one of five things: a system framework the plugin needs is not linked to the UnityFramework target, CocoaPods dependencies were not installed or you opened the .xcodeproj instead of the .xcworkspace, a [DllImport("__Internal")] function has no native implementation in the build, a static library has no arm64 device slice, or a library contains Swift and the target is not set up for it. The symbol name tells you which.

Unity exported the Xcode project without complaint, Xcode compiled every file, and the build failed at the last step with a list of symbols and linker command failed with exit code 1. Nothing is wrong with your C# and nothing is wrong with the compiler. Linking is the step where every reference has to be matched with a definition, and one piece of native code is missing from the build. Because Unity regenerates the Xcode project, the fix has to live in the Unity project: in a plugin’s import settings or in a post-process build script. This guide shows how to read the symbol, work out which piece is missing, and add it so the fix survives the next export.

The exact error

In the Xcode build log, the classic form is:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_GADBannerView", referenced from:
      objc-class-ref in GADUBanner.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Xcode 15 and later use Apple’s newer linker, which prints a shorter form, and the issue navigator shows one line per symbol:

ld: Undefined symbols:
  _OBJC_CLASS_$_GADBannerView, referenced from:
       in GADUBanner.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Undefined symbol: _OBJC_CLASS_$_GADBannerView

Each entry has two parts. The quoted name is the thing nobody defined. The referenced from line is the object file that uses it, which tells you which plugin or script is asking. Open the full log in Xcode’s Report navigator and expand the failed link step to see both.

What the linker is telling you

“For architecture arm64” does not mean the architecture is the problem. It only names the build being linked, and every current iPhone build is arm64. The message means: among all the object files, static libraries and frameworks given to this target, none contains that symbol.

It helps to know how Unity lays out the Xcode project. Since Unity 2019.3 there are two main targets. Unity-iPhone is a thin app that launches the engine. UnityFramework contains everything else: the engine, the code IL2CPP generated from your C#, and every native plugin file from your Assets folder. So the references are almost always inside UnityFramework, and that is the target a missing framework or library has to be linked to. Adding it to Unity-iPhone changes nothing, which is the most common reason an old post-process script or a manual fix “did not work”.

Read the symbol

The shape of the name tells you what kind of thing is missing, and usually where it should come from.

Symbol looks likeIt isWhere the definition normally lives
_OBJC_CLASS_$_Name (also _OBJC_METACLASS_$_Name)An Objective-C class called NameA system framework or a vendor SDK. SKStoreReviewController is StoreKit, GKLocalPlayer is GameKit, ASIdentifierManager is AdSupport, ATTrackingManager is AppTrackingTransparency, GADBannerView is the Google Mobile Ads SDK
_nameA C function or global variable called nameA plugin’s native source or static library (_MyPlugin_Init), or a system library (_sqlite3_open is libsqlite3, _inflate is libz, _SCNetworkReachabilityCreateWithName is SystemConfiguration)
__Z...A C++ function (a mangled name)A C++ library, or the C++ standard library when the name starts __ZNSt3__1. If the readable part is one of your plugin’s function names, a declaration is missing extern "C"
_$s...A Swift function or typeA Swift library or pod that is not linked
_swift_... or __swift_FORCE_LOAD_$_...The Swift runtime itselfThe Swift standard libraries; the target is not configured for Swift

If you do not recognize an Objective-C class, search Apple’s documentation for the name. The page states the framework at the top.

Find which cause you have

  1. The symbol belongs to an Apple framework (StoreKit, GameKit, AdSupport, WebKit and so on). The framework is not linked to UnityFramework. See “Fix a system framework that is not linked” below.
  2. The symbol belongs to a vendor SDK (ads, analytics, sign-in) and there are dozens of them. The SDK itself is not in the build. It is normally delivered by CocoaPods. See “Fix missing CocoaPods dependencies”.
  3. The symbol is a plain C name that matches a DllImport in your project, and the reference comes from generated C# code such as Assembly-CSharp.o. The native implementation is missing. See “Fix a DllImport with no native implementation”.
  4. The symbols all belong to one static library that is in the project, and the log has a warning that the file was ignored. The library was built for another architecture or for the Simulator. See “Fix a library built for the wrong architecture or platform”.
  5. The symbols are Swift names. See “Fix undefined Swift symbols”.

After any fix, export again from Unity, then in Xcode choose Product > Clean Build Folder and build. A stale build folder can keep reporting a symbol you have already supplied.

Fix a system framework that is not linked

If the plugin is a file in your project (a .a, a .framework, or .m and .mm source), Unity can record which system frameworks it needs. Select the file in the Project window. In the Inspector, under Select platforms for plugin, confirm iOS is ticked. In the iOS platform settings, open Framework dependencies, tick the frameworks the plugin uses, and click Apply. Unity links those frameworks to UnityFramework on every export.

For anything the list does not cover, or to keep the configuration in code, add a post-process build script. Save this as Assets/Editor/LinkSystemFrameworks.cs:

#if UNITY_IOS
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;

public static class LinkSystemFrameworks
{
    [PostProcessBuild(200)]
    public static void OnPostProcessBuild(BuildTarget target, string buildPath)
    {
        if (target != BuildTarget.iOS) return;

        string projectPath = PBXProject.GetPBXProjectPath(buildPath);
        var project = new PBXProject();
        project.ReadFromFile(projectPath);

        // Plugins and IL2CPP output are linked into UnityFramework, not Unity-iPhone.
        string frameworkTarget = project.GetUnityFrameworkTargetGuid();

        project.AddFrameworkToProject(frameworkTarget, "StoreKit.framework", false);
        project.AddFrameworkToProject(frameworkTarget, "GameKit.framework", false);
        project.AddFrameworkToProject(frameworkTarget, "AdSupport.framework", false);

        // true = weak link, for frameworks missing on older iOS versions you still support.
        project.AddFrameworkToProject(frameworkTarget, "AppTrackingTransparency.framework", true);

        // System libraries that are not frameworks: libz and libsqlite3.
        project.AddBuildProperty(frameworkTarget, "OTHER_LDFLAGS", "-lz");
        project.AddBuildProperty(frameworkTarget, "OTHER_LDFLAGS", "-lsqlite3");

        project.WriteToFile(projectPath);
    }
}
#endif

Two details matter. GetUnityFrameworkTargetGuid() is the target to use; scripts written before Unity 2019.3 look up the target by the name Unity-iPhone, which is now the wrong target, and GetUnityMainTargetGuid() returns that same app target. Some SDKs also require the -ObjC linker flag; when the SDK’s documentation asks for it, add it to OTHER_LDFLAGS the same way.

Fix missing CocoaPods dependencies

Most ad, analytics and sign-in plugins for Unity do not ship the vendor SDK in the Unity package. They ship a small Objective-C bridge and a dependencies file, and the External Dependency Manager (the Assets > External Dependency Manager > iOS Resolver menu) writes a Podfile into the Xcode build folder and runs pod install after the export. The bridge is what references GADBannerView; the pod is what defines it. Two things go wrong.

You opened the wrong file. When pods are installed, the build folder contains both Unity-iPhone.xcodeproj and Unity-iPhone.xcworkspace. Only the workspace includes the Pods project. Building the .xcodeproj compiles the bridge without the SDK, and every SDK class is undefined. Open the workspace, and point build machines at it too:

xcodebuild -workspace Unity-iPhone.xcworkspace -scheme Unity-iPhone -configuration Release archive -archivePath build/MyGame.xcarchive

There is no workspace. Then pod install never ran or failed during the Unity build. Look in the Unity Console of that build for a CocoaPods error, and in the build folder for a Podfile. If the Podfile exists, run the install yourself to see the real error:

cd /path/to/XcodeBuild
pod install --repo-update
open Unity-iPhone.xcworkspace

Typical failures are CocoaPods not being installed on the machine, an outdated local spec repository (which --repo-update fixes), and two plugins requiring incompatible versions of the same pod, which the output names. If there is no Podfile at all, the resolver did not run: check that the External Dependency Manager is in the project and that iOS resolution is enabled in its settings. In the generated Podfile, the SDK pods should be listed under the UnityFramework target.

Fix a DllImport with no native implementation

On iOS, native plugin functions are linked statically. A C# declaration like this becomes a direct call in the generated C++:

[DllImport("__Internal")]
private static extern void MyPlugin_ShowShareSheet(string text);

If no native file in the build defines that function, the link fails (example values):

Undefined symbols for architecture arm64:
  "_MyPlugin_ShowShareSheet", referenced from:
      _ShareButton_MyPlugin_ShowShareSheet_m3A9C41D7 in Assembly-CSharp.o

On other platforms the same mistake would surface at run time as a DllNotFoundException or an EntryPointNotFoundException. On iOS you find out at link time. Check these in order:

To see what a static library really defines, list its exported symbols:

nm -gU Libraries/Plugins/iOS/libMyPlugin.a | grep MyPlugin_

Fix a library built for the wrong architecture or platform

When a prebuilt library is in the project and all of its symbols are still undefined, the linker skipped it. Scroll up in the log for a warning that the file was ignored because it was built for a different architecture or platform, then check the library:

lipo -info Libraries/Plugins/iOS/libVendorSDK.a
Architectures in the fat file: Libraries/Plugins/iOS/libVendorSDK.a are: armv7 x86_64

That library has a 32-bit device slice and an Intel Simulator slice, and no arm64. No setting can fix it; you need a newer build from the vendor. A second case looks fine in lipo and still fails: an arm64 slice built for the Simulator on Apple silicon is not usable in a device build, and the reverse. Xcode reports that one with its own message about building for iOS while linking a file built for the iOS Simulator. Check Unity’s Target SDK under Player > Other Settings > Configuration: Device SDK for phones, Simulator SDK for the Simulator, and use the matching library. Vendors that ship an XCFramework include both.

Also select the library in Unity and look at the CPU architecture in its iOS plugin settings. A library marked for the Simulator architecture only is left out of device builds.

Fix undefined Swift symbols

Symbols such as __swift_FORCE_LOAD_$_swiftFoundation or a list of _swift_ names, often next to warnings that an auto-linked Swift library could not be found, mean a static library or pod written in Swift is being linked into a target that Xcode does not treat as a Swift target. Xcode only adds the Swift library search paths to targets that contain Swift source.

The simplest fix is to give UnityFramework one Swift file. Create Assets/Plugins/iOS/SwiftSupport.swift with a single line:

import Foundation

Unity treats .swift files as plugin source and adds them to the UnityFramework target, which makes Xcode configure the target for Swift. If the symbols remain, set the search path and Swift version from a post-process script, next to the framework calls shown earlier:

project.AddBuildProperty(frameworkTarget, "LIBRARY_SEARCH_PATHS",
    "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)");
project.AddBuildProperty(frameworkTarget, "LIBRARY_SEARCH_PATHS", "$(SDKROOT)/usr/lib/swift");
project.SetBuildProperty(frameworkTarget, "SWIFT_VERSION", "5.0");

If instead the undefined names are _$s symbols from one specific SDK, that SDK is simply not linked: treat it like any other missing library and go back to the CocoaPods section.

Where Bugnet fits

A link error happens on your build machine before any player has the game, so it never reaches Bugnet, and no SDK inside the game can see it. The Xcode log is the only source.

Reports matter for what the same class of mistake does at run time. A plugin that links but fails to initialize, or a native call that fails on one platform, shows up in a running Unity game as a logged error or a C# exception such as EntryPointNotFoundException, and the Unity SDK files those through Application.logMessageReceived with recent log lines, platform, OS version and game version. Reports with the same title stack into one entry with an occurrence count, so a plugin that breaks only on iOS after an SDK update shows up as one entry with the affected OS versions. Native crashes inside a plugin are not captured as stack traces. Setup is in the SDK docs.

Frequently asked questions

What does Undefined symbols for architecture arm64 mean?

The linker found code that uses a class or function and no library in the build that defines it. The words for architecture arm64 only name the build being linked. The fix is to add the framework, library or source file that contains the missing symbol to the right target.

Why do I get undefined symbols after adding an ads or analytics plugin to Unity?

The plugin's bridge code references the vendor SDK, and the SDK is delivered by CocoaPods. If pod install failed during the Unity build, or you opened Unity-iPhone.xcodeproj instead of Unity-iPhone.xcworkspace, the SDK is not linked and every one of its classes is undefined.

Which Xcode target should frameworks be added to in a Unity project?

UnityFramework. Since Unity 2019.3 the engine, the IL2CPP output and all native plugins are built into that target, and Unity-iPhone is only a thin launcher. In a post-process build script, use GetUnityFrameworkTargetGuid when adding frameworks.

What does _OBJC_CLASS_$_ mean in a linker error?

It marks an Objective-C class. The text after the prefix is the class name, and the missing piece is the framework or SDK that defines that class, for example StoreKit for SKStoreReviewController or GameKit for GKLocalPlayer.

Why is my DllImport __Internal function an undefined symbol on iOS?

iOS plugins are linked statically, so the native function must exist in the build at link time. The native file is missing or not enabled for iOS, the names do not match, the function in a .mm file lacks extern C, or the declaration belongs to another platform such as WebGL.

Read the symbol name and the referenced from line before changing settings. Together they say what is missing and who needs it, and the fix belongs in the Unity project so it survives the next export.