The binary distribution is one of the easiest ways to get started with WhirlyGlobe-Maply. We distribute the toolkit as a framework for iOS device and simulator.
First, download the binary distribution and unzip it into your projects directory. It should look something like this:
This guide will simply refer to it as BinaryDirectory for purposes of indicating paths.
You will need your HelloEarth project from earlier for the next part.
To add an external library in Xcode, select the top level HelloEarth node in the project tab, pick Build Phases on the right and open the Link Binary With Libraries area.
Click on the + and select Add Other. Navigate to BinaryDirectory and select WhirlyGlobeMaplyComponent.framework., then click Open.
Finally, we’ll need to add some libraries that WG-Maply needs. Click + again and add the following.
After you’ve put all those in it should look like this.
The last thing we need to do is indicate where to search for WG-Maply header files. Open up Build Settings and scroll down to Header Search Paths. Add the path as follows. Don’t forget to replace BinaryDirectory with your own.
If you’re using Xcode 7.x you need one final step: go to Build Setting and search for “Framework Search Paths”. You have to set there the folder containing the “WhirlyGlobeMaplyComponent.framework” file, that is: your own BinaryDirectory.
Maybe you’re a lucky guy and you’re doing your iOS project using Swift. In such case, you need one final step. Go to Build Settings and look for “Objective-C Bridging Header”.
Type there the following path:
Don’t forget to replace BinaryDirectory with your own.
Try and compile, just to make sure the basic are working. But that’s it! You should be set up properly for a project using WG-Maply.
Next up, let’s look at building a map or a globe.