-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mark Dubkov
committed
Aug 27, 2021
1 parent
a3d9815
commit cf72e40
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.