You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

签名证书无效致自动签名失败,真机运行APP故障求解决

Fixing Invalid Signing Certificate & Automatic Signing Failures on Physical Devices

Hey there, I’ve run into this exact issue more times than I can count—simulators work fine because they skip proper signing checks, but physical devices are strict about valid certificates. Let’s walk through some tried-and-tested fixes beyond what you’ve already tried:

  • Double-check your Developer Account & Device Registration
    First, confirm your Apple Developer account is active (not expired) and that your physical device is registered in your Developer Account’s device list. If the device isn’t added, automatic signing can’t generate a valid provisioning profile for it.

  • Verify Keychain Certificates & Private Keys
    You tried removing and re-adding keys, but let’s dig deeper:

    1. Open Keychain Access and filter for "Certificates".
    2. Look for your iOS Development or iOS Distribution certificate—if it has a red warning icon, it’s either expired or missing its paired private key.
    3. Expand the certificate (click the triangle next to it): you should see a private key listed under it. If not, you’ll need to either:
      • Export the private key from another Mac where it exists (as a .p12 file) and import it to your current Keychain, or
      • Revoke the old certificate in the Developer Portal and download a new one (make sure to generate a new CSR first if needed).
  • Wipe Xcode’s Cached Data
    Xcode’s cached derived data and build artifacts often cause signing glitches:

    1. Close Xcode completely.
    2. Delete your Derived Data folder: Go to Xcode > Preferences > Locations, click the arrow next to the Derived Data path, and delete the entire folder.
    3. Clear the project build cache: Open your project, press Cmd + Shift + K to clean, then Cmd + Option + Shift + K for a deep clean.
    4. Restart Xcode and re-enable Automatic Manage Signing.
  • Align Project & Target Signing Settings
    Mismatched settings between your project and targets can break automatic signing:

    1. Go to your Project’s Info tab and confirm the Bundle Identifier matches the one registered in your Developer Portal.
    2. For each Target, navigate to Signing & Capabilities:
      • Ensure "Automatic manage signing" is enabled.
      • Select the correct Team associated with your Developer Account.
      • Check that no manual provisioning profiles are forced (automatic signing should handle this).
  • Reset Xcode’s Signing Preferences
    Sometimes Xcode’s internal preferences get corrupted. Try resetting them (note: this will reset all Xcode preferences like shortcuts and layout, so back up if needed):

    1. Close Xcode.
    2. Open Terminal and run:
      defaults delete com.apple.dt.Xcode
      
    3. Restart Xcode, re-select your Team, and enable automatic signing again.
  • Trust the Developer Certificate on Your Physical Device
    Even if the certificate is valid, your device might not trust it yet:

    1. On your physical device, go to Settings > General > VPN & Device Management.
    2. Find your Apple Developer account in the list and tap it.
    3. Tap "Trust [Your Account Name]" and confirm.

If none of these work, you can try manual signing as a fallback:

  1. Download the correct provisioning profile from the Developer Portal (matching your Bundle Identifier and device).
  2. In Xcode, disable "Automatic manage signing" and select the downloaded profile and corresponding certificate.

内容的提问来源于stack exchange,提问作者Ke Ro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 09:00:57