Skip to content

Commit

Permalink
Merge pull request #49 from PCS-Poli-USP/develop
Browse files Browse the repository at this point in the history
Fix keyboard problem in IOS version
  • Loading branch information
danyama authored Oct 22, 2024
2 parents 80e2026 + ee1ad34 commit c073d69
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 39 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,4 @@ jobs:
- name: Build
run: >
EXPO_APPLE_APP_SPECIFIC_PASSWORD=${{ secrets.EAS_APPLE_APP_SPECIFIC_PASSWORD }}
EXPO_PUBLIC_WEB_CLIENT_ID=${{ vars.EXPO_PUBLIC_WEB_CLIENT_ID }}
EXPO_PUBLIC_IOS_CLIENT_ID=${{ vars.EXPO_PUBLIC_IOS_CLIENT_ID }}
EXPO_PUBLIC_IOS_URL_SCHEME=${{ vars.EXPO_PUBLIC_IOS_URL_SCHEME }}
EXPO_PUBLIC_AUTH_EMAIL_DOMAIN=${{ vars.EXPO_PUBLIC_IOS_URL_SCHEME }}
eas build --platform all --profile production --non-interactive --auto-submit-with-profile=preview --no-wait
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ O aplicativo oficial da faculdade para consulta de salas de aula, matérias e ma
```bash
npm install
```
4. Obtenha o .env (no drive de desenvolvedores do USPolis) ou obtenha as credenciais necessárias para o [Google Authentication](https://react-native-google-signin.github.io/docs/setting-up/get-config-file) (sem Firebase)
5. Inicie o projeto:
4. Obtenha o .env (no drive de desenvolvedores do USPolis) ou obtenha as credenciais necessárias para o [Google Authentication](https://react-native-google-signin.github.io/docs/setting-up/get-config-file) (sem Firebase)
5. O uso da biblioteca de Google Sign-in React Native necessita de arquivos nativos de cada plataforma, para gerar e rodar a versão nativa:
```bash
npx expo prebuild --clean
npx expo run:android && npx expo run:ios
```
6. Inicie o projeto:
```bash
npm start
```
Expand Down Expand Up @@ -60,11 +66,16 @@ src/
- 🖼️ **UI/UX**: `react-native-modal`, `react-native-toast-message`
- 📦 **Armazenamento**: `@react-native-async-storage/async-storage`
- 📝 **Validação**: `yup`, `react-hook-form`
- 👤 **Perfil/Login**: `@react-native-google-signin/google-signin`

> ⚠️ Nota: Estamos transitando de `native-base` para `@shopify/restyle` para estilização. Por favor, evite usar `native-base` em novos desenvolvimentos.

## Deploy para as Lojas

O projeto está configurado para utilizar o GitHub Actions e a plataforma Expo para criar a build e submeter os arquivos às lojas em modo draft ou teste. Para isso basta abrir um PR, revisá-lo, aprová-lo e fazer o merge com a branch `main`.

## Deploy para as Lojas Manual

### Android

A fim de realizar o deploy para a loja do android, os seguintes passos devem ser seguidos:
Expand Down
28 changes: 0 additions & 28 deletions app.config.tsx

This file was deleted.

23 changes: 19 additions & 4 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,25 @@
],
"ios": {
"supportsTablet": true,
"buildNumber": "27",
"bundleIdentifier": "Lunadros.Uspolis"
"buildNumber": "31",
"bundleIdentifier": "Lunadros.Uspolis",
"infoPlist": {
"CFBundleURLTypes": [
{
"CFBundleURLSchemes": [
"com.googleusercontent.apps.xxx"
]
}
]
}
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "uspolis.lunadros",
"versionCode": 79
"versionCode": 81
},
"web": {
"favicon": "./assets/favicon.png"
Expand All @@ -43,7 +52,13 @@
}
},
"plugins": [
"expo-font"
"expo-font",
[
"@react-native-google-signin/google-signin",
{
"iosUrlScheme": "com.googleusercontent.apps.370044874397-rbq7vv4d9sgorj4boso4i5nohn5u3mc1"
}
]
]
}
}
2 changes: 2 additions & 0 deletions src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Theme } from '@/theme/theme'
import { useTheme } from '@shopify/restyle'
import React from 'react'
import { useEffect } from 'react'
import { BackHandler } from 'react-native'
import ModalComponent from 'react-native-modal'
Expand Down Expand Up @@ -40,6 +41,7 @@ export const Modal = ({
onSwipeComplete={() => onClose(false)}
coverScreen
style={{ margin: 0 }}
avoidKeyboard
>
{children}
</ModalComponent>
Expand Down
2 changes: 1 addition & 1 deletion src/contexts/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import api from '@/services/api';
import { EXPO_PUBLIC_AUTH_EMAIL_DOMAIN, EXPO_PUBLIC_IOS_CLIENT_ID, EXPO_PUBLIC_WEB_CLIENT_ID } from '@env';
import { GoogleSignin } from '@react-native-google-signin/google-signin';
import { type AxiosResponse } from 'axios';
import React, { useEffect, useState } from 'react'
import React, { useEffect } from 'react'
import { createContext, useReducer } from 'react'

type GAuthState = {
Expand Down

0 comments on commit c073d69

Please sign in to comment.