Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPad #301

Merged
merged 43 commits into from
Dec 11, 2024
Merged

iPad #301

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0191c2f
feat: set up tablet version with capacitor
siandreev Nov 6, 2024
c4a753c
Merge branch 'main' into feature/ipad
siandreev Nov 18, 2024
4d86bf4
chore: set up tablet live reload
siandreev Nov 18, 2024
bd1fb4e
chore: add capacitor app and open page method
siandreev Nov 18, 2024
f3975c4
chore: build script
siandreev Nov 18, 2024
5a7ffcb
feat: ios biometrics plugin
siandreev Nov 18, 2024
b137d96
feat: ios keychain plugin
siandreev Nov 18, 2024
58ecdb7
fix: cors & cookies
siandreev Nov 18, 2024
6eb92c8
feat: implement ton connect for tablet
siandreev Dec 3, 2024
55d44cf
fix: make QR reader prefer back camera
siandreev Dec 3, 2024
ec55652
fix: ios secure storage plugin:
siandreev Dec 3, 2024
61bdf22
fix: ios app config updates
siandreev Dec 3, 2024
1875994
Merge branch 'main' into feature/ipad
KuznetsovNikita Dec 3, 2024
dc7c8bf
Update lock
KuznetsovNikita Dec 3, 2024
f46fa46
Update app
KuznetsovNikita Dec 3, 2024
97280fb
Init Ci/CD
KuznetsovNikita Dec 3, 2024
6a339a2
Update spaces
KuznetsovNikita Dec 3, 2024
0a834ce
Update version + command
KuznetsovNikita Dec 3, 2024
b6fe31c
Gemfile lock
KuznetsovNikita Dec 3, 2024
7fd126e
Update cert
KuznetsovNikita Dec 4, 2024
e4ce022
remove Playwright cache
KuznetsovNikita Dec 4, 2024
6dd8fbc
fix: ios app images
siandreev Dec 4, 2024
5e67f76
fix: add aptbase and hide content functionality
siandreev Dec 4, 2024
580a97e
fix: app icons
siandreev Dec 5, 2024
2a2d4e7
fix: update app icon
siandreev Dec 5, 2024
f641b02
feat: initialize push notifications; add pull to refresh
siandreev Dec 6, 2024
18a3995
Update profile
KuznetsovNikita Dec 7, 2024
dc5247a
live false
KuznetsovNikita Dec 7, 2024
a3fd20e
initial_build_number
KuznetsovNikita Dec 7, 2024
eaa7ab0
Update config
KuznetsovNikita Dec 7, 2024
82613ff
Add keys
KuznetsovNikita Dec 7, 2024
6331c72
Add NSPhotoLibraryUsageDescription
KuznetsovNikita Dec 8, 2024
a1a970a
Remove apple vision distribution
KuznetsovNikita Dec 8, 2024
f392898
create_changelog
KuznetsovNikita Dec 8, 2024
1bccaa4
deliver => pilot
KuznetsovNikita Dec 8, 2024
443b713
Clean-up
KuznetsovNikita Dec 8, 2024
aa516ec
feat: push notifications for iPad
siandreev Dec 9, 2024
5e574cf
fix: scroll in modals on iPad
siandreev Dec 10, 2024
7f4556e
fix: notifications fix
siandreev Dec 10, 2024
ea5025b
fix: history and swaps page on iPad
siandreev Dec 10, 2024
b89638c
fix: disable text selection on iPad
siandreev Dec 10, 2024
2165ee1
fix: add copy button to recovery page
siandreev Dec 10, 2024
72d5c2b
fix: global iPad styles added
siandreev Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions .github/workflows/ipad-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Tonkeeper iPad Build
on:
workflow_call:
secrets:
APP_STORE_CONNECT_TEAM_ID:
required: true
APPLE_API_ISSUER:
required: true
APPLE_API_KEY:
required: true
APPLE_API_KEY_ID:
required: true
BUILD_CERTIFICATE_BASE64:
required: true
BUILD_CERTIFICATE_PASSPHRASE:
required: true
BUILD_PROVISION_PROFILE_BASE64:
required: true
REACT_APP_MEASUREMENT_ID:
required: true
VITE_APP_APTABASE:
required: true
REACT_APP_TG_BOT_ID:
required: true
REACT_APP_STONFI_REFERRAL_ADDRESS:
required: true
env:
node-version: 20.18.1
ruby-version: 3.3.6

jobs:
ipad-build:
name: ipad-build
runs-on: macos-15
timeout-minutes: 20

steps:
- name: Checkout to git repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}

- name: Pods cache
uses: actions/cache@v4
with:
path: ./apps/tablet/ios/App/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-

- name: Set up Ruby and Gemfile dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby-version }}
bundler-cache: true
working-directory: './apps/tablet'

- name: Enable Corepack
run: |
corepack enable

- name: Yarn cache
uses: actions/cache@v4
with:
path: ./.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Run install
uses: borales/actions-yarn@v5
with:
cmd: install

- name: Install pods dependencies
working-directory: ./apps/tablet/ios/App
run: bundle exec pod install

- name: Run build js and capacitor
uses: borales/actions-yarn@v5
env:
VITE_APP_AMPLITUDE: ''
VITE_APP_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
VITE_APP_APTABASE: ${{ secrets.VITE_APP_APTABASE }}
VITE_APP_APTABASE_HOST: https://anonymous-analytics.tonkeeper.com
VITE_APP_LOCALES: en,zh_TW,zh_CN,id,ru,it,es,uk,tr,bg,uz,bn
VITE_APP_TONCONSOLE_HOST: https://pro.tonconsole.com
VITE_APP_TG_BOT_ID: ${{ secrets.REACT_APP_TG_BOT_ID }}
VITE_APP_STONFI_REFERRAL_ADDRESS: ${{ secrets.REACT_APP_STONFI_REFERRAL_ADDRESS }}
with:
cmd: build:ipad

