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

更换过期Apple iOS证书后Expo EAS iOS构建失败求助

React Native Expo EAS iOS构建失败:证书导入失败问题

核心报错

更换过期iOS分发证书后,执行eas build --profile preview --platform ios构建时失败,关键错误信息:

Distribution certificate with fingerprint CD44CF79B491A74173F7A51B6668B2EEE7E9D628 hasn't been imported successfully

完整构建日志:

Prepare credentials
4s


Preparing credentials
Creating keychain
Preparing credentials for target 'reflexmobile'
Getting distribution certificate fingerprint and common name
Fingerprint = "CD44CF79B491A74173F7A51B6668B2EEE7E9D628", common name = iPhone Distribution: Theory Communication & Design, Inc. (FU64QJ2JQX)
Writing distribution certificate to /var/folders/tp/1f104nqx6yq986857sbfl3yh0000gn/T/163b2b59-b24d-4a5c-b102-922fd3229013.p12
Importing distribution certificate into the keychain
Initializing provisioning profile
Validating whether the distribution certificate has been imported successfully
Destroying keychain - /var/folders/tp/1f104nqx6yq986857sbfl3yh0000gn/T/eas-build-e9293bd7-4366-4c3c-916f-4a0f6f1e6e41.keychain
Distribution certificate with fingerprint CD44CF79B491A74173F7A51B6668B2EEE7E9D628 hasn't been imported successfully

Fail build
1s


Build failed

Distribution certificate with fingerprint CD44CF79B491A74173F7A51B6668B2EEE7E9D628 hasn't been imported successfully

环境与文件信息

  • 运行环境:Windows上的Linux子系统,无Mac设备
  • 项目证书目录certs/ios包含文件:
    • distribution_cert.pem
    • full_chain.pem
    • ios_distribution.cer
    • ios_distribution.p12
    • Reflex_Mobile_2024.mobileprovision
  • Linux系统证书目录usr/local/share/ca-certificates包含:
    • AppleWWDRCAG3.crt
    • AppleRootCA-G3.crt

项目配置文件

package.json

{
  "name": "reflex-mobile",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "npx expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@eva-design/eva": "^2.1.1",
    "@react-native-community/checkbox": "^0.5.17",
    "@react-navigation/native-stack": "^6.6.2",
    "@ui-kitten/components": "^5.1.2",
    "expo": "^49.0.21",
    "expo-asset": "~8.10.1",
    "expo-font": "~11.4.0",
    "expo-linear-gradient": "~12.3.0",
    "expo-splash-screen": "~0.20.5",
    "expo-sqlite": "~11.3.3",
    "expo-status-bar": "~1.6.0",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.72.10",
    "react-native-element-dropdown": "^2.2.0",
    "react-native-gesture-handler": "~2.12.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-paper": "^5.12.3",
    "react-native-safe-area-context": "4.6.3",
    "react-native-screens": "~3.22.0",
    "react-native-svg": "13.9.0",
    "react-native-vector-icons": "^10.0.3",
    "react-native-web": "~0.19.6",
    "twrnc": "^3.3.2",
    "@expo/metro-config": "~0.10.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "overrides": {
    "@expo/config-plugins": "~7.2.2"
  },
  "private": true
}

eas.json

{
  "cli": {
    "version": ">= 3.6.1",
    "promptToConfigurePushNotifications": false
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "ios": {
        "resourceClass": "m1-medium"
      }
    },
    "preview": {
      "distribution": "internal",
      "ios": {
        "resourceClass": "m1-medium"
      },
      "credentialsSource": "local"
    },
    "production": {
      "ios": {
        "resourceClass": "m1-medium"
      }
    }
  },
  "submit": {
    "production": {}
  }
}

credentials.json

{
  "ios": {
    "provisioningProfilePath": "certs/ios/Reflex_Mobile_2024.mobileprovision",
    "distributionCertificate": {
      "path": "certs/ios/ios_distribution.p12",
      "password": "REDACTED"
    }
  }
}

app.json

{
  "expo": {
    "name": "reflex-mobile",
    "slug": "reflex-mobile",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "buildNumber": "1.0.0",
      "supportsTablet": true,
      "bundleIdentifier": "FU64QJ2JQX.com.ilovetheory.reflexmobile"
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      }
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "extra": {
      "eas": {
        "projectId": "86823436-a1e8-4f9f-b218-45a355d43c65"
      }
    }
  }
}

已验证与排查操作

  • 证书已在Expo中验证通过
  • 已执行的排查步骤:
    • 重启电脑
    • 更新Expo CLI与EAS CLI
    • 验证.p12文件有效性
    • 在Linux系统中更新证书
    • 执行npm update
    • 下载并安装Apple WWDR G3与Apple Root CA-G3证书
    • 将.cer格式证书转换为.pem格式
    • 验证证书文件路径与权限
    • 验证证书链完整性

苹果支持确认证书本身无问题,Expo支持仅提供已尝试过的论坛链接,未给出有效解决方案,寻求进一步解决建议。


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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.25 12:16:03