diff --git a/plugins/withCodeSignEntitlements.js b/plugins/withCodeSignEntitlements.js
new file mode 100644
index 000000000..b03b6bd68
--- /dev/null
+++ b/plugins/withCodeSignEntitlements.js
@@ -0,0 +1,25 @@
+/* eslint-disable @typescript-eslint/no-var-requires */
+const { withXcodeProject } = require('@expo/config-plugins')
+
+const withCodeSignEntitlements = (config) => {
+  return withXcodeProject(config, (config) => {
+    const xcodeProject = config.modResults
+    const configurations = xcodeProject.pbxXCBuildConfigurationSection()
+
+    for (const key in configurations) {
+      const configuration = configurations[key]
+      if (
+        configuration.buildSettings &&
+        configuration.comment &&
+        !configuration.comment.includes('TEST')
+      ) {
+        configuration.buildSettings.CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION =
+          'YES'
+      }
+    }
+
+    return config
+  })
+}
+
+module.exports = withCodeSignEntitlements
