From 54d9554fc0a4cbb9325436f08c19819e2203c1b9 Mon Sep 17 00:00:00 2001 From: syui Date: Tue, 9 Dec 2025 12:39:42 +0900 Subject: [PATCH] fix patch --- ios/README.md | 28 +++++ 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, 262 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..574bfe5 100644 --- a/ios/README.md +++ b/ios/README.md @@ -91,3 +91,31 @@ https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/LICE 2. 年齢保証、年齢確認ページがでてくるのを削除。誕生日を入力する処理を削除。アプリ配布国は限定します。 + +## apple review 対応 + +Step 1: Address Guideline 5.1.1 (Privacy) + + Modify your app's code (Version 1.111.0 or newer): Change the user registration or profile flow so that entering the Date of birth is no longer a required field. + + Deployment: Build and prepare a new version (e.g., 1.111.1) that includes this change. + +Step 2: Address Guideline 2.1 (Information Needed) + + Create a Demo Account: Create a dedicated user account within your app with a clear username and password (e.g., ReviewerTest / Password12345!). + + Populate Content: Use this demo account to add sample content, connect with other test users, or perform any actions necessary to ensure that all features that rely on user data (lists, content, interactions, etc.) are visible and testable. + + Update App Store Connect: + + Go to your app's submission in App Store Connect. + + Navigate to the App Review Information section. + + Enter the username and password for the demo account you created in the designated fields. + +Step 3: Re-submit + + Upload the new app binary (with the privacy fix) to App Store Connect. + + Submit the new version for review, ensuring the updated App Review Information (demo account details) is saved. 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() {