Skip to content

Commit

Permalink
Improve dev env setup & iOS compilation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
gy-mate committed Jan 24, 2025
1 parent 866aab0 commit 436347a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 57 deletions.
88 changes: 44 additions & 44 deletions main/docs/technical/build-osmand/how-to-compile-the-ios-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@ sidebar_position: 6

# How to Compile the iOS Version

1. First setup the **[development environment](setup-the-dev-environment.md)**.
2. Install Xcode from AppStore (Last tested 14.2)
3. Install Xcode command-line tools
1. Setup the **[development environment](setup-the-dev-environment.md)**
2. Install Xcode from the App Store (the last tested version is `14.2`)
3. Install Command Line Tools for Xcode
```
$ xcode-select --install
```
Or in case of errors try to download and install it from Apple site: <https://developer.apple.com/download/all/?q=xcode>.
Orin case of an error—try to download and install it from Apple's website: <https://developer.apple.com/download/all/?q=xcode>.

4. Log in into Xcode account (optional)
In case if you don't have Apple Developer account. Open Xcode and go to preferences (via top menu)
```
Preferences -> Accounts
```
Press `+` button. You can log in with your AppleID (login and password from your iOS/macOS devices). Follow Xcode instructions.
For OsmAnd team members: send your AppleID login, so you will be added to to developers list. When you'll get email with invite message activate it.
Close Xcode.
In case you don't have Apple Developer account.
1. Open Xcode and go to _Preferences_ -> _Accounts_ (via the top menu)
2. Press the `+` button. You can log in with your Apple ID (login and password from your iOS/macOS devices). Follow Xcode instructions.
3. _For OsmAnd team members:_ send your Apple ID login, so you will be added to the list of developers. You'll get email with an invite message—activate it.
4. Close Xcode.

5. Install command-line tools- cmake, svn, cocoapods
5. Install command-line tools: `cmake`, `svn`, `cocoapods`
```
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ brew install svn
Expand All @@ -33,51 +31,53 @@ sidebar_position: 6
# for m1
$ brew install cocoapods
```
6. Download and instal Java jdk 17

6. Download and install Java JDK 17
```
# for intel
# For Intel-based Macs
https://download.oracle.com/java/17/archive/jdk-17.0.11_macos-x64_bin.dmg
# for m1
# For Apple silicon Macs
https://download.oracle.com/java/17/archive/jdk-17.0.11_macos-aarch64_bin.dmg
```

7. Create new text file. Or update if it exist.
7. Create a new text file or update if it exists
```
$ mkdir ~/.gradle
$ nano ~/.gradle/gradle.properties
```

Paste this content into it. Save file and restart computer.
1. Paste this content into it:
```
## Project-wide Gradle settings.
#
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxMetaspaceSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
```
## Project-wide Gradle settings.
#
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxMetaspaceSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
org.gradle.caching=true
#Fri Apr 08 18:47:31 EEST 2016
# android.useDeprecatedNdk=true
```
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.parallel=true
org.gradle.caching=true
#Fri Apr 08 18:47:31 EEST 2016
# android.useDeprecatedNdk=true
```
2. Save the file
3. Restart the computer
8. Run `prepare.sh` to compile Qt library and download external dependencies
8. Run `prepare.sh` to compile the Qt library and download external dependencies
```
$ cd ios
$ ./prepare.sh
Expand Down
26 changes: 13 additions & 13 deletions main/docs/technical/build-osmand/setup-the-dev-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_position: 4
# How to Setup the Development Environment


To setup the development environment, you need to install the [repo utility](https://source.android.com/setup/develop#repo) and use the following [repo manifest](https://github.com/osmandapp/OsmAnd-manifest/blob/master/readonly.xml) or [any other configuration](https://github.com/osmandapp/OsmAnd-manifest).
To setup the development environment, you need to install the [`repo` utility](https://source.android.com/setup/develop#repo) and use the following [`repo` manifest](https://github.com/osmandapp/OsmAnd-manifest/blob/master/readonly.xml) or [any other configuration](https://github.com/osmandapp/OsmAnd-manifest).


If you plan to use the `readonly.xml` and the `repo` utility you can run the following:
Expand All @@ -15,27 +15,27 @@ repo init -u https://github.com/osmandapp/OsmAnd-manifest -m readonly.xml
repo sync
```

