Commit Graph

105 Commits

Author SHA1 Message Date
Icaro Motta 225e3b1c2f
DX: Preload user and dev.user namespace (#19927)
Preload the user namespace (src/user.cljs and src/dev/user.cljs) for the mobile
target and for dev-only purposes. The files are git-ignored.

Just a reminder that you'll be responsible for making sure your user namespace
is correct. If it's broken in any way (e.g. calling non-existent code) the app
will crash at initialization (dev-only environment obviously).

Why? When the app initializes, it loads namespaces that were required at least
once. If you create a user namespace, it won't be automatically required for
you. And if you, like some Clojure devs, like to use the user namespace as
your safe heaven for experimentation and dev-only utilities, you'll need to
remember to evaluate the namespace at least once.

This is tedious and many times I forgot to do so and the app crashed because the
compiler didn't know where the symbols were coming from.
2024-05-10 13:17:26 -03:00
Siddarth Kumar 5a7bfc61cc
fix: make run-ios-device script (#18845)
fixes #16310

We used to reply on `react-native cli` and would pass a `--device` flag to deploy the debug variant of `iOS` app on connected `iPhone`.
`react-native cli` under the hood uses `ios-deploy` library to achieve this functionality.
This showed many weird issues, specifically in locating connected devices and failures at build step with ambiguous error messages.

This commit fixes it by using our custom script `run-ios-devices.sh` which does not rely on `ios-deploy`.
We use `libimobiledevice` to identify `UDID` of a connected `iPhone`.
We use `xcrun devicectl device install app` and `xcrun devicectl device process launch` to install and launch the app.

This works well with `Xcode 15` and `iOS 17.x`.
We can now remove `ios-deploy` from `iOS` shell and `nix` overlay.
We also set up a logs folder and add a Readme.

## Review notes

- connect your iPhone to your Laptop via a cable
- `make run-clojure`
- `make run-ios-device`
(note: no need to pass device name now)

## Platforms
- iOS
2024-02-20 10:54:09 +05:30
Siddarth Kumar 3c6b38aeea
fix: improve iOS simulator selection (#18880)
## Summary

Improve iOS Simulator selection via `make run-ios` command.
Currently : `make run-ios SIMULATOR="iPhone SE (3rd generation)"` would fail because of our scripts inability to deal with this kind of a pattern.

This commit fixes that and makes this script more robust by storing output of `xcrun simctl list devices` in a json file `ios_simulators_list.json` and then using `jq` to properly get `UDIDs` of those simulators.

This script will now also prompt you to download a simulator image if you do not already have it.

The file `ios_simulators_list.json` will also help in future debugging when we want to check a quick summary of iOS simulator status of devs in the future.

We also append `-verbose` to `xcodebuild` for debug `iOS` builds, this helps debugging.

## Review notes
try such options -> `make run-ios SIMULATOR="iPhone SE (3rd generation)"`

## Platform 
- iOS
2024-02-20 07:16:54 +05:30
Siddarth Kumar 107f263fb1
chore: improve android & iOS build step (#18900)
fixes #18888

## Summary
`make run-android` was sometimes flaky because we used to send metro to background via `nohup` and then bring it back to foreground after we read metro logs.

Now we do not send metro to background. We first wait for a successful build.
we then install the app on the simulator. After this is done we give command to sleep until metro server has started, Once metro server has started we open the installed app.

In this workflow the command to open the installed app goes in background and metro stays in foreground.
The new workflow should now be less flaky.

## Review notes
`make run-clojure`
`make run-android` OR `make run-ios` should just work 

#### Platforms
- Android
- iOS
2024-02-19 21:11:36 +05:30
Siddarth Kumar 42cab08553
chore: Improve DX for building the app locally (#18784)
After upgrading `react-native` to `0.72.5` we frequently started seeing the _red screen of death_ on both `Android` and `iOS` simulators right after the app was built and installed.
This used to happen because our workflow required us to do the following :
- `make run-clojure`
- `make run-metro`
- `make run-ios` OR `make run-android`

The problem with this approach was after `metro` was started the `iOS`, `Android` build step would change the files that `metro` couldn't handle and hence metro would go out of sync.
The quick fix back then was to restart `metro` terminal and to open the app again from the simulator.
This was however not a good DX.

This commit fixes that.
We no longer rely on `react-native` cli to generate and deploy debug builds on simulators. We take control of the process via our own script. The new workflow introduced in this commit will first build the app, then install the app on the simulators and then start metro terminal. When `metro` is successfully running the script will then open the app.

The new workflow now is :
- `make run-clojure`
- `make run-ios` OR `make run-android`
2024-02-14 19:58:45 +05:30
Ibrahem Khalil 6d5ef17a31
Drop clj-kondo dir from linting (#18328) 2024-01-09 14:19:30 +02:00
Siddarth Kumar 761a7df06f
upgrade react-native to 0.72.5 (#17241)
This commit does many things :
- Upgrade `react-native ` to `0.72.5`
- Upgrade `react-native-reanimated` to  `3.5.4`
- Upgrade `react-native-navigation` to `7.37.0`
- `ndkVersion` has been bumped to `25.2.9519653`
- `cmakeVersion` has been bumped to `3.22.1`
- `kotlinVersion` has been bumped to `1.7.22`
- `AGP` has been bumped to `7.4.2`
- `Gradle` has been upgraded to `8.0.1`
- Android `CompileSDK` and `TargetSDK` have been bumped to 33
- `@react-native-async-storage/async-storage` has been upgraded to `1.19.3`
- `@walletconnect/client` has been nuked
- some of the old `react-native-reanimated` code has been nuked
- `react-native-keychain` fork has been replaced with `8.1.2`

- On Android we are currently relying on `Hermes` Engine.
- On iOS we are currently relying on `JSC`
- We are not enabling new architecture for now (I have plans for that in the future) ref: https://github.com/status-im/status-mobile/issues/18138

IOS only PR : https://github.com/status-im/status-mobile/pull/16721
Android only PR : https://github.com/status-im/status-mobile/pull/17062

- `make run-metro` now has a target of `android` which was `clojure` earlier, this will increase the time it takes to start metro terminal but this is needed otherwise you will get a nasty error while developing for android locally.
2023-12-11 21:22:23 +05:30
frank 9c6584f91b
ignore /.clj-kondo/rewrite-clj/rewrite-clj/config.edn which is generated by lint-fix (#18141) 2023-12-11 20:01:09 +08:00
Siddarth Kumar 3c297bf5b4
chore: ignore auto generated lint-fix files (#17783)
We get these 2 files auto generated locally as part of make lint-fix

`.clj-kondo/taoensso/encore/config.edn`
`.clj-kondo/taoensso/encore/taoensso/encore.clj`

We don't need them checked in its fine if they're ignored.
This commit adds these folders to `.gitIgnore`

- `.clj-kondo/taoensso/`
- `.clj-kondo/babashka/`
2023-11-10 18:12:03 +05:30
Brian Sztamfater 1ab57851d2
chore: add lefthook.yml to gitignore file (#16288)
Signed-off-by: Brian Sztamfater <brian@status.im>
2023-06-15 07:50:40 -03:00
Siddarth Kumar 350303256b
upgrade `react-native` from 0.67.5 to 0.69.10 (#16016) 2023-06-14 07:17:41 +05:30
Omar Basem faa29a2946
feat: reimplement composer (#15639)
* feat: reimplement composer (1)
2023-04-24 17:40:15 +04:00
Jakub Sokołowski 8cd5e3f6e3
ios: direct logs to ios/logs, archive on failure
This way people don't have to ask me for access to logs from CI hosts to
be acquired using SSH access, but instead they will be simply included
in Jenkins build artifacts.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-09 12:23:51 +01:00
Jamie Caprani 6a05d43b75
chore: add some component tests (#14511) 2022-12-13 14:19:20 -08:00
Christoph Pader f18044c9dc
Implement Token Gating (#13899)
* feat: implement token gating component

* fix: add .calva to gitignore
2022-12-01 13:30:07 +00:00
Jamie Caprani c6e8aad745
feat: add component tests using react-testing-library and jest (#14331) 2022-11-23 05:59:18 -08:00
Jamie Caprani 72d43ba745
Visual tests setup (#14329)
feat: configuration setup for visual tests

Co-authored-by: Erik Seppanen <esep@protonmail.com>
2022-11-20 15:46:04 -08:00
Jakub Sokołowski 61653888f8
nix: upgrade gomobile to 2022-05-04 version
Possible fix fix failing `status-go` builds:
https://github.com/status-im/status-react/issues/13346

Other notable upgrades:

* NodeJS `16.15.1` to `16.15.0`
* Yarn `1.22.18` to `1.22.19`
* Clojure `1.11.1.1113` to `1.11.1.1139`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-06-20 19:01:14 +02:00
Audrius Molis 855f1aab03
Stop tracking VSCode config
Signed-off-by: Audrius Molis <masta@dr.com>
2022-06-20 10:35:37 +03:00
Andrea Maria Piana e4cba0f663
Add status-go tests
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2022-05-25 17:59:02 +01:00
Audrius Molis 4909ec9854
Add settings and stickers synchronization
640793fe85...a244d77657

Signed-off-by: Audrius Molis <masta@dr.com>
2022-05-11 17:42:31 +03:00
Churikova Tetiana 55915a9176
e2e: tx users 2022-03-07 22:17:39 +01:00
Churikova Tetiana 7e8a68ec67
e2e: refactoring commands, wait for balance, find trans
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2021-02-04 13:54:06 +01:00
Jakub Sokołowski 112132aa94
drop all desktop related files and references
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-08 10:26:51 +02:00
Jakub Sokołowski b95056f3ce
ci: fix what version is set for iOS PR builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-06 09:47:39 +02:00
Gheorghe Pinzaru d916751160
Add PR Scheme for iOs build
Build PR Scheme in PR build

use named parameters, use pr_build boolean

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Enable capabilities

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Add custom app icon

Remove user defined profile

Add PR scheme

Explicit provide provisioning profiles

Fix pr schema

Bump jenkins

Pod bump

Describe pr_build argument

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-06-29 16:16:35 +03:00
Jakub Sokołowski 2f65cedd2d
nix: replace grep and sed with AWK for parsing Gradle deps
The mess with regexes is hard to read and think about which is why it
had bugs with handling some Gradle formats.

It also lowers further the number of dependencies pulled from 785 to 744.

Changes:
- Added `gradle_parser.awk` script for getting dependencies from Gradle
- Changed the `deps.urls` file to contain full URLs to POMs
- Dropped the `deps.urls.old` part since `get_urls.sh` no longer exists
- Added `CLR` for learing line to `scripts/colors.sh`
- Wrote a new `nix/deps/gradle/README.md`
- Re-generated `nix/pkgs/go-maven-resolver/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-25 19:34:56 +02:00
Jakub Sokołowski ed4d0a1ed9
nix: refactor updating Gradle dependencies
changes:
- Moved Gradle deps setup to `nix/deps/gradle`
- Dropped `nix/mobile/android/maven-and-npm-deps/maven`
- Used GNU Parallel to optimize `nix/deps/gradle/generate.sh`
- Move Maven+Node shell setup from `release-android.nix` to Android shell
- Moved AAPT2 patching to `nix/pkgs/aapt2`
- Drop `patchPhase` and `gradlew` use from `release-android.nix`
- Simplify symlinking `{mobile,desktop}/js_files/*`
- Add new `nodejs` shell and merge it with `clojure` and `gradle`
- Re-created Gradle deps files with new scripts:
  - `nix/deps/gradle/proj.list`
  - `nix/deps/gradle/deps.list`
  - `nix/deps/gradle/deps.urls`
  - `nix/deps/gradle/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:30 +02:00
Jakub Sokołowski 45f1d58832
nix: simplify android release build
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:23 +02:00
Gheorghe Pinzaru 2140a9867b
Upgrade react native to 0.62.2
Xcode updates

Localization

Pods upgrade

Update package.json

Upgrade android

Fix gitignore

Add flipper

Do not enable flipper by default on ios

maven update

Remove outdated hermes

idk what it is, but it's outdated

show warning on build

gradle update

rebase

Update deprecated clipboard

nix

align e2e to rn upgrade

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-05-06 17:35:13 +03:00
Andrey Shovkoplyas d91067bb96
removed check spec, and moved db, events and navigation from ui to root folder 2020-05-04 12:23:19 +02:00
yenda d5ef218584
use shadow-cljs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: yenda <eric@status.im>
2020-04-30 15:43:46 +02:00
Gheorghe Pinzaru 785f829554
Git ignore trace.edn and config.cljs
They are auto generated and should not be present in git

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-01-31 17:02:09 +03:00
Roman Volosovskyi 907b35cedd
Migrate to RN 0.61.5
This change allows to fix status bar on iOS in dark mode #9470
2019-12-04 08:52:02 +02:00
Pedro Pombeiro e3e8e218ad
Make root folder less busy
- Move `mobile_files` into `mobile/js_files`
- Move `desktop_files` into `desktop/js_files`

Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-09-12 16:54:12 +02:00
Pedro Pombeiro 9feb31bd3b
Upgrade react-native to 0.60.5
- Use community net-info, react-native-webview instead of deprecated react-native classes
- Remove react-native-tcp
- Upgrade react-native libs (react-native-camera, react-native-firebase, react-native-mail, react-native-udp, react-native-webview-bridge)
- Do not include `:react-native-android` module explicitly
- Take advantage of RN AutoLinking
- nix: Update Gradle dependencies
2019-09-12 16:13:42 +02:00
Andrey Shovkoplyas b0db4c6354
Fiddle
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-08-19 13:22:11 +03:00
Pedro Pombeiro ff721ba1bf
nix: Some minor fixes 2019-08-15 11:18:31 +02:00
Pedro Pombeiro f691304b9d
Fix minor issues and typos in Android build process
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-08-01 19:34:33 +02:00
Pedro Pombeiro acf6278383
nix: Use nix/build.sh for release-android make target
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-26 16:01:06 -04:00
Pedro Pombeiro a7fd659d84
nix: Wrap gradle, npm packages, `lein prod-build` and `gradle assembleRelease` in Nix expressions to improve reproducible builds with constant build paths 2019-07-15 16:08:02 +02:00
tbenr b78bb456a4
add coverage test
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-10 16:15:44 -04:00
Roman Volosovskyi e925b2dc46
[perf] prod version of slurp
All resources loaded by slurp are moved to status-modules/resources dir
in release builds and are loaded only by demand instead of being bundled into
index.*.js.
2019-06-11 15:52:23 +03:00
Roman Volosovskyi 3bd0947b4c
[perf] move goog.i18n deps to a module 2019-06-10 21:10:42 +03:00
Pedro Pombeiro ab11a67c96
Move files that don't change per platform to the root 2019-06-06 16:56:24 +02:00
Roman Volosovskyi 632bbf3bc1
[perf] Move translation to node_modules in release build 2019-06-05 18:40:53 +03:00
Pedro Pombeiro 90d517adf6
nix: Add add-gcroots target to Makefile to avoid garbage collection
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-05-13 11:33:00 +02:00
Pedro Pombeiro b575f5f6a5
Create androidenv package with accepted license so build can run with --pure 2019-05-06 11:56:51 +02:00
Jakub Sokołowski 42a3b7d195
fix setting of BUILD_TYPE and BRANCH params
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-04-12 11:49:02 +02:00
Pedro Pombeiro 65e6e80349
Create Nix package for building status-go 2019-04-09 12:44:39 +02:00