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

React Native Expo EAS iOS构建报错:推送通知能力不匹配问题(托管工作流+本地证书场景)

Fixing Push Notification Entitlement Errors in EAS Build (Managed Workflow)

Hey there, let's break down what's happening here and fix those archive errors you're seeing. The core issue is that Expo's default setup adds push notification capabilities to your iOS project, but your provisioning profile doesn't include those entitlements—hence the mismatch. Let's tackle your questions one by one:

1. Do I need to declare that I don't want push notifications in the Expo config?

Absolutely yes. Expo automatically enables push notification support by default, even if you never plan to use it. To override this, just add a single line to your app.json or app.config.js under the iOS section:

{
  "expo": {
    "ios": {
      "disablePushNotifications": true
    }
  }
}

This tells Expo to skip adding any push-related capabilities, entitlements, or Info.plist entries to your project. No more unwanted aps-environment or push capability references.

2. Do I need to regenerate my provisioning profile?

Only if your App ID in the Apple Developer Portal has Push Notifications enabled. First, head to the portal, find your App ID, and double-check that the Push Notifications capability is unchecked. If it was enabled before, disable it, then regenerate your distribution provisioning profile to match the updated App ID.

If your App ID already has push notifications disabled (and your existing profile was generated from that), you don't need to recreate it—just make sure your Expo config is updated as above.

3. Does Expo Build require push notifications to be enabled?

Not at all. Push notifications are a completely optional feature. The error you're seeing is just a result of Expo's default configuration conflicting with your local credentials. Once you disable push notifications in your Expo config, this requirement goes away entirely.

Quick Step-by-Step Fix:

  • Add "disablePushNotifications": true to the ios section of your app.json/app.config.js;
  • Verify your App ID in the Apple Developer Portal has Push Notifications disabled;
  • Ensure your provisioning profile matches this App ID (regenerate if needed);
  • Rerun eas build --platform iOS.

That should resolve the archive errors and let your build complete successfully.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.28 13:37:28