blob: b4930886d6dd16f9998a180c314245da09860cf4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# CAS4 mobile app
<img src="https://avatars.githubusercontent.com/u/175958109?s=100&v=4" alt="Logo" align="right"/>
This repo refers to a React Native mobile app used for a project for the
[Context Aware System](https://www.unibo.it/en/study/phd-professional-masters-specialisation-schools-and-other-programmes/course-unit-catalogue/course-unit/2023/479036)
class at the [University of Bologna](https://unibo.it).
## Development
You need:
- Node `v21.7.1`. We strongly suggest [`fnm`](https://github.com/Schniz/fnm) or
[`nvm`](https://github.com/nvm-sh/nvm) for Node versions management.
- PnpM or NPM (better the first one).
After that you need to edit the `.env` file and set up:
- `EXPO_PUBLIC_API_URL`: refers to the backend URL.
And start the Expo app.
```
pnpm run start
```
## Deployment
This work is made by Expo but you need an extra setup if you want that
everything go up well.
First of all you log in
```
eas login
```
Now you set up [Push Notifications](https://docs.expo.dev/push-notifications/push-notifications-setup/).
### Configuration and Build for Android
1. Generate a release key
```
keytool -genkey -v -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -storepass KEYSTORE_PASSWORD -keypass KEY_PASSWORD -alias cas4 -keystore release.keystore -dname "CN=John Doe, OU=Unknown, O=Unknown, L=Bologna, ST=Italy, C=IT"
```
2. Build Android app
```
eas build --platform android
```
3. Download the artifact from Expo page
4. Create APKS from the AAB file
```
java -jar bundletool-all-1.17.1.jar build-apks --bundle=application-XXXX.aab --output=cas.apks --mode=universal --ks android/keystores/release.keystore --ks-key-alias=cas4
```
|