title: Phonegap (Cordova) 2.7.0 + Mapkit Plugin + Getting Started
body: <p>I am trying to get the <a href="https://github.com/phonegap/phonegap-plugins/tree/master/iOS/MapKit" rel="nofollow">PhoneGap Mapkit Plugin</a> up and running.</p>
  
  <p>This is what I did so far:</p>
  
  <ol>
  <li><p>I added the <a href="http://blog.thinketg.com/xcode-4-tips-adding-frameworks-to-your-project/" rel="nofollow">MapKit framework</a> into my xcodeproject:</p>
  
  <pre><code>Framework/
    MapKit.framework
    ...
  </code></pre></li>
  <li><p>Downloaded and added <a href="https://github.com/phonegap/phonegap-plugins/tree/master/iOS/MapKit" rel="nofollow">MapKit</a> plugin native files to the plugins folder:</p>
  
  <pre><code>Plugins/
     AsyncImageView.h
     AsyncImageView.m
     CDVAnnotation.h
     CDVAnnotation.m
     MapKit.h
     MapKit.m
  </code></pre></li>
  <li><p>Downloaded and added <a href="https://github.com/johnezang/JSONKit" rel="nofollow">JSONKit</a> plugin native files to the plugins folder:</p>
  
  <pre><code>Plugins/
     ...
     JSONKit.h
     JSONKit.m
  </code></pre></li>
  <li><p>Downloaded and added <a href="https://github.com/phonegap/phonegap-plugins/blob/master/iOS/MapKit/MapKit.js" rel="nofollow"><code>MapKit.js</code></a>:</p>
  
  <pre><code>www/js/
     MapKit.js
     ...
  </code></pre></li>
  <li><p>Included the <a href="https://github.com/phonegap/phonegap-plugins/blob/master/iOS/MapKit/MapKit.js" rel="nofollow"><code>MapKit.js</code></a> file in the index.html:</p>
  
  <pre><code>...
  &lt;script type="text/javascript" src="cordova-2.7.0.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/MapKit.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/index.js"&gt;&lt;/script&gt;
  ...
  </code></pre></li>
  <li><p>Added the Plugin to the <code>config.xml</code> file:</p>
  
  <pre><code>...
  &lt;widget&gt;
    ...
    &lt;plugins&gt;
      ...
      &lt;plugin name="MapKitView" value="MapKitView" /&gt;
    &lt;/plugins&gt;
    &lt;access origin="*" /&gt;
  &lt;/widget&gt;
  </code></pre></li>
  <li><p>Added a <code>showMap</code>function to my app object in the <code>js/index.js</code> file:</p>
  
  <pre><code>var app = {
    ...
    onDeviceReady: function() {
      app.showMap();
    },
    showMap: function(){
      window.plugins.mapKit.showMap();
      window.plugins.mapKit.setMapData({
            buttonCallback: function(){
              alert(arguments[0]);
            },
            height: 360,
            diameter: 1000,
            offsetTop: 25,
            lat: pins[0].lat,
            lon: pins[0].lon
         });
      window.plugins.mapKit.addMapPins([{
              lat:49.281468,
              lon:-123.104446,
              title:"Nitobi HQ",
              pinColor:"purple",
              selected:true
         }]);
    }
  }
  </code></pre></li>
  </ol>
  
  <p>After running this nothing happens. No Map no Errors...</p>
  
  <p><strong>Console Output</strong></p>
  
  <pre><code>-&gt; Multi-tasking -&gt; Device: YES, App: YES
  -&gt; Resetting plugins due to page load.
  -&gt; Finished load of: file:///..pathto../iPhone%20Simulator/6.0/Applications/...SOMEKEY.../PhoneGapIOSExample.app/www/index.html
  -&gt; DEPRECATION NOTICE: The Connection ReachableViaWWAN return value of '2g' is deprecated as of Cordova version 2.6.0 and will be changed to 'cellular' in a future release. 
  </code></pre>
  
  <p>What am I missing?</p>