Quick answer: Set your Apple team ID in Unity (Player Settings > iOS > Other Settings > Signing Team ID with Automatically Sign, or once for all projects in Preferences > External Tools) so every generated Xcode project already has it. If Xcode then complains about a CocoaPods resource bundle target, disable signing for bundle targets. In CI, pass DEVELOPMENT_TEAM to xcodebuild.

Every Unity iOS developer meets this error, and many fix it by picking the team in Xcode by hand after every build. Unity regenerates the Xcode project on each Replace build, so the hand fix keeps disappearing. Setting it at the source fixes it permanently.

The exact error

Signing for "Unity-iPhone" requires a development team. Select a development team in the Signing & Capabilities editor.

Variants name other targets, such as UnityFramework or a CocoaPods bundle like GoogleSignIn-GoogleSignIn.

Fix 1: set the team in Unity

Find your Team ID in your Apple Developer account under Membership details: a 10-character string such as ABCDE12345. Then either:

Build again with Replace and the generated Xcode project opens with signing configured. Use Append when you have made Xcode-side changes you want to keep.

Fix 2: set it in a post-process script

For teams or projects that need different settings per build, set it in code after Unity generates the project:

using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;

public static class IOSSigning
{
    [PostProcessBuild]
    public static void OnPostprocessBuild(BuildTarget target, string path)
    {
        if (target != BuildTarget.iOS) return;
        string projPath = PBXProject.GetPBXProjectPath(path);
        var proj = new PBXProject();
        proj.ReadFromFile(projPath);
        foreach (var guid in new[] { proj.GetUnityMainTargetGuid(), proj.GetUnityFrameworkTargetGuid() })
        {
            proj.SetBuildProperty(guid, "DEVELOPMENT_TEAM", "ABCDE12345");
            proj.SetBuildProperty(guid, "CODE_SIGN_STYLE", "Automatic");
        }
        proj.WriteToFile(projPath);
    }
}

Put it in an Editor folder. Read the team ID from an environment variable instead of hardcoding it if the project is shared.

Fix 3: CocoaPods resource bundles

Since Xcode 14, resource bundle targets in Pods (from Firebase, Google Sign-In and many ad SDKs) also ask for a team. Either open the .xcworkspace (not the .xcodeproj) and set the team on each Pods target, or disable signing for bundle targets in the Podfile's post_install hook, through whatever Podfile customization your dependency manager supports:

post_install do |installer|
  installer.pods_project.targets.each do |t|
    if t.respond_to?(:product_type) && t.product_type == "com.apple.product-type.bundle"
      t.build_configurations.each { |c| c.build_settings["CODE_SIGNING_ALLOWED"] = "NO" }
    end
  end
end

Using a free Apple ID

A personal team (a free Apple ID added in Xcode's Accounts settings) can sign builds for your own devices, with provisioning that expires after seven days. It cannot use capabilities such as Push Notifications, Game Center or In-App Purchase; Xcode reports that personal development teams do not support them. Remove those capabilities for local testing or join the Apple Developer Program.

In CI

xcodebuild -workspace Unity-iPhone.xcworkspace -scheme Unity-iPhone \
  -configuration Release -archivePath build/Game.xcarchive archive \
  DEVELOPMENT_TEAM=ABCDE12345 -allowProvisioningUpdates

Automatic signing in CI also needs an authenticated Apple account or an App Store Connect API key for -allowProvisioningUpdates; many teams use manual signing with a distribution certificate and profile installed on the runner instead.

After it builds

Once the build runs on a device, the next thing you want is to know when it breaks for testers. Bugnet's Unity SDK captures exceptions and errors on iOS with the device and build attached, and imports your App Store reviews every hour so review complaints and crash reports sit together.

Frequently asked questions

How do I fix “Signing for Unity-iPhone requires a development team”?

Set Signing Team ID and Automatically Sign in Unity’s iOS Player Settings, or in Preferences, External Tools for all projects, then build with Replace.

Where do I find my Apple Team ID?

In your Apple Developer account under Membership details. It is a 10-character identifier.

Why does a Pods target ask for a development team?

Since Xcode 14, CocoaPods resource bundle targets need signing settings too. Set the team on them or disable code signing for bundle targets in the Podfile.

Set the team once in Unity, not every time in Xcode.