- name: Build & upload iOS binary
working-directory: ./apps/tablet
run: bundle exec fastlane ios beta
env:
APP_STORE_CONNECT_TEAM_ID: ${{ secrets.APP_STORE_CONNECT_TEAM_ID }}
BUNDLE_IDENTIFIER: com.tonapps.tonkeeperpro
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.BUILD_CERTIFICATE_PASSPHRASE }}
APPLE_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_ISSUER_ID: ${{ secrets.APPLE_API_ISSUER }}
APPLE_KEY_CONTENT: ${{ secrets.APPLE_API_KEY }}
APPLE_PROFILE_NAME: GitHub CI/CD iPad
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}

- name: Upload logs to artifacts
uses: actions/upload-artifact@v3
if: failure()
with:
name: gum-logs
path: /Users/runner/Library/Logs/gym/*.log

- name: Summary
run: |
echo '### Successful iPad build 🚀🚀🚀' >> $GITHUB_STEP_SUMMARY
echo 'Well done!' >> $GITHUB_STEP_SUMMARY
echo 'The app with build version: ${{ env.VERSION_CODE }}(${{ env.BUILD_CODE }})' >> $GITHUB_STEP_SUMMARY
echo 'Uploaded to TestFlight' >> $GITHUB_STEP_SUMMARY

- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
if: github.event_name == 'pull_request'
with:
message: |
### Successful iPad build 🚀🚀🚀
Well done!
The app with build version: ${{ env.VERSION_CODE }}(${{ env.BUILD_CODE }})
Uploaded to TestFlight
comment-tag: ipad_build
28 changes: 28 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ jobs:
p12-file-base64: ${{ secrets.IDENTITY_P12_B64 }}
p12-password: ${{ secrets.IDENTITY_PASSPHRASE }}

- name: Yarn cache
uses: actions/cache@v4
with:
path: ./.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Run install
uses: borales/actions-yarn@v5
with:
Expand Down Expand Up @@ -144,6 +152,14 @@ jobs:
run: |
corepack enable

- name: Yarn cache
uses: actions/cache@v4
with:
path: ./.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Run install
uses: borales/actions-yarn@v5
with:
Expand Down Expand Up @@ -205,6 +221,14 @@ jobs:
run: |
corepack enable

- name: Yarn cache
uses: actions/cache@v4
with:
path: ./.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Run install
uses: borales/actions-yarn@v5
with:
Expand Down Expand Up @@ -235,6 +259,10 @@ jobs:
path: |
${{ github.workspace }}/apps/extension/dist/firefox

ipad-build:
uses: ./.github/workflows/ipad-build.yaml
secrets: inherit

web-tests:
needs: web-build
uses: ./.github/workflows/web-tests.yaml
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/web-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
run: |
corepack enable

- name: Yarn cache
uses: actions/cache@v4
with:
path: ./.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Run install
uses: borales/actions-yarn@v5
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/web-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ jobs:
run: |
corepack enable

- name: Yarn cache
uses: actions/cache@v4
with:
path: ./.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Run install
uses: borales/actions-yarn@v5
with:
Expand Down
6 changes: 2 additions & 4 deletions apps/desktop/src/app/components/TonConnectSubscription.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
useResponseSendMutation,
SendTransactionAppRequest
} from '@tonkeeper/uikit/dist/components/connect/connectHook';
import { useResponseSendMutation } from '@tonkeeper/uikit/dist/components/connect/connectHook';
import { TonTransactionNotification } from '@tonkeeper/uikit/dist/components/connect/TonTransactionNotification';
import { useSendNotificationAnalytics } from '@tonkeeper/uikit/dist/hooks/amplitude';
import { useCallback, useEffect, useState } from 'react';
Expand All @@ -10,6 +7,7 @@ import {
useDisconnectTonConnectApp
} from '@tonkeeper/uikit/dist/state/tonConnect';
import { sendBackground } from '../../libs/backgroudService';
import { SendTransactionAppRequest } from '@tonkeeper/core/dist/entries/tonConnect';

export const TonConnectSubscription = () => {
const [request, setRequest] = useState<SendTransactionAppRequest | undefined>(undefined);
Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/src/electron/background.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { shell, systemPreferences, app } from 'electron';
import keytar from 'keytar';
import { Message } from '../libs/message';
import { TonConnectSSE } from './sseEvetns';
import { mainStorage } from './storageService';
import { cookieJar } from './cookie';
import { tonConnectSSE } from './sseEvetns';

const service = 'tonkeeper.com';

Expand All @@ -30,9 +30,9 @@ export const handleBackgroundMessage = async (message: Message): Promise<unknown
case 'get-keychain':
return await keytar.getPassword(service, `Wallet-${message.publicKey}`);
case 'reconnect':
return await TonConnectSSE.getInstance().reconnect();
return await tonConnectSSE.reconnect();
case 'ton-connect-send-disconnect':
return await TonConnectSSE.getInstance().sendDisconnect(message.connection);
return await tonConnectSSE.sendDisconnect(message.connection);
case 'can-prompt-touch-id':
try {
return !!systemPreferences?.canPromptTouchID?.();
Expand Down
Loading
Loading