You can also use just git and checkout the following git repositories to correct folder names:
* Folder **android** - **[Osmand](https://github.com/osmandapp/Osmand.git)**
You can also use just `git` and checkout the following `git` repositories to their correct folder names:
* Folder `android` **[Osmand](https://github.com/osmandapp/Osmand.git)**
* ```git clone https://github.com/osmandapp/Osmand.git android```
* Folder **ios** - **[OsmAnd-ios](https://github.com/osmandapp/OsmAnd-ios.git)**
* Folder `ios` **[OsmAnd-ios](https://github.com/osmandapp/OsmAnd-ios.git)**
* ```git clone https://github.com/osmandapp/OsmAnd-ios.git ios```
* Folder **resources** - **[OsmAnd-resources](https://github.com/osmandapp/OsmAnd-resources.git)**
* Folder `resources` **[OsmAnd-resources](https://github.com/osmandapp/OsmAnd-resources.git)**
* ```git clone https://github.com/osmandapp/OsmAnd-resources.git resources```
* Folder **core** - **[OsmAnd-core](https://github.com/osmandapp/OsmAnd-core.git)**
* Folder `core` **[OsmAnd-core](https://github.com/osmandapp/OsmAnd-core.git)**
* ```git clone https://github.com/osmandapp/OsmAnd-core.git core```
* Folder **help** - **[osmandapp.github.io](https://github.com/osmandapp/osmandapp.github.io.git)**
* Folder `help` **[osmandapp.github.io](https://github.com/osmandapp/osmandapp.github.io.git)**
* ```git clone https://github.com/osmandapp/osmandapp.github.io.git help```
* Folder **core-legacy** - **[OsmAnd-core-legacy](https://github.com/osmandapp/OsmAnd-core-legacy.git)**
* Folder `core-legacy` **[OsmAnd-core-legacy](https://github.com/osmandapp/OsmAnd-core-legacy.git)**
* ```git clone https://github.com/osmandapp/OsmAnd-core-legacy.git core-legacy```
* Folder **build** - **[OsmAnd-build](https://github.com/osmandapp/OsmAnd-build.git)**
* Folder `build` **[OsmAnd-build](https://github.com/osmandapp/OsmAnd-build.git)**
* ```git clone https://github.com/osmandapp/OsmAnd-build.git build```
* Folder **tools** - **[OsmAnd-tools](https://github.com/osmandapp/OsmAnd-tools.git)** (servers, map creation)
* Folder `tools` **[OsmAnd-tools](https://github.com/osmandapp/OsmAnd-tools.git)** (servers, map creation)
* ```git clone https://github.com/osmandapp/OsmAnd-tools.git tools```
* Folder **web** - **[web](https://github.com/osmandapp/web.git)** (web-only)
* Folder `web` **[web](https://github.com/osmandapp/web.git)** (web-only)
* ```git clone https://github.com/osmandapp/web.git web```
* Folder **misc** - **[OsmAnd-misc](https://github.com/osmandapp/OsmAnd-misc.git)** (standalone utilities)
* Folder `misc` **[OsmAnd-misc](https://github.com/osmandapp/OsmAnd-misc.git)** (standalone utilities)
* ```git clone https://github.com/osmandapp/OsmAnd-misc.git misc```


You might not need all repositories to get tools / android or ios working. You can always double check corresponding branches in [repo-configurations](https://github.com/osmandapp/OsmAnd-manifest).
You might not need all repositories to get `tools`, `android` or `ios` working, just the ones described in the [`OsmAnd-manifest`](https://github.com/osmandapp/OsmAnd-manifest) `.xml` files.

0 comments on commit 436347a

Please sign in to comment.