From 732bbe7fbda75130e69b5486764084011969dc2c Mon Sep 17 00:00:00 2001 From: syui Date: Sun, 7 Dec 2025 14:23:14 +0900 Subject: [PATCH] fix patch cmd --- ios/patching/002-social-app-ios-lib.patch | 6 ++-- ios/patching/004-social-app-ios-core.patch | 4 +-- ios/patching/005-social-app-ios-screens.patch | 10 +++---- ios/patching/006-social-app-ios-shell.patch | 6 ++-- ios/patching/007-social-app-ios-misc.patch | 4 +-- ios/patching/009-social-app-ios-license.patch | 4 +-- ...2-social-app-ios-settings-about-help.patch | 2 +- ...9-social-app-ios-entitlements-plugin.patch | 30 +++++++++++++++++++ ios/setup.zsh | 3 +- 9 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 ios/patching/019-social-app-ios-entitlements-plugin.patch diff --git a/ios/patching/002-social-app-ios-lib.patch b/ios/patching/002-social-app-ios-lib.patch index 8381b72..0ef4ec5 100644 --- a/ios/patching/002-social-app-ios-lib.patch +++ b/ios/patching/002-social-app-ios-lib.patch @@ -16,7 +16,7 @@ index 231447b4f..33c51cc0a 100644 -const HELP_DESK_LANG = 'en-us' -export const HELP_DESK_URL = `https://blueskyweb.zendesk.com/hc/${HELP_DESK_LANG}` +const HELP_DESK_LANG = 'ja-jp' -+export const HELP_DESK_URL = 'https://syu.is/help' ++export const HELP_DESK_URL = 'https://syu.is/about/support/help' export const EMBED_SERVICE = 'https://embed.bsky.app' export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js` export const BSKY_DOWNLOAD_URL = 'https://bsky.app/download' @@ -37,8 +37,8 @@ index 231447b4f..33c51cc0a 100644 export const webLinks = { - tos: `https://bsky.social/about/support/tos`, - privacy: `https://bsky.social/about/support/privacy-policy`, -+ tos: `https://bsky.social/abouthttps://syu.is/terms`, -+ privacy: `https://bsky.social/abouthttps://syu.is/privacy-policy`, ++ tos: `https://syu.is/about/support/tos`, ++ privacy: `https://syu.is/about/support/privacy-policy`, community: `https://bsky.social/about/support/community-guidelines`, communityDeprecated: `https://bsky.social/about/support/community-guidelines-deprecated`, } diff --git a/ios/patching/004-social-app-ios-core.patch b/ios/patching/004-social-app-ios-core.patch index f96c5f3..1f61904 100644 --- a/ios/patching/004-social-app-ios-core.patch +++ b/ios/patching/004-social-app-ios-core.patch @@ -21,8 +21,8 @@ index 1ed913bb2..c80340edb 100644 Support: '/support', - PrivacyPolicy: '/support/privacy', - TermsOfService: '/support/tos', -+ PrivacyPolicy: 'https://syu.is/privacy', -+ TermsOfService: 'https://syu.is/terms', ++ PrivacyPolicy: 'https://syu.is/about/support/privacy-policy', ++ TermsOfService: 'https://syu.is/about/support/tos', CommunityGuidelines: '/support/community-guidelines', CopyrightPolicy: '/support/copyright', // hashtags diff --git a/ios/patching/005-social-app-ios-screens.patch b/ios/patching/005-social-app-ios-screens.patch index b13869d..1853137 100644 --- a/ios/patching/005-social-app-ios-screens.patch +++ b/ios/patching/005-social-app-ios-screens.patch @@ -7,7 +7,7 @@ index 6b8257b91..35202224b 100644 @@ -16,7 +16,7 @@ index 6b8257b91..35202224b 100644 @@ -31,7 +31,7 @@ index dd319a4c6..0e80f956a 100644 - label={_(msg`Bluesky Social Terms of Service`)} - to="https://bsky.social/about/support/tos" + label={_(msg`syu.is Terms of Service`)} -+ to="https://bsky.social/abouthttps://syu.is/terms" ++ to="https://syu.is/about/support/tos" style={[a.text_md, a.leading_normal]} overridePresentation> - Bluesky Social Terms of Service @@ -504,7 +504,7 @@ index a89eaadc4..228af4966 100644 - - - -+ ++ ) } @@ -564,7 +564,7 @@ index d843c713c..c0b34c886 100644 - - - -+ ++ ) } diff --git a/ios/patching/006-social-app-ios-shell.patch b/ios/patching/006-social-app-ios-shell.patch index 2b81dda..b2ea406 100644 --- a/ios/patching/006-social-app-ios-shell.patch +++ b/ios/patching/006-social-app-ios-shell.patch @@ -7,7 +7,7 @@ index 9915d0a2d..c200a7c67 100644 You must be at least 13 years old to use Bluesky. Read our{' '} Terms of Service {' '} @@ -700,14 +700,14 @@ index 1d097fc9a..e11a3a202 100644 )} {_(msg`Privacy`)} {' • '} {_(msg`Terms`)} diff --git a/ios/patching/007-social-app-ios-misc.patch b/ios/patching/007-social-app-ios-misc.patch index 049b12d..40e6be4 100644 --- a/ios/patching/007-social-app-ios-misc.patch +++ b/ios/patching/007-social-app-ios-misc.patch @@ -126,13 +126,13 @@ index 8365057e8..59c8506a2 100644 terms: { overridePresentation: false, - to: `https://bsky.social/about/support/tos`, -+ to: `https://bsky.social/abouthttps://syu.is/terms`, ++ to: `https://syu.is/about/support/tos`, label: _(msg`Terms of Service`), }, privacy: { overridePresentation: false, - to: `https://bsky.social/about/support/privacy-policy`, -+ to: `https://bsky.social/abouthttps://syu.is/privacy-policy`, ++ to: `https://syu.is/about/support/privacy-policy`, label: _(msg`Privacy Policy`), }, copyright: { diff --git a/ios/patching/009-social-app-ios-license.patch b/ios/patching/009-social-app-ios-license.patch index 916dc9a..bac8a82 100644 --- a/ios/patching/009-social-app-ios-license.patch +++ b/ios/patching/009-social-app-ios-license.patch @@ -44,8 +44,8 @@ index 1ed913bb2..aa6fccc4e 100644 Support: '/support', - PrivacyPolicy: '/support/privacy', - TermsOfService: '/support/tos', -+ PrivacyPolicy: 'https://syu.is/privacy', -+ TermsOfService: 'https://syu.is/terms', ++ PrivacyPolicy: 'https://syu.is/about/support/privacy-policy', ++ TermsOfService: 'https://syu.is/about/support/tos', + License: '/support/license', CommunityGuidelines: '/support/community-guidelines', CopyrightPolicy: '/support/copyright', diff --git a/ios/patching/012-social-app-ios-settings-about-help.patch b/ios/patching/012-social-app-ios-settings-about-help.patch index 0dc7875..da30677 100644 --- a/ios/patching/012-social-app-ios-settings-about-help.patch +++ b/ios/patching/012-social-app-ios-settings-about-help.patch @@ -25,7 +25,7 @@ index 6b8257b91..bed851753 100644 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..d71c6a8 --- /dev/null +++ b/ios/patching/019-social-app-ios-entitlements-plugin.patch @@ -0,0 +1,30 @@ +diff --git a/plugins/withCodeSignEntitlements.js b/plugins/withCodeSignEntitlements.js +new file mode 100644 +index 000000000..e69de29bb +--- /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.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 2d857a5..b74f085 100755 --- a/ios/setup.zsh +++ b/ios/setup.zsh @@ -13,6 +13,7 @@ typeset -a PATCH_FILES_IOS PATCH_FILES_IOS=( "001-social-app-ios-config.patch" "002-social-app-ios-lib.patch" + "019-social-app-ios-entitlements-plugin.patch" "003-social-app-ios-view.patch" "004-social-app-ios-core.patch" "005-social-app-ios-screens.patch" @@ -46,7 +47,7 @@ function apply-patch() { pushd ${target_dir} > /dev/null # Check if patch is already applied (reverse dry-run succeeds) - if patch --dry-run -p1 -R < ${patch_file} > /dev/null 2>&1; then + if patch -f --dry-run -p1 -R < ${patch_file} > /dev/null 2>&1; then echo "✅ Already applied - skipping" popd > /dev/null echo ""