Skip to content

Commit ef583c8

Browse files
authored
Merge branch 'develop' into 18874
2 parents 268aa07 + 42d2690 commit ef583c8

File tree

198 files changed

+1474
-8538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+1474
-8538
lines changed

.gitignore

+2-5
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,5 @@ test/appium/tests/users.py
195195
## git hooks
196196
lefthook.yml
197197

198-
## metro server logs
199-
metro-server-logs.log
200-
201-
## debug build time logs
202-
logs/
198+
## build time logs
199+
/logs/*.log

Makefile

+2-11
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ export _NIX_KEEP ?= TMPDIR,BUILD_ENV,\
5656
# Useful for Android release builds
5757
TMP_BUILD_NUMBER := $(shell ./scripts/version/gen_build_no.sh | cut -c1-10)
5858

59-
# MacOS root is read-only, read nix/README.md for details
60-
UNAME_S := $(shell uname -s)
61-
ifeq ($(UNAME_S),Darwin)
62-
export NIX_IGNORE_SYMLINK_STORE=1
63-
endif
64-
6559
#----------------
6660
# Nix targets
6761
#----------------
@@ -296,11 +290,8 @@ show-ios-devices: ##@other shows connected ios device and its name
296290
# TODO: fix IOS_STATUS_GO_TARGETS to be either amd64 or arm64 when RN is upgraded
297291
run-ios-device: export TARGET := ios
298292
run-ios-device: export IOS_STATUS_GO_TARGETS := ios/arm64;iossimulator/amd64
299-
run-ios-device: ##@run iOS app and start it on a connected device by its name
300-
ifndef DEVICE_NAME
301-
$(error Usage: make run-ios-device DEVICE_NAME=your-device-name)
302-
endif
303-
react-native run-ios --device "$(DEVICE_NAME)"
293+
run-ios-device: ##@run iOS app and start it on the first connected iPhone
294+
@scripts/run-ios-device.sh
304295

305296
#--------------
306297
# Tests

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ project dependencies, coding guidelines and testing procedures.
3737
Check out our [coding guidelines](doc/new-guidelines.md).
3838

3939
- **Community Management**
40-
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and the long-lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
40+
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and the long-lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.app/manifesto)
4141

4242
- **Specification / Documentation**
4343
John Dewey once said, "Education is not preparation for life; education is life *itself* ". Developers and Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.
@@ -53,10 +53,10 @@ Status is a visual interface to make permanent changes on the Blockchain, it han
5353

5454
- **Evangelism**
5555
Help us spread the word! Tell a friend *right now*, in fact, tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
56-
56+
5757
## Give me Binaries!
5858

59-
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/), or by [building it yourself](https://status.im/technical/build_status/).
59+
You can get our Beta builds for both Android and iOS on our [website](https://status.app), through our [nightly builds](https://status.im/nightly/), or by [building it yourself](doc/starting-guide.md).
6060

6161
## Core Contributors
6262

ci/Jenkinsfile.combined

+1-5
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ pipeline {
3535
stage('Prep') {
3636
steps { script {
3737
println("Current JOB: ${env.JOB_NAME}")
38-
/* just for a shorter access */
39-
btype = utils.getBuildType()
4038
} }
4139
}
4240
stage('Build') {
@@ -84,10 +82,8 @@ pipeline {
8482
when { expression { params.PUBLISH } }
8583
steps { script {
8684
switch (btype) {
87-
case 'nightly':
88-
/* Create JSON file with newest build URLs */
85+
case 'nightly': /* Create JSON file with newest build URLs */
8986
s3.updateBucketJSON(urls, 'latest.json');
90-
build(job: 'website/status.im', wait: false);
9187
break;
9288
case 'release':
9389
github.publishReleaseFiles(repo: 'status-mobile');

ci/Jenkinsfile.ios

-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ pipeline {
3939
LANGUAGE = "en_US.UTF-8"
4040
TARGET = 'ios'
4141
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
42-
/* See nix/README.md */
43-
NIX_IGNORE_SYMLINK_STORE = 1
4442
FASTLANE_DISABLE_COLORS = 1
4543
BUNDLE_PATH = "${HOME}/.bundle"
4644
}

ci/tools/Jenkinsfile.fastlane-clean

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ pipeline {
1010
LC_ALL = 'en_US.UTF-8'
1111
TARGET = 'ios'
1212
FASTLANE_DISABLE_COLORS = 1
13-
/* See nix/README.md */
14-
NIX_IGNORE_SYMLINK_STORE = 1
1513
/* avoid writing to r/o /nix */
1614
GEM_HOME = '~/.rubygems'
1715
}

ci/tools/Jenkinsfile.nix-cache

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ pipeline {
1818
}
1919

2020
environment {
21-
/* See nix/README.md */
22-
NIX_IGNORE_SYMLINK_STORE = 1
2321
/* we source .bash_profile to be able to use nix-store */
2422
NIX_SSHOPTS = "-oStrictHostKeyChecking=no"
2523
NIX_CONF_DIR = "${env.WORKSPACE}/nix"

ci/tools/Jenkinsfile.playstore-meta

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ pipeline {
1010
LC_ALL = 'en_US.UTF-8'
1111
TARGET = 'ios'
1212
FASTLANE_DISABLE_COLORS = 1
13-
/* See nix/README.md */
14-
NIX_IGNORE_SYMLINK_STORE = 1
1513
/* avoid writing to r/o /nix */
1614
GEM_HOME = '~/.rubygems'
1715
}

doc/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
[Coding guidelines](new-guidelines.md)
1212

13+
[UI components coding guidelines](ui-guidelines.md)
14+
1315
[Release Checklist](release-checklist.md)
1416

1517
[Release Guide](release-guide.md)
@@ -28,6 +30,8 @@
2830

2931
[Contributing to status-go](status-go-changes.md)
3032

33+
[Malli schemas (recorded demo)](https://www.youtube.com/watch?v=SlRio70aYVI) ([slides](files/forging-code-with-schemas-sep-2023-slides.pdf))
34+
3135
## Testing
3236

3337
[How to run local tests](testing.md)
Binary file not shown.

doc/react_tree.png

41.2 KB
Loading

doc/starting-guide.md

+37-22
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,41 @@ This document provides information on how to start developing Status App.
44

55
# Getting Started
66

7-
To start developing start a shell for the platform you are interested in.
7+
To start developing clone the status-mobile repo in the directory of your choice.
88
```
9-
make shell TARGET=android
9+
git clone https://github.com/status-im/status-mobile.git
1010
```
11-
This step will take a while the first time as it will download all dependencies.
1211

13-
# Development
12+
Then open a terminal and cd into this directory.
1413

15-
There are three steps necessary to start development, in this case for Android:
14+
```
15+
cd status-mobile
16+
```
17+
18+
Then build the clojure terminal
19+
20+
```
21+
make run-clojure
22+
```
23+
24+
note: ⚠️ This might take a while if this is your first time.
25+
26+
This command installs `nix` and pulls in all the dependencies.
27+
Do answer with "Y" to all the prompts and press "Enter" when `nix` setup asks you to Acknowledge.
28+
This command builds the `jsbundle` and then compiles `Clojure` into `JavaScript`, watches for changes on `cljs` files, and hot-reloads code in the app.
1629

17-
1. `make run-clojure` - Compiles Clojure into JavaScript, watches for changes on cljs files, and hot-reloads code in the app.
18-
2. `make run-android` or `make run-ios` - Builds the Android/iOS app, starts it on the device and starts metro bundler.
30+
wait till you see the following message :
1931

20-
The first two will continue watching for changes and keep re-building the app. They need to be ready first.
21-
The last one will exit once the app is up and ready.
32+
```
33+
[:mobile] Build completed. (1801 files, 52 compiled, 0 warnings, 9.52s)
34+
```
35+
36+
Once the clojure terminal is running you need to run the appropriate command next for your platform in a separate terminal :
37+
38+
`make run-android` or `make run-ios`
39+
40+
These commands will build the app, start a metro bundler and deploy the app on your simulator OR connected device (android only). For building and deploying to connected iPhones use `make run-ios-device` instead of `make run-ios`
41+
Also check [developing on a physical iOS Device](#Additional-requirements-for-developing-on-physical-ios-device).
2242

2343
## Simulators and Devices
2444
### Android
@@ -45,13 +65,9 @@ Running `make run-ios` will target `iPhone 13` by default.
4565

4666
If you need to run on any other simulator, you can specify the simulator type by adding the `SIMULATOR` flag:
4767
```sh
48-
make run-ios SIMULATOR="iPhone 13"
68+
make run-ios SIMULATOR="iPhone 15"
4969
```
5070

51-
#### Running on a physical device
52-
53-
Some manual steps are necessary for [developing on a physical iOS Device](#physical-ios-device).
54-
5571
# Build release
5672

5773
To build the app, you can simply run on of the following:
@@ -101,16 +117,15 @@ Steps:
101117
3. [Setup Git to sign commits](https://help.github.com/en/github/authenticating-to-github/signing-commits)
102118
4. [Setup GitHub to validate commits](https://help.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account)
103119

104-
## Physical iOS Device
120+
## Additional requirements for developing on Physical iOS Device
105121

106122
To use a physical iPhone your device UDID must be added to provisioning profiles and your Apple account invited as Developer to Status team.
107123

108124
1. [Get your UDID of your iPhone.](https://www.extentia.com/post/finding-the-udid-of-an-ios-device)
109125
2. Request from someone with access like @cammellos or @jakubgs to
110-
- Add the UDID to development devices on Apple Developer Portal.
111-
- Invite your Apple account to be Developer in Status team.
112-
3. Run a build in XCode using the project from `status-mobile/ios` directory.
113-
- You might see error: `Select a development team in the Signing & Capabilities editor`
114-
- Select `Status Research & Development GmbH` as the development team and rebuild again.
115-
116-
Once build finishes Status should start on your iPhone with its logs in terminal running `make run-metro`.
126+
- Add the UDID to development devices on Apple Developer Portal.
127+
- Invite your Apple account to be Developer in Status team.
128+
3. Open XCode using the project from `status-mobile/ios` directory.
129+
- You might see error: `Select a development team in the Signing & Capabilities editor`
130+
- Select `Status Research & Development GmbH` as the development team.
131+
4. In a new terminal execute `make clean` and then `make xcode-clean`

doc/testing.md

+32-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
## Unit & integration tests
44

5-
To run tests:
5+
To run all tests:
66

77
```
88
make test
99
```
1010

11-
12-
1311
Also test watcher can be launched. It will re-run the entire test suite when any file is modified
1412

1513
```
@@ -51,18 +49,46 @@ Here I'm showing a terminal-only experience using Tmux (left pane Emacs, right p
5149

5250
[2022-12-19 13-17.webm](https://user-images.githubusercontent.com/46027/208471199-1909c446-c82d-42a0-9350-0c15ca562713.webm)
5351

54-
## Component tests
52+
## Component tests only
5553

5654
To run tests:
5755

5856
```
59-
make component-test
57+
make component-test
6058
```
6159

6260
Also test watcher can be launched. It will re-run the entire test suite when any file is modified
6361

6462
```
65-
make component-test-watch
63+
make component-test-watch
6664
```
6765

6866
Check [component tests doc](./component-tests-overview.md) for more.
67+
68+
## Unit tests only
69+
70+
To run unit tests:
71+
72+
```
73+
make test-unit
74+
```
75+
76+
Also test watcher can be launched. It will re-run the entire test suite when any file is modified
77+
78+
```
79+
make test-unit WATCH=true
80+
```
81+
82+
## Integration tests only
83+
84+
To run integration tests:
85+
86+
```
87+
make test-integration
88+
```
89+
90+
Also test watcher can be launched. It will re-run the entire test suite when any file is modified
91+
92+
```
93+
make test-integration WATCH=true
94+
```

doc/troubleshooting.md

+1-20
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this
8888
Update yarn.lock file. In order to do this, perform the following steps on a clean `status-mobile` repo:
8989
```
9090
cd status-mobile
91+
make shell
9192
yarn install
9293
```
9394
and don't forget to commit updated `yarn.lock` together with `package.json`.
@@ -127,23 +128,3 @@ Status-mobile uses `shadow-cljs` for hot reloading changes and uses its own [rel
127128

128129
### Solution
129130
Open react native's [In-App Developer Menu](https://reactnative.dev/docs/debugging#accessing-the-in-app-developer-menu) and press "Disable Fast Refresh" or "Disable Hot Reloading"
130-
131-
## App Crashes after few reloads
132-
133-
### Cause
134-
For x86 CPU architecture Android Devices, Hermes is creating the issue and the app crashes after a few reloads.
135-
([Original Issue](https://github.com/status-im/status-mobile/issues/14031))
136-
137-
<details>
138-
<summary>How to Find CPU architecture</summary>
139-
140-
CPU architecture of android device can be found using
141-
- `adb shell uname -m` or
142-
- `adb shell getprop ro.product.cpu.abilist`
143-
144-
</details>
145-
146-
### Solution
147-
Disable Hermes while building the app
148-
149-
`make run-android DISABLE_HERMES=true`

0 commit comments

Comments
 (0)