From 8b2a8632b9e36db39d4f509e7779b2ae59a346da Mon Sep 17 00:00:00 2001 From: syui Date: Sun, 7 Dec 2025 14:57:48 +0900 Subject: [PATCH] add ios-entitlements-plugin --- ...9-social-app-ios-entitlements-plugin.patch | 31 +++++++++++++++++++ ios/setup.zsh | 1 + 2 files changed, 32 insertions(+) create mode 100644 ios/patching/019-social-app-ios-entitlements-plugin.patch diff --git a/ios/patching/019-social-app-ios-entitlements-plugin.patch b/ios/patching/019-social-app-ios-entitlements-plugin.patch new file mode 100644 index 0000000..84e21ad --- /dev/null +++ b/ios/patching/019-social-app-ios-entitlements-plugin.patch @@ -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 diff --git a/ios/setup.zsh b/ios/setup.zsh index 93caa87..699c4d7 100755 --- a/ios/setup.zsh +++ b/ios/setup.zsh @@ -24,6 +24,7 @@ PATCH_FILES_IOS=( "011-social-app-ios-splash-license-footer.patch" "012-social-app-ios-settings-about-help.patch" "013-social-app-ios-settings-remove-help.patch" + "019-social-app-ios-entitlements-plugin.patch" ) function ios-env() {