From a8a72ddbf4042b77ddfbf9add07d7a9edbf41bb4 Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Wed, 6 Jul 2022 20:56:51 +0000 Subject: [PATCH 1/5] Update README.md --- README.md | 87 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index b869b69..fcdb62c 100644 --- a/README.md +++ b/README.md @@ -21,81 +21,83 @@ The app is built in React Native and currently developed for Android. ## Development setup -#### 1. Android Studio - -Install [Android Studio](https://developer.android.com/studio/) - you'll need it to install some dependencies. - -#### 2. Node & npm version - -Make sure you are running Node 14 and npm 6.14.17. It's easiest to switch Node versions using `nvm`, here's how to do it: - - $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash - $ nvm install v14.19.3 - -#### 3. Get this repository +### 1. Get this repository Clone it with SSH - $ git clone git@gitlab.com:bloodyhealth/drip.git + git clone git@gitlab.com:bloodyhealth/drip.git or clone it with HTTPS - $ git clone https://gitlab.com/bloodyhealth/drip.git + git clone https://gitlab.com/bloodyhealth/drip.git + + +### 2. Node & npm version + +Make sure you are running Node 14 and npm 6.14.17. It's easiest to switch Node versions using `nvm`, here's how to do it: + + curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash + nvm install v14.19.3 and run - $ cd drip - $ npm install + cd drip + npm install -#### 4. More requirements from Android Studio +### Android + +#### 3.1 Android Studio + +Install [Android Studio](https://developer.android.com/studio/) - you'll need it to install some dependencies. + +#### 3.2 More requirements from Android Studio Open Android Studio and click on "Open an existing Android Studio project". Navigate to the drip repository you cloned and double click the android folder. It detects, downloads and cofigures requirements that might be missing, like the NDK and CMake to build the native code part of the project. Also see the [nodejs-mobile repository](https://github.com/janeasystems/nodejs-mobile) for the necessary prerequisites for your system. -#### 5. Run the app on Android +#### 3.3 Run the app on Android Either start a [virtual device in Android Studio](https://developer.android.com/studio/run/emulator) or [set your physical device like your Android phone up](https://developer.android.com/training/basics/firstapp/running-app) to run the app. 1. Open a terminal and run - ``` - $ npm run android - ``` + npm run android 2. To see logging output, run the following command in another tab: - ``` - $ npm run log - ``` + npm run log 3. Run the following command and select enable hot reloading (see https://facebook.github.io/react-native/docs/debugging.html): - ``` - $ adb shell input keyevent 82 - ``` + adb shell input keyevent 82 4. We recommend installing an [ESLint plugin in your editor](https://eslint.org/docs/user-guide/integrations#editors). There's an `.eslintrc` file in this project which will be used by the plugin to check your code for style errors and potential bugs. -#### 6. Run app on iOS +### iOS + +#### 4.1 Install Cocoapods + +"CocoaPods manages library dependencies for your Xcode projects" + + sudo gem install cocoapods + +#### 4.2 Run app on iOS Minimum system requirements to run iOS app are as follows: - MacOS 10.15.7 for Mac users -- Xcode 12.3 (I assume, that only command line tools might be enough) +- Xcode 12.3 (command line tools only might be enough) 1. Install XCode dependencies by running the following command from the root project directory: -``` -$ cd ios && pod install && cd .. -``` + cd ios && pod install && cd .. 2. To run app either open drip workspace ('drip.xcworkspace' file) with XCode and run "Build" or run the following command: -``` -$ npm run ios -``` + npm run ios 3. If you are building the app with XCode make sure you are running this as well: - `$ npm start` + + npm start ### Troubleshooting @@ -111,12 +113,14 @@ Now, `which java` should output `/Applications/Android Studio.app/Contents/jre/j #### [MacOS] Ninja If `npm` says `CMake was unable to find a build program corresponding to "Ninja".`: -`$ brew install ninja` + + brew install ninja ### [MacOS] adb not on the path If you get error messages about `adb` not being found on your path: -`$ ln -s ~/Library/Android/sdk/platform-tools/adb /usr/local/bin/adb` + + ln -s ~/Library/Android/sdk/platform-tools/adb /usr/local/bin/adb ### [MacOS] and XCode 12.5 @@ -131,7 +135,7 @@ If you experience any further issues, please feel free to check out the followin If you would like to clear project cache and/or re-install project libraries, you can run clear script as follows: - $ npm run clear + npm run clear Script accepts the following options: "none" - script will delete all caches and re-install project libraries, @@ -142,14 +146,15 @@ Script accepts the following options: For example, if you would like to clear android part of the project and re-install project libraries, you can run the following command: - $ npm run clear android npm + npm run clear android npm ## Tests ### Unit tests You can run the tests with: -`$ npm test` + + npm test ### End to end tests From 5920e67a1ad29891da46fefe1145bf424c0cb036 Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Sun, 10 Jul 2022 13:56:31 +0200 Subject: [PATCH 2/5] Correct nvm how to install info --- README.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fcdb62c..b69a25d 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,13 @@ or clone it with HTTPS git clone https://gitlab.com/bloodyhealth/drip.git - ### 2. Node & npm version -Make sure you are running Node 14 and npm 6.14.17. It's easiest to switch Node versions using `nvm`, here's how to do it: +Make sure you are running Node 14 and npm 6.14.17. It's easiest to switch Node versions using `nvm`, here's how to install NVM: https://github.com/nvm-sh/nvm#installing-and-updating. Once you have nvm you can install node 14: - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash nvm install v14.19.3 -and run +and then run cd drip npm install @@ -60,15 +58,15 @@ Either start a [virtual device in Android Studio](https://developer.android.com/ 1. Open a terminal and run - npm run android + npm run android 2. To see logging output, run the following command in another tab: - npm run log + npm run log 3. Run the following command and select enable hot reloading (see https://facebook.github.io/react-native/docs/debugging.html): - adb shell input keyevent 82 + adb shell input keyevent 82 4. We recommend installing an [ESLint plugin in your editor](https://eslint.org/docs/user-guide/integrations#editors). There's an `.eslintrc` file in this project which will be used by the plugin to check your code for style errors and potential bugs. @@ -89,15 +87,15 @@ Minimum system requirements to run iOS app are as follows: 1. Install XCode dependencies by running the following command from the root project directory: - cd ios && pod install && cd .. + cd ios && pod install && cd .. 2. To run app either open drip workspace ('drip.xcworkspace' file) with XCode and run "Build" or run the following command: - npm run ios + npm run ios 3. If you are building the app with XCode make sure you are running this as well: - npm start + npm start ### Troubleshooting From 81e3a610f4f681bbffcd88462dde5d582e042512 Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Sun, 10 Jul 2022 15:28:36 +0200 Subject: [PATCH 3/5] Correct formatting for code snippets --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index b69a25d..808231a 100644 --- a/README.md +++ b/README.md @@ -42,60 +42,60 @@ and then run cd drip npm install -### Android +## for Android -#### 3.1 Android Studio +### 3.1 Android Studio Install [Android Studio](https://developer.android.com/studio/) - you'll need it to install some dependencies. -#### 3.2 More requirements from Android Studio +### 3.2 More requirements from Android Studio Open Android Studio and click on "Open an existing Android Studio project". Navigate to the drip repository you cloned and double click the android folder. It detects, downloads and cofigures requirements that might be missing, like the NDK and CMake to build the native code part of the project. Also see the [nodejs-mobile repository](https://github.com/janeasystems/nodejs-mobile) for the necessary prerequisites for your system. -#### 3.3 Run the app on Android +### 3.3 Run the app on Android Either start a [virtual device in Android Studio](https://developer.android.com/studio/run/emulator) or [set your physical device like your Android phone up](https://developer.android.com/training/basics/firstapp/running-app) to run the app. -1. Open a terminal and run +i. Open a terminal and run - npm run android + npm run android -2. To see logging output, run the following command in another tab: +ii. To see logging output, run the following command in another tab: - npm run log + npm run log -3. Run the following command and select enable hot reloading (see https://facebook.github.io/react-native/docs/debugging.html): +iii. Run the following command and select enable hot reloading (see https://facebook.github.io/react-native/docs/debugging.html): - adb shell input keyevent 82 + adb shell input keyevent 82 -4. We recommend installing an [ESLint plugin in your editor](https://eslint.org/docs/user-guide/integrations#editors). There's an `.eslintrc` file in this project which will be used by the plugin to check your code for style errors and potential bugs. +iv. We recommend installing an [ESLint plugin in your editor](https://eslint.org/docs/user-guide/integrations#editors). There's an `.eslintrc` file in this project which will be used by the plugin to check your code for style errors and potential bugs. -### iOS +## for iOS -#### 4.1 Install Cocoapods +### 4.1 Install Cocoapods "CocoaPods manages library dependencies for your Xcode projects" sudo gem install cocoapods -#### 4.2 Run app on iOS +### 4.2 Run app on iOS Minimum system requirements to run iOS app are as follows: - MacOS 10.15.7 for Mac users - Xcode 12.3 (command line tools only might be enough) -1. Install XCode dependencies by running the following command from the root project directory: +i. Install XCode dependencies by running the following command from the root project directory: - cd ios && pod install && cd .. + cd ios && pod install && cd .. -2. To run app either open drip workspace ('drip.xcworkspace' file) with XCode and run "Build" or run the following command: +ii. To run app either open drip workspace ('drip.xcworkspace' file) with XCode and run "Build" or run the following command: - npm run ios + npm run ios -3. If you are building the app with XCode make sure you are running this as well: +iii. If you are building the app with XCode make sure you are running this as well: - npm start + npm start ### Troubleshooting @@ -195,9 +195,9 @@ More information about how the app calculates fertility status and bleeding pred 2. Download webfont from fontello. 3. Copy both the content of `config.json` and `font.tff` into `assets/fonts`, replacing it with the current content of `config-drip-icon-font.json` and `drip-icon-font.tff`. 4. Now run the following command in your console: - ``` - $ react-native link - ``` + + react-native link + 5. You should be able to use the icon now within drip, e.g. in Cycle Day Overview and on the chart. ## Translation From 9732dd47114a2ef0fc9140a1b0cb392f96b6b7e4 Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Sun, 10 Jul 2022 15:29:37 +0200 Subject: [PATCH 4/5] Use brew for installing cocoapods --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 808231a..bb1d39b 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ iv. We recommend installing an [ESLint plugin in your editor](https://eslint.org "CocoaPods manages library dependencies for your Xcode projects" - sudo gem install cocoapods + brew install cocoapods ### 4.2 Run app on iOS From 3f9547a2cc00b27cd973f9026bfc08723bdd250e Mon Sep 17 00:00:00 2001 From: bl00dymarie Date: Sun, 10 Jul 2022 15:33:51 +0200 Subject: [PATCH 5/5] Use xcode 13 --- README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index bb1d39b..3bdd197 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ iv. We recommend installing an [ESLint plugin in your editor](https://eslint.org Minimum system requirements to run iOS app are as follows: - MacOS 10.15.7 for Mac users -- Xcode 12.3 (command line tools only might be enough) +- Xcode 13 (command line tools only might be enough) i. Install XCode dependencies by running the following command from the root project directory: @@ -120,15 +120,6 @@ If you get error messages about `adb` not being found on your path: ln -s ~/Library/Android/sdk/platform-tools/adb /usr/local/bin/adb -### [MacOS] and XCode 12.5 - -If you run XCode 12.5, more likely you'll have problems building app for iOS. Please use the following fix: https://stackoverflow.com/a/67320887. - -If you experience any further issues, please feel free to check out the following threads: - -- [react-native run-ios build failure on XCode 12.5 beta](https://github.com/react-native-community/cli/issues/1365) -- [Xcode 12.5 troubleshooting guide (RN 0.61/0.62/0.63/0.64)](https://github.com/facebook/react-native/issues/31480) - ### Clearing project cache If you would like to clear project cache and/or re-install project libraries, you can run clear script as follows: