Skip to content

Commit

Permalink
#1 update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Dubkov committed Aug 27, 2021
1 parent a3d9815 commit cf72e40
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
moko-doctor
# Mobile Kotlin doctor
This is a script for KMM developers that allows you to check whether your working environment is configured.

## What does the *doctor* check?
- Is *Git* installed
- Is *XCode* / *Xcode Command Line* installed
- Is *Android Studio* installed
- Is *Cocoa Pods* installed
- is *Xcode* configured
- is *Android Studio* configured
- is the *environment variables* installed


## Usage

Clone the repository for yourself and run the script:

```bash
./doctor.sh
```

## Xcode environments

In our projects, we run the *Gradle* build from *Xcode*. At the start of the build, the [*Gradle Daemon*](https://docs.gradle.org/current/userguide/gradle_daemon.html) is also launched.
If there are several *JDKs* on the computer, *Xcode* starts the build from the highest version.

The reason is that a shell ran from *Xcode* build phase is [non-interactive shell](https://www.vanimpe.eu/2014/01/18/different-shell-types-interactive-non-interactive-login/).

In order for Xcode to see the *JAVA_HOME* and *ANDROID_SDK_ROOT* variables that we have declared, you need to run the script:

```bash
./setup_xcode_environment.sh
```

This script passes the *JAVA_HOME* and *ANDROID_SDK_ROOT* variables specified in your environment (in .zshrc or .bash-profile) to the *Xcode* environment , which is launched when the project is built.

After rebooting the system, it can check this, it is enough to enter a couple of lines of build phases.

![pods debub](images/podsDebug.png)

Run the project build using *Cmd+B*.

In *Build* we see:

![pods debub](images/buildSuccess.png)

Binary file added images/buildSuccess.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/podsDebug.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cf72e40

Please sign in to comment.