ai/at
1
0

add ios-entitlements-plugin

This commit is contained in:
2025-12-07 14:57:48 +09:00
parent 67399ac038
commit 8b2a8632b9
2 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
diff --git a/plugins/withCodeSignEntitlements.js b/plugins/withCodeSignEntitlements.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/plugins/withCodeSignEntitlements.js
@@ -0,0 +1,22 @@
+/* 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

View File

@@ -24,6 +24,7 @@ PATCH_FILES_IOS=(
"011-social-app-ios-splash-license-footer.patch" "011-social-app-ios-splash-license-footer.patch"
"012-social-app-ios-settings-about-help.patch" "012-social-app-ios-settings-about-help.patch"
"013-social-app-ios-settings-remove-help.patch" "013-social-app-ios-settings-remove-help.patch"
"019-social-app-ios-entitlements-plugin.patch"
) )
function ios-env() { function ios-env() {