You’ll need to start with the HelloEarth app you wrote earlier. Go do that if you haven’t already.
Open HelloEarth in Xcode. The template we used earlier should have a ViewController.swift.
If you’re using Objective-C, we’ll need to import the headers. Open ViewController.h and and this to the list of imports.
If you’re using Swift, you’re already set. The bridging header pulls in what you need.
Now let’s actually add a WhirlyGlobeViewController. We’re going to keep it very simple at first – we just want to verify the project setup before getting much further along.
For Objective-C, open ViewController.m, and find the @implementation line. For Swift, open your ViewController.swift file. Modify it like so.
Now we’ve got a private WhirlyGlobeViewController. Let’s set it up but leave it empty, and add it to our view. Modify the viewDidLoad method to read as follows.
That’s it! Pick a real or simulated iOS device and run the app. If you get a blank screen (and no build errors), you win. At this point you can be certain that your project setup is correct, and you can proceed to add WhirlyGlobe-Maply features with confidence.
If you encounter build errors, or something other than a black screen comes up on the device review the above steps, and ensure that you have done everything correctly.
Next up, adding an image layer to your globe.