diff --git a/README.md b/README.md index 8ec32d9..4137d1f 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,6 @@ $ curl -sL "syu.is/xrpc/com.atproto.repo.listRecords?repo=${handle}&collection=a ## build - - ```sh # build ./install.zsh @@ -86,3 +84,21 @@ $ curl -sL "syu.is/xrpc/com.atproto.repo.listRecords?repo=${handle}&collection=a ./install.zsh pull;./ios/setup.zsh ./ios/build.zsh ``` + +## social-app + +- https://github.com/bluesky-social/social-app/blob/main/LICENSE + +```js +PrivacyPolicy: 'https://syu.is/about/support/privacy-policy', +TermsOfService: 'https://syu.is/about/support/tos', +License: 'https://syu.is/about/support/license', +``` + +```js +CommunityGuidelines: '/support/community-guidelines', +CopyrightPolicy: '/support/copyright', +``` + +- https://bsky.social/about/support/community-guidelines +- https://bsky.social/about/support/copyright diff --git a/install.zsh b/install.zsh index 5e9c7d2..1845aac 100755 --- a/install.zsh +++ b/install.zsh @@ -100,6 +100,10 @@ function at-repos-pull() { echo $repo if [ -d $d/repos/${repo##*/} ];then cd $d/repos/${repo##*/} + # Clean up before pull: reset changes, remove .orig files and untracked patch-created files + git checkout -- . + find . -name "*.orig" -type f -delete 2>/dev/null + git clean -fd 2>/dev/null git stash -u if ! git pull;then rm -rf $d/repos/${repo##*/} 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/011-social-app-ios-splash-license-footer.patch b/ios/patching/011-social-app-ios-splash-license-footer.patch index ade2b21..a127fa0 100644 --- a/ios/patching/011-social-app-ios-splash-license-footer.patch +++ b/ios/patching/011-social-app-ios-splash-license-footer.patch @@ -1,8 +1,24 @@ +diff --git a/src/routes.ts b/src/routes.ts +--- a/src/routes.ts ++++ b/src/routes.ts +@@ -74,6 +74,7 @@ export const router = new Router({ + PrivacyPolicy: 'https://syu.is/about/support/privacy-policy', + TermsOfService: 'https://syu.is/about/support/tos', + CommunityGuidelines: '/support/community-guidelines', ++ License: 'https://syu.is/about/support/license', + CopyrightPolicy: '/support/copyright', + // hashtags + Hashtag: '/hashtag/:tag', diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen.tsx -index 3442d1bdf..dd2d1fdfb 100644 --- a/src/view/com/auth/SplashScreen.tsx +++ b/src/view/com/auth/SplashScreen.tsx -@@ -40,16 +40,6 @@ export const SplashScreen = ({ +@@ -1,4 +1,5 @@ + import {View} from 'react-native' ++import {Pressable, Linking} from 'react-native' + import Animated, {FadeIn, FadeOut} from 'react-native-reanimated' + import {useSafeAreaInsets} from 'react-native-safe-area-context' + import {msg, Trans} from '@lingui/macro' +@@ -40,16 +41,6 @@ export const SplashScreen = ({ @@ -19,20 +35,24 @@ index 3442d1bdf..dd2d1fdfb 100644 -+ -+ -+ © syui -+ ++ ++ Linking.openURL('https://syu.is/about/support/license')}> ++ ++ License ++ ++ ++ ++ ++ © syui + @@ -40,13 +60,10 @@ index 3442d1bdf..dd2d1fdfb 100644 diff --git a/src/view/com/auth/SplashScreen.web.tsx b/src/view/com/auth/SplashScreen.web.tsx --- a/src/view/com/auth/SplashScreen.web.tsx +++ b/src/view/com/auth/SplashScreen.web.tsx -@@ -91,15 +91,6 @@ export const SplashScreen = ({ - {!kawaii && ( - - +@@ -94,14 +94,6 @@ export const SplashScreen = ({ )} -- + - { -- const soundFiles = ['dm.aiff'] -+ const soundFiles = [] - - return withPlugins(config, [ - // IOS diff --git a/plugins/withCodeSignEntitlements.js b/plugins/withCodeSignEntitlements.js new file mode 100644 index 000000000..b03b6bd68 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() {