Blue Otter Software

Custom Software Development and IT Consulting

« GCWIN signs three year software and support contract for use of WILbUR

Embedding route-me with XCode 4.x

I’m working on a new partnership project.   This one is an ios app.   I need an online/offline mapping library and route-me looks like an EXCELLENT tool.   Its easy to integrate and can use an variety of online and offline map sources.

Most of the documentation centers around xcode 3.x, which isn’t radically different from xcode 4.x, but to a relative newcomer to ios programming I wanted to get the process documented so I could reproduce it.   Here are the steps I took.   ymmv :)

First, read the excellent embedding guide for route-me.

With the changes from xcode 3.x to 4.x, here’s what I did to integrate route-me:

  • Select File->Add Files to “YourProjectName”
    • Select MapView.xcodeproj
    • DON’T select Copy into destination group’s folder
    • Add to target “YourProjectNameAppTarget” should be selected
  • If you did it right, you should have MapView.xcodeproj listed as a file with 5 targets.
  • Select the “YourProjectName” in the Groups and File Sidebar
    • In the Editor Window select the “YourProjectNameAppTarget” target
    • Select “Build Phases” in the Editor Window top bar
      • Expand “Target Dependencies”
        • Select + in “Target Dependencies” to add dependency
        • Under “MapView” select “MapView” (NOT MapView-framework) and Add
      • Expand “Link Binary With Libraries”
        • Unless already present add:
          • CoreGraphics.framework
          • CoreLocation.framework
          • QuartzCore.framework
          • libsqlite3.dylib (NOT libsqlite3.0.dylib!?)
          • libMapView.a
    • Select “Build Settings” in the Editor Window top bar
      • Select “All” right under the Editor Window top bar
      • Scroll down to “Search Paths” section and expand
        • Select Debug and Add
          • Any Architecture/Any SDK should be set
          • Double Click on path window portion
            • Select recursive
            • Add “RelativeToYourProjectMapViewFolderPath” (for me its “../route-me/MapView”
        • Select Release and Add
          • Any Architecture/Any SDK should be set
          • Double Click on path window portion
            • Select recursive
            • Add “RelativeToYourProjectMapViewFolderPath” (for me its “../route-me/MapView”
      • ???Code Signing?
  • Try a build – Your Project and MapView should both build – no warnings (???depends on target?)
  • Follow the rest of the guide for integrating route-me with your project :)
, , , ,
June 20, 2011 at 06:14
4 comments »
  • July 7, 2011 at 06:23Lucas

    Thanks a ton for this it helped a lot. I like the detail you use. Just a clarification. I think it would help if you specified that what to edit under “Search Paths” maybe something like: Find “Header Search Paths” under “Search Paths”
    Again thanks for the help!

  • August 19, 2011 at 06:39Josh

    Yeah, I agree. It’d be helpful if the last two steps pointed our Header Search Paths specifically. But still VERY helpful! Probably wouldn’t have figured it out myself! Thanks!

  • November 11, 2011 at 03:58Spyros

    Hi, I try to add libMapView.a in the expanded “Link Binary With Libraries” but lib doesn’t exist (red color in Products folder of MapView.xcodeproj).

  • December 8, 2011 at 16:12Gene

    Thanks for the tips. I needed to make some iOS 5/ Xcode 4.2 specific changes, such as changing the GCC 4.2 compiler setting to Apple LLVM compiler but after that I got a clean build. I still have a few warnings such as upgrading “to the the project format” but the demo apps run.
    Thanks again!

Leave a Reply or trackback