From ddb69a2b1dd94a571911c495b30b4728050e367a Mon Sep 17 00:00:00 2001 From: syui Date: Tue, 9 Dec 2025 12:39:42 +0900 Subject: [PATCH] fix social-app ios patch --- ios/README.md | 5 + ios/build.sh | 51 +++++---- .../027-social-app-ios-remove-birthdate.patch | 101 ++++++++++++++++++ ...social-app-ios-remove-discover-feeds.patch | 16 +++ ...social-app-ios-remove-feeds-discover.patch | 84 +++++++++++++++ ios/setup.zsh | 3 + 6 files changed, 239 insertions(+), 21 deletions(-) create mode 100644 ios/patching/027-social-app-ios-remove-birthdate.patch create mode 100644 ios/patching/028-social-app-ios-remove-discover-feeds.patch create mode 100644 ios/patching/029-social-app-ios-remove-feeds-discover.patch diff --git a/ios/README.md b/ios/README.md index ab3e592..dee5ce3 100644 --- a/ios/README.md +++ b/ios/README.md @@ -91,3 +91,8 @@ https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/LICE 2. 年齢保証、年齢確認ページがでてくるのを削除。誕生日を入力する処理を削除。アプリ配布国は限定します。 +## 追加 + +1. 生年月日をサインイン時に要求しないよう削除 +2. 検索で、Discoverを表示しない + diff --git a/ios/build.sh b/ios/build.sh index 0d704b9..59fbf46 100755 --- a/ios/build.sh +++ b/ios/build.sh @@ -40,30 +40,38 @@ else echo "⚠️ Warning: $ASSETS_DIR not found" fi -# 2. Prebuild (Generate ios directory) -echo "2. Running Expo Prebuild..." -# Clean old ios folder to remove old entitlements/AppClip targets -rm -rf ios -npx expo prebuild --platform ios --clean +function cleanup_build { + # 2. Prebuild (Generate ios directory) + echo "2. Running Expo Prebuild..." + # Clean old ios folder to remove old entitlements/AppClip targets + rm -rf ios + npx expo prebuild --platform ios --clean -# 3. CocoaPods -echo "3. Installing CocoaPods..." -# Ensure PATH includes Homebrew ruby gems if needed -export PATH="/opt/homebrew/lib/ruby/gems/3.4.0/bin:$PATH" -cd ios -pod install -cd .. + # 3. CocoaPods + echo "3. Installing CocoaPods..." + # Ensure PATH includes Homebrew ruby gems if needed + export PATH="/opt/homebrew/lib/ruby/gems/3.4.0/bin:$PATH" + cd ios + pod install + cd .. -# 4. Signing (Manual Step) -echo "4. Opening Xcode for Signing..." -XCODE_PROJ="ios/${APP_NAME}.xcodeproj" -# Fallback search if variable name logic differs -if [ ! -d "$XCODE_PROJ" ]; then - XCODE_PROJ=$(find ios -name "*.xcodeproj" | head -n 1) -fi + # 4. Signing (Manual Step) + echo "4. Opening Xcode for Signing..." + XCODE_PROJ="ios/${APP_NAME}.xcodeproj" + # Fallback search if variable name logic differs + if [ ! -d "$XCODE_PROJ" ]; then + XCODE_PROJ=$(find ios -name "*.xcodeproj" | head -n 1) + fi -open "$XCODE_PROJ" -read + open "$XCODE_PROJ" + read +} + +case $1 in + i) + cleanup_build + ;; +esac echo "Building $APP_NAME for App Store upload..." @@ -86,6 +94,7 @@ fi cd "$BUILD_DIR" + # IPA作成 rm -rf Payload ${APP_NAME}.ipa mkdir -p Payload diff --git a/ios/patching/027-social-app-ios-remove-birthdate.patch b/ios/patching/027-social-app-ios-remove-birthdate.patch new file mode 100644 index 0000000..4e2fc17 --- /dev/null +++ b/ios/patching/027-social-app-ios-remove-birthdate.patch @@ -0,0 +1,101 @@ +diff --git a/src/screens/Signup/StepInfo/index.tsx b/src/screens/Signup/StepInfo/index.tsx +--- a/src/screens/Signup/StepInfo/index.tsx ++++ b/src/screens/Signup/StepInfo/index.tsx +@@ -7,11 +7,9 @@ + + import {isEmailMaybeInvalid} from '#/lib/strings/email' + import {logger} from '#/logger' +-import {is13, is18, useSignupContext} from '#/screens/Signup/state' ++import {useSignupContext} from '#/screens/Signup/state' + import {Policies} from '#/screens/Signup/StepInfo/Policies' + import {atoms as a, native} from '#/alf' +-import * as DateField from '#/components/forms/DateField' +-import {type DateFieldRef} from '#/components/forms/DateField/types' + import {FormError} from '#/components/forms/FormError' + import {HostingProvider} from '#/components/forms/HostingProvider' + import * as TextField from '#/components/forms/TextField' +@@ -22,16 +20,6 @@ + import {usePreemptivelyCompleteActivePolicyUpdate} from '#/components/PolicyUpdateOverlay/usePreemptivelyCompleteActivePolicyUpdate' + import {BackNextButtons} from '../BackNextButtons' + +-function sanitizeDate(date: Date): Date { +- if (!date || date.toString() === 'Invalid Date') { +- logger.error(`Create account: handled invalid date for birthDate`, { +- hasDate: !!date, +- }) +- return new Date() +- } +- return date +-} +- + export function StepInfo({ + onPressBack, + isServerError, +@@ -55,7 +43,6 @@ + + const emailInputRef = useRef(null) + const passwordInputRef = useRef(null) +- const birthdateInputRef = useRef(null) + + const [hasWarnedEmail, setHasWarnedEmail] = React.useState(false) + +@@ -76,10 +63,6 @@ + const emailChanged = prevEmailValueRef.current !== email + const password = passwordValueRef.current + +- if (!is13(state.dateOfBirth)) { +- return +- } +- + if (state.serviceDescription?.inviteCodeRequired && !inviteCode) { + return dispatch({ + type: 'setError', +@@ -246,44 +229,21 @@ + secureTextEntry + autoComplete="new-password" + autoCapitalize="none" +- returnKeyType="next" +- submitBehavior={native('blurAndSubmit')} +- onSubmitEditing={native(() => +- birthdateInputRef.current?.focus(), +- )} ++ returnKeyType="done" + passwordRules="minlength: 8;" + /> + + +- +- +- Your birth date +- +- { +- dispatch({ +- type: 'setDateOfBirth', +- value: sanitizeDate(new Date(date)), +- }) +- }} +- label={_(msg`Date of birth`)} +- accessibilityHint={_(msg`Select your date of birth`)} +- maximumDate={new Date()} +- /> +- + + + ) : undefined} + + ({ +- key: `popularFeed:${feed.uri}`, +- type: 'popularFeed', +- feedUri: feed.uri, +- feed, +- })), +- ) +- } +- } +- } else { +- if (isPopularFeedsFetching && !popularFeeds?.pages) { +- slices.push({ +- key: 'popularFeedsLoading', +- type: 'popularFeedsLoading', +- }) +- } else { +- if (!popularFeeds?.pages) { +- slices.push({ +- key: 'popularFeedsNoResults', +- type: 'popularFeedsNoResults', +- }) +- } else { +- for (const page of popularFeeds.pages || []) { +- slices = slices.concat( +- page.feeds.map(feed => ({ +- key: `popularFeed:${feed.uri}`, +- type: 'popularFeed', +- feedUri: feed.uri, +- feed, +- })), +- ) +- } +- +- if (isPopularFeedsFetchingNextPage) { +- slices.push({ +- key: 'popularFeedsLoadingMore', +- type: 'popularFeedsLoadingMore', +- }) +- } +- } +- } +- } +- } +- } +- + return slices + }, [ + hasSession, diff --git a/ios/setup.zsh b/ios/setup.zsh index 8919a8d..431b120 100755 --- a/ios/setup.zsh +++ b/ios/setup.zsh @@ -39,6 +39,9 @@ PATCH_FILES_IOS=( "024-social-app-ios-disable-external-services.patch" "025-social-app-ios-bskyweb-title.patch" "026-social-app-ios-serverinput-label.patch" + "027-social-app-ios-remove-birthdate.patch" + "028-social-app-ios-remove-discover-feeds.patch" + "029-social-app-ios-remove-feeds-discover.patch" ) function ios-env() {