How to Compile the iOS Version

1. Install XCode from AppStore (not BETA!)

2. Install XCode command-line tools:

$ xcode-select --install

Or in case of errors try to dowlnload and install it from Apple site:

3. Install CMake (exactly this version!):

Open your .zshrc file:

$ sudo nano .zshrc

Add this line and save file:


Reload your .zshrc file:

$ source ~/.zshrc

Verify everything works:

$ cmake --version

4. Create folder for OsmAnd repositories

$ mkdir OsmAnd && cd OsmAnd

5. Clone all OsmAnd repositories:

$ git clone build
$ git clone core
$ git clone -b legacy_core core-legacy
$ git clone ios
$ git clone -b master android
$ git clone resources
$ git clone help

6. Run

$ cd ios
$ ./

In case of error Xcode not set up properly. You may need to confirm the license...:

switch XCodeCommandLineTools to XCode app, confirm the license and swith it back.

$ sudo xcode-select -s /Applications/
$ sudo xcodebuild -license accept
$ sudo xcode-select --switch /Library/Developer/CommandLineTools

If you still have an error Xcode not set up properly. You may need to confirm the license... then need check if xcrun is available:

/usr/bin/xcrun -find xcrun

If you got:

xcrun: error: unable to find utility "xcrun", not a developer tool or in PATH

Then open Xcode > Preferences > Locations and in field "Command Line Tools" select your command line tools "Xcode 12.4"

Or in case of another errors: Get your XCode CLang version number.

$ ls /Applications/

Replace {CLANG_VERSION} in this command with your version and open file:

$ sudo nano /Applications/{CLANG_VERSION}/include/ia32intrin.h
$ sudo nano /Applications/

Comment this lines and save file.

#define _bit_scan_forward(A) __bsfd((A))
#define _bit_scan_reverse(A) __bsrd((A))

And run $ ./ again.

7. Open osmand.xcworkspace in XCode.

8. First build.

Set the build target to OsmAnd Maps. Selet as target your device or as one of IOS simulators. But don't use default 'Any IOS Device (arm64)'. Build the project. In case of build erros you can delete baked and binaries folders in OsmAnd directory. And try to build again.

Did this doc help you?

Privacy policy

Help us make these docs great!

All OsmAnd docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.