fix social-app ios patch
This commit is contained in:
20
README.md
20
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
|
||||
|
||||
@@ -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##*/}
|
||||
|
||||
@@ -91,3 +91,8 @@ https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/LICE
|
||||
|
||||
2. 年齢保証、年齢確認ページがでてくるのを削除。誕生日を入力する処理を削除。アプリ配布国は限定します。
|
||||
|
||||
## 追加
|
||||
|
||||
1. 生年月日をサインイン時に要求しないよう削除
|
||||
2. 検索で、Discoverを表示しない
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ else
|
||||
echo "⚠️ Warning: $ASSETS_DIR not found"
|
||||
fi
|
||||
|
||||
function cleanup_build {
|
||||
# 2. Prebuild (Generate ios directory)
|
||||
echo "2. Running Expo Prebuild..."
|
||||
# Clean old ios folder to remove old entitlements/AppClip targets
|
||||
@@ -64,6 +65,13 @@ fi
|
||||
|
||||
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
|
||||
|
||||
@@ -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<AllNavigatableRoutes>({
|
||||
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 = ({
|
||||
<View style={[a.pb_sm, a.pt_5xl]}>
|
||||
<Logotype width={161} fill={t.atoms.text.color} />
|
||||
</View>
|
||||
@@ -19,20 +35,24 @@ index 3442d1bdf..dd2d1fdfb 100644
|
||||
</View>
|
||||
|
||||
<View
|
||||
@@ -92,6 +82,17 @@ export const SplashScreen = ({
|
||||
@@ -102,6 +93,21 @@ export const SplashScreen = ({
|
||||
<AppLanguageDropdown />
|
||||
</View>
|
||||
</View>
|
||||
+ <View
|
||||
+ <View style={[a.pb_sm, a.justify_center, a.align_center]}>
|
||||
+ <Pressable onPress={() => Linking.openURL('https://syu.is/about/support/license')}>
|
||||
+ <Text
|
||||
+ style={[
|
||||
+ a.px_lg,
|
||||
+ a.pb_xl,
|
||||
+ a.justify_center,
|
||||
+ a.align_center,
|
||||
+ a.text_xs,
|
||||
+ t.atoms.text_contrast_low,
|
||||
+ {textDecorationLine: 'underline'},
|
||||
+ ]}>
|
||||
+ <Text style={[a.text_xs, t.atoms.text_contrast_low]}>
|
||||
+ © syui
|
||||
+ License
|
||||
+ </Text>
|
||||
+ </Pressable>
|
||||
+ </View>
|
||||
+ <View style={[a.pb_xl, a.justify_center, a.align_center]}>
|
||||
+ <Text style={[a.text_xs, t.atoms.text_contrast_low]}>© syui</Text>
|
||||
+ </View>
|
||||
<View style={{height: insets.bottom}} />
|
||||
</ErrorBoundary>
|
||||
@@ -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 && (
|
||||
<View style={[a.pb_sm, a.pt_5xl]}>
|
||||
<Logotype width={161} fill={t.atoms.text.color} />
|
||||
@@ -94,14 +94,6 @@ export const SplashScreen = ({
|
||||
</View>
|
||||
)}
|
||||
-
|
||||
|
||||
- <Text
|
||||
- style={[
|
||||
- a.text_md,
|
||||
|
||||
@@ -1,16 +1,3 @@
|
||||
diff --git a/plugins/notificationsExtension/withNotificationsExtension.js b/plugins/notificationsExtension/withNotificationsExtension.js
|
||||
index 6a00cfd23..f91decc08 100644
|
||||
--- a/plugins/notificationsExtension/withNotificationsExtension.js
|
||||
+++ b/plugins/notificationsExtension/withNotificationsExtension.js
|
||||
@@ -10,7 +10,7 @@ const EXTENSION_NAME = 'BlueskyNSE'
|
||||
const EXTENSION_CONTROLLER_NAME = 'NotificationService'
|
||||
|
||||
const withNotificationsExtension = config => {
|
||||
- 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
|
||||
|
||||
101
ios/patching/027-social-app-ios-remove-birthdate.patch
Normal file
101
ios/patching/027-social-app-ios-remove-birthdate.patch
Normal file
@@ -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<TextInput>(null)
|
||||
const passwordInputRef = useRef<TextInput>(null)
|
||||
- const birthdateInputRef = useRef<DateFieldRef>(null)
|
||||
|
||||
const [hasWarnedEmail, setHasWarnedEmail] = React.useState<boolean>(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;"
|
||||
/>
|
||||
</TextField.Root>
|
||||
</View>
|
||||
- <View>
|
||||
- <DateField.LabelText>
|
||||
- <Trans>Your birth date</Trans>
|
||||
- </DateField.LabelText>
|
||||
- <DateField.DateField
|
||||
- testID="date"
|
||||
- inputRef={birthdateInputRef}
|
||||
- value={state.dateOfBirth}
|
||||
- onChangeDate={date => {
|
||||
- dispatch({
|
||||
- type: 'setDateOfBirth',
|
||||
- value: sanitizeDate(new Date(date)),
|
||||
- })
|
||||
- }}
|
||||
- label={_(msg`Date of birth`)}
|
||||
- accessibilityHint={_(msg`Select your date of birth`)}
|
||||
- maximumDate={new Date()}
|
||||
- />
|
||||
- </View>
|
||||
<Policies
|
||||
serviceDescription={state.serviceDescription}
|
||||
- needsGuardian={!is18(state.dateOfBirth)}
|
||||
- under13={!is13(state.dateOfBirth)}
|
||||
+ needsGuardian={false}
|
||||
+ under13={false}
|
||||
/>
|
||||
</>
|
||||
) : undefined}
|
||||
</View>
|
||||
<BackNextButtons
|
||||
- hideNext={!is13(state.dateOfBirth)}
|
||||
+ hideNext={false}
|
||||
showRetry={isServerError}
|
||||
isLoading={state.isLoading}
|
||||
onBackPress={onPressBack}
|
||||
16
ios/patching/028-social-app-ios-remove-discover-feeds.patch
Normal file
16
ios/patching/028-social-app-ios-remove-discover-feeds.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
diff --git a/src/screens/Search/Explore.tsx b/src/screens/Search/Explore.tsx
|
||||
--- a/src/screens/Search/Explore.tsx
|
||||
+++ b/src/screens/Search/Explore.tsx
|
||||
@@ -687,12 +687,7 @@ export function Explore({
|
||||
|
||||
if (useFullExperience) {
|
||||
i.push(trendingTopicsModule)
|
||||
- i.push(...suggestedFeedsModule)
|
||||
- i.push(...suggestedFollowsModule)
|
||||
- i.push(...suggestedStarterPacksModule)
|
||||
i.push(...feedPreviewsModule)
|
||||
- } else {
|
||||
- i.push(...suggestedFollowsModule)
|
||||
}
|
||||
|
||||
return i
|
||||
84
ios/patching/029-social-app-ios-remove-feeds-discover.patch
Normal file
84
ios/patching/029-social-app-ios-remove-feeds-discover.patch
Normal file
@@ -0,0 +1,84 @@
|
||||
diff --git a/src/view/screens/Feeds.tsx b/src/view/screens/Feeds.tsx
|
||||
--- a/src/view/screens/Feeds.tsx
|
||||
+++ b/src/view/screens/Feeds.tsx
|
||||
@@ -288,80 +288,7 @@ export function FeedsScreen(_props: Props) {
|
||||
}
|
||||
}
|
||||
|
||||
- if (!hasSession || (hasSession && canShowDiscoverSection)) {
|
||||
- slices.push({
|
||||
- key: 'popularFeedsHeader',
|
||||
- type: 'popularFeedsHeader',
|
||||
- })
|
||||
|
||||
- if (popularFeedsError || searchError) {
|
||||
- slices.push({
|
||||
- key: 'popularFeedsError',
|
||||
- type: 'error',
|
||||
- error: cleanError(
|
||||
- popularFeedsError?.toString() ?? searchError?.toString() ?? '',
|
||||
- ),
|
||||
- })
|
||||
- } else {
|
||||
- if (isUserSearching) {
|
||||
- if (isSearchPending || !searchResults) {
|
||||
- slices.push({
|
||||
- key: 'popularFeedsLoading',
|
||||
- type: 'popularFeedsLoading',
|
||||
- })
|
||||
- } else {
|
||||
- if (!searchResults || searchResults?.length === 0) {
|
||||
- slices.push({
|
||||
- key: 'popularFeedsNoResults',
|
||||
- type: 'popularFeedsNoResults',
|
||||
- })
|
||||
- } else {
|
||||
- slices = slices.concat(
|
||||
- searchResults.map(feed => ({
|
||||
- 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,
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user