Home Documentation CartoType and iOS

CartoType and iOS

The usual way to develop apps for iOS, the operating system used on Apple's iPhone and iPad devices, is by means of XCode, a free development environment which runs on Mac OS. The 'native language' of iOS - that is, the language used for the API, is Objective C, while CartoType is coded in C++. Luckily that does not present any problems because Objective C as implemented on the Mac is compatible with C++. You can call C++ functions from Objective C; if you give your source files the exension .mm instead of the normal .m, the compiler compiles Objective C++ instead of the normal Objective C. So it's relatively easy to write iOS apps that use CartoType's native C++ API.

iOS development using XCode:

CartoType running on an iPad (MapViewer demo app) and an iPhone (Lonely Planet guide to Ireland):

CartoType running on iPad and iPhone

Using Objective C wrappers

If you prefer, you can use an Objective C wrapper that provides Objective C classes and methods. The standard wrapper contains the classes CartoTypeModel and CartoTypeView, and a demo programm MapViewer, is provided showing how the API is used. We also supply an adapter to connect CartoType to the popular RouteMe framework: a tile-based open-source map library. The RouteMe adapter uses CartoType to create tiles as needed. The tiles are cached by the framework and drawn to the display.

Find out more

If you'd like to find out more about using CartoType on iOS, please use the form or e-mail address on the contact page.