Skip to content

Commit ccb9e14

Browse files
authored
App polish for 2.9 rd1 (#1359)
* add useSafeBottomPadding * add bottom padding to dev screen * use safe bottom padding * skip uploading if building android bundle locally * fix tests * cache fix script * clean up country picker, fix font color * sort package jsons, add watcher for mobile sdk * formatting * only bump versions for successfull builds * move all css * cleaner script * kill watchers before starting new one
1 parent 394668e commit ccb9e14

24 files changed

+240
-158
lines changed

.gitguardian.yml

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -52,41 +52,40 @@ secrets-ignore:
5252
- "RSA Private Key" # For mock RSA keys
5353
- "EC Private Key" # For mock EC keys
5454

55-
5655
secret:
5756
ignored_matches:
58-
- match: 2036b4e50ad3042969b290e354d9864465107a14de6f5a36d49f81ea8290def8
59-
name: prebuilt-ios-arm64-apple-ios.private.swiftinterface
57+
- match: 2036b4e50ad3042969b290e354d9864465107a14de6f5a36d49f81ea8290def8
58+
name: prebuilt-ios-arm64-apple-ios.private.swiftinterface
6059
ignored_paths:
61-
- '**/*.swiftinterface'
62-
- '**/*.xcframework/**'
63-
- '**/packages/mobile-sdk-alpha/ios/Frameworks/**'
64-
- '**/OpenSSL.xcframework/**'
65-
- '**/demo-app/**/mock/**'
66-
- common/src/mock_certificates/aadhaar/mockAadhaarCert.ts
67-
- '**/NFCPassportReader.xcframework/**'
68-
- common/src/utils/passports/genMockIdDoc.ts
69-
- '**/tests/**/*.crt'
70-
- '**/mock_certificates/**/*.crt'
71-
- '**/mock_certificates/**/*.key'
72-
- '**/demo-app/**/test-data/**'
73-
- '**/generated/**/*.key'
74-
- '**/SelfSDK.xcframework/**'
75-
- '**/mock/**/*.crt'
76-
- '**/generated/**/*.crt'
77-
- '**/test/**/*.key'
78-
- '**/mock/**/*.key'
79-
- '**/test/**/*.crt'
80-
- '**/test/**/*.pem'
81-
- '**/constants/mockCertificates.ts'
82-
- '**/mock/**/*.pem'
83-
- '**/mock_certificates/**/*.pem'
84-
- '**/mock-data/**'
85-
- '**/packages/mobile-sdk-alpha/ios/SelfSDK/**'
86-
- '**/tests/**/*.key'
87-
- '**/generated/**/*.pem'
88-
- '**/tests/**/*.pem'
89-
- '**/test-data/**'
90-
- common/src/mock_certificates/**
91-
- '**/*.xcframework'
60+
- "**/*.swiftinterface"
61+
- "**/*.xcframework/**"
62+
- "**/packages/mobile-sdk-alpha/ios/Frameworks/**"
63+
- "**/OpenSSL.xcframework/**"
64+
- "**/demo-app/**/mock/**"
65+
- common/src/mock_certificates/aadhaar/mockAadhaarCert.ts
66+
- "**/NFCPassportReader.xcframework/**"
67+
- common/src/utils/passports/genMockIdDoc.ts
68+
- "**/tests/**/*.crt"
69+
- "**/mock_certificates/**/*.crt"
70+
- "**/mock_certificates/**/*.key"
71+
- "**/demo-app/**/test-data/**"
72+
- "**/generated/**/*.key"
73+
- "**/SelfSDK.xcframework/**"
74+
- "**/mock/**/*.crt"
75+
- "**/generated/**/*.crt"
76+
- "**/test/**/*.key"
77+
- "**/mock/**/*.key"
78+
- "**/test/**/*.crt"
79+
- "**/test/**/*.pem"
80+
- "**/constants/mockCertificates.ts"
81+
- "**/mock/**/*.pem"
82+
- "**/mock_certificates/**/*.pem"
83+
- "**/mock-data/**"
84+
- "**/packages/mobile-sdk-alpha/ios/SelfSDK/**"
85+
- "**/tests/**/*.key"
86+
- "**/generated/**/*.pem"
87+
- "**/tests/**/*.pem"
88+
- "**/test-data/**"
89+
- common/src/mock_certificates/**
90+
- "**/*.xcframework"
9291
version: 2

.github/workflows/mobile-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
with:
7777
cache-version: ${{ env.GH_CACHE_VERSION }}-${{ env.NODE_VERSION_SANITIZED }}
7878
- name: Build dependencies (cache miss)
79-
# Temporarily disabled due to `yarn types` failures when cache is used.
79+
# Temporarily disabled due to `yarn types` failures when cache is used.
8080
# if: steps.built-deps.outputs.cache-hit != 'true'
8181
run: |
8282
echo "Cache miss for built dependencies. Building now..."

.github/workflows/mobile-deploy.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,17 +1276,21 @@ jobs:
12761276
const version = JSON.parse(fs.readFileSync('version.json', 'utf8'));
12771277
const timestamp = new Date().toISOString();
12781278
1279-
version.ios.build = $IOS_BUILD;
1280-
version.android.build = $ANDROID_BUILD;
1281-
1282-
// Update lastDeployed timestamp for successful builds
1279+
// Only bump build numbers for successful builds
12831280
if ('$IOS_SUCCESS' === 'success') {
1281+
version.ios.build = $IOS_BUILD;
12841282
version.ios.lastDeployed = timestamp;
1285-
console.log('✅ Updated iOS lastDeployed timestamp');
1283+
console.log('✅ Updated iOS build number to $IOS_BUILD and lastDeployed timestamp');
1284+
} else {
1285+
console.log('⏭️ Skipped iOS build number bump (build did not succeed)');
12861286
}
1287+
12871288
if ('$ANDROID_SUCCESS' === 'success') {
1289+
version.android.build = $ANDROID_BUILD;
12881290
version.android.lastDeployed = timestamp;
1289-
console.log('✅ Updated Android lastDeployed timestamp');
1291+
console.log('✅ Updated Android build number to $ANDROID_BUILD and lastDeployed timestamp');
1292+
} else {
1293+
console.log('⏭️ Skipped Android build number bump (build did not succeed)');
12901294
}
12911295
12921296
fs.writeFileSync('version.json', JSON.stringify(version, null, 2) + '\n');

.github/workflows/mobile-sdk-demo-e2e.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ jobs:
319319
echo "::add-mask::${SELFXYZ_INTERNAL_REPO_PAT}"
320320
fi
321321
cd packages/mobile-sdk-demo/ios
322-
pod install
322+
echo "📦 Installing pods via cache-fix script…"
323+
bash scripts/pod-install-with-cache-fix.sh
323324
env:
324325
SELFXYZ_INTERNAL_REPO_PAT: ${{ secrets.SELFXYZ_INTERNAL_REPO_PAT }}
325326
GIT_TERMINAL_PROMPT: 0

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- "sdk/core/package.json"
99
- "sdk/qrcode/package.json"
1010
- "common/package.json"
11-
- 'packages/mobile-sdk-alpha/package.json'
11+
- "packages/mobile-sdk-alpha/package.json"
1212
- "sdk/qrcode-angular/package.json"
1313
- "contracts/package.json"
1414
workflow_dispatch:

app/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GEM
2525
artifactory (3.0.17)
2626
atomos (0.1.3)
2727
aws-eventstream (1.4.0)
28-
aws-partitions (1.1179.0)
28+
aws-partitions (1.1181.0)
2929
aws-sdk-core (3.236.0)
3030
aws-eventstream (~> 1, >= 1.3.0)
3131
aws-partitions (~> 1, >= 1.992.0)
@@ -37,7 +37,7 @@ GEM
3737
aws-sdk-kms (1.116.0)
3838
aws-sdk-core (~> 3, >= 3.234.0)
3939
aws-sigv4 (~> 1.5)
40-
aws-sdk-s3 (1.202.0)
40+
aws-sdk-s3 (1.203.0)
4141
aws-sdk-core (~> 3, >= 3.234.0)
4242
aws-sdk-kms (~> 1)
4343
aws-sigv4 (~> 1.5)

app/fastlane/Fastfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,14 @@ platform :android do
306306
skip_upload = options[:skip_upload] == true || options[:skip_upload] == "true"
307307
version_bump = options[:version_bump] || "build"
308308

309+
# Automatically skip uploads in local development (no local permissions for Play Store)
310+
# Uploads must be done by CI/CD machines with proper authentication
311+
if local_development && !skip_upload
312+
skip_upload = true
313+
UI.important("🏠 LOCAL DEVELOPMENT: Automatically skipping Play Store upload")
314+
UI.important(" Uploads require CI/CD machine permissions and will be handled automatically")
315+
end
316+
309317
if local_development
310318
if ENV["ANDROID_KEYSTORE_PATH"].nil?
311319
ENV["ANDROID_KEYSTORE_PATH"] = Fastlane::Helpers.android_create_keystore(android_keystore_path)

app/jest.config.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ module.exports = {
3030
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/index.cjs',
3131
'^@selfxyz/mobile-sdk-alpha/components$':
3232
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/components/index.cjs',
33+
'^@selfxyz/mobile-sdk-alpha/hooks$':
34+
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/hooks/index.cjs',
3335
'^@selfxyz/mobile-sdk-alpha/onboarding/(.*)$':
3436
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/flows/onboarding/$1.cjs',
3537
'^@selfxyz/mobile-sdk-alpha/disclosing/(.*)$':

app/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"release:patch": "./scripts/release.sh patch",
5151
"setup": "yarn clean:build && yarn install && yarn build:deps && yarn setup:android-deps && cd ios && bundle install && bundle exec pod install --repo-update && cd .. && yarn clean:xcode-env-local",
5252
"setup:android-deps": "node scripts/setup-private-modules.cjs",
53-
"start": "watchman watch-del-all && react-native start",
54-
"start:clean": "watchman watch-del-all && cd android && ./gradlew clean && cd .. && react-native start --reset-cache",
53+
"start": "watchman watch-del-all && yarn watch:sdk & react-native start",
54+
"start:clean": "watchman watch-del-all && cd android && ./gradlew clean && cd .. && yarn watch:sdk & react-native start --reset-cache",
5555
"sync-versions": "bundle exec fastlane ios sync_version && bundle exec fastlane android sync_version",
5656
"tag:release": "node scripts/tag.cjs release",
5757
"tag:remove": "node scripts/tag.cjs remove",
@@ -66,6 +66,7 @@
6666
"test:tree-shaking": "node ./scripts/test-tree-shaking.cjs",
6767
"test:web-build": "jest tests/web-build-render.test.ts --testTimeout=180000",
6868
"types": "tsc --noEmit",
69+
"watch:sdk": "yarn workspace @selfxyz/mobile-sdk-alpha watch",
6970
"web": "vite",
7071
"web:build": "yarn build:deps && vite build",
7172
"web:preview": "vite preview"

app/src/screens/dev/DevSettingsScreen.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import { useNavigation } from '@react-navigation/native';
1717
import type { NativeStackScreenProps } from '@react-navigation/native-stack';
1818
import { Check, ChevronDown, ChevronRight } from '@tamagui/lucide-icons';
1919

20+
import { useSafeBottomPadding } from '@selfxyz/mobile-sdk-alpha/hooks';
21+
2022
import BugIcon from '@/images/icons/bug_icon.svg';
2123
import IdIcon from '@/images/icons/id_icon.svg';
2224
import WarningIcon from '@/images/icons/warning.svg';
@@ -295,6 +297,7 @@ const DevSettingsScreen: React.FC<DevSettingsScreenProps> = ({}) => {
295297
const subscribedTopics = useSettingStore(state => state.subscribedTopics);
296298
const [hasNotificationPermission, setHasNotificationPermission] =
297299
useState(false);
300+
const paddingBottom = useSafeBottomPadding(20);
298301

299302
// Check notification permissions on mount
300303
useEffect(() => {
@@ -466,6 +469,7 @@ const DevSettingsScreen: React.FC<DevSettingsScreenProps> = ({}) => {
466469
flex={1}
467470
paddingHorizontal="$4"
468471
paddingTop="$4"
472+
paddingBottom={paddingBottom}
469473
>
470474
<ParameterSection
471475
icon={<IdIcon />}

0 commit comments

Comments
 (0)