From 07e2faff072aea151d631f2b7c72d720fd960bcc Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Mon, 1 Jun 2026 10:28:21 +0200 Subject: [PATCH] fix(tv): only add user-management entitlement for tvOS builds (#1633) --- plugins/withTVUserManagement.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/withTVUserManagement.js b/plugins/withTVUserManagement.js index 0cb2f8e85..651ee7385 100644 --- a/plugins/withTVUserManagement.js +++ b/plugins/withTVUserManagement.js @@ -4,9 +4,16 @@ const { withEntitlementsPlist } = require("expo/config-plugins"); * Expo config plugin to add User Management entitlement for tvOS profile linking */ const withTVUserManagement = (config) => { + // Only add for tvOS builds. The entitlement is restricted by Apple and must + // be present in the provisioning profile, so injecting it into mobile builds + // breaks signing ("Entitlement ... not found and could not be included in + // profile"). The entitlement is only needed for tvOS + // TVUserManager.currentUserIdentifier. + if (process.env.EXPO_TV !== "1") { + return config; + } + return withEntitlementsPlist(config, (config) => { - // Only add for tvOS builds (check if building for TV) - // The entitlement is needed for TVUserManager.currentUserIdentifier to work config.modResults["com.apple.developer.user-management"] = [ "runs-as-current-user", ];