title: AirPrint: Set default printer in UIPrintInteractionController
body: <p>I need a way to force the selected Printer to the UIPrintInteractionController when it's presented, using an already known printerId.</p>
  
  <p>NOTE: To make tests I'm using Printopia installed on my "MacBook Pro" that shares the "Printer"</p>
  
  <p>I've made this test:</p>
  
  <pre><code>-(IBAction)print:(id)sender
  {
   UIPrintInteractionController *controller = [UIPrintInteractionController sharedPrintController];
  
   UIPrintInteractionCompletionHandler completionHandler = ^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {
        NSLog(@"Selected Printer ID: %@",printController.printInfo.printerID);      
    };
  
   NSString* path = [[NSBundle mainBundle] pathForResource:@"TestImage" ofType:@"png"];
   NSURL* imageURL = [NSURL fileURLWithPath:path isDirectory:NO];
  
   UIPrintInfo *printInfo = [UIPrintInfo printInfo];
   printInfo.outputType = UIPrintInfoOutputPhoto;
   printInfo.jobName = @"Image print";
   controller.printInfo = printInfo;
  
   controller.printingItem = imageURL;
  
   if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) 
   {
      [controller presentFromBarButtonItem:self.printButton animated:YES completionHandler:completionHandler];  // iPad
   }
   else
   {
       [controller presentAnimated:YES completionHandler:completionHandler];  // iPhone
   }
  }
  </code></pre>
  
  <p>When the print is done, the app logs following Printer ID: </p>
  
  <pre><code>\032Printer\032@\032MacBook\032Pro._ipp._tcp.local.
  </code></pre>
  
  <p>I want to override the printer so I supposed to do in this way:</p>
  
  <pre><code>UIPrintInfo *printInfo = [UIPrintInfo printInfo];
  printInfo.printerId = @"\032Printer\032@\032MacBook\032Pro._ipp._tcp.local.";
  controller.printInfo = printInfo;
  </code></pre>
  
  <p>But for some reason it doesn't work, the UIPrintInteractionController don't select the printer as expected, but the printer is shown in the printer list.</p>
  
  <p>I guess the problem is the strange chars present in the Printer ID.</p>
  
  <p>Anyone knows how the printInfo.printerId is encoded and how to manually set it?</p>
  
  <p>If I store the NSString* printerId into an ivar and sets it again on next print action it works, but I cannot force a default printer by printer Id by hand.</p>
  
  <hr>
  
  <p>btw: Obviously, if the printer is not available/reachable, I know that cannot be selected ...</p>