title: How to download dataset for Vuforia app?
body: <p>I'm developing sample apps from Vuforia SDK 1.5.9 in Xcode 4.2 with iOS 5.1. In that version I could not make my trackable datasets on my own - I have to use online solution from Qualcomm. Does anyone know or have anyone tried to download datasets from remote location? So you generate them as usual but download them into app from server, so I can for example choose which one to download and use on fly?</p>
  
  <p>Yesterday I've given it a quick try with this:</p>
  
  <pre><code>-(void)setupMarkers{
      NSString *filePathX;
      //connect to the remot location
      NSURL *urlD = [NSURL URLWithString:[NSString stringWithFormat:@"%@/frames.dat",kURLServer]];
      NSData *urlData = [NSData dataWithContentsOfURL:urlD];
      if ( urlData )
      {
          NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
          NSString *documentsDirectory = [paths objectAtIndex:0];  
  
          NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory,@"frames.dat"];
          [urlData writeToFile:filePath atomically:YES];
      }
      NSURL *urlX = [NSURL URLWithString:[NSString stringWithFormat:@"%@/frames.xml",kURLServer]];
      NSData *urlDataX = [NSData dataWithContentsOfURL:urlX];
      if ( urlDataX )
      {
          NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
          NSString *documentsDirectory = [paths objectAtIndex:0];  
  
          NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory,@"frames.xml"];
          [urlDataX writeToFile:filePath atomically:YES];
          filePathX = filePath;
      }
      //put them into markersArray
      [self.markersArray addObject:filePathX];
  }
  </code></pre>
  
  <p>I know it is ugly, but as I said it was a quick try, but it didn't work at all. I know there is new Vuforia SDK 2.0 with clouds and stuff, but afaik I would have to use iOS6 &amp; Xcode 4.5 - which is not a solution for me right now.</p>