I did it a few months ago.  Have you tried the sample code?

https://developer.apple.com/library/content/samplecode/PrintBanner/Introduction/Intro.html#//apple_ref/doc/uid/DTS40013422

> On May 11, 2018, at 7:54 PM, Carl Hoefs <newsli...@autonomy.caltech.edu> 
> wrote:
> 
> As an addendum:  I've verified that I can print from the iPhone Photos app to 
> my printer using AirPrint. The issue is doing it programmatically.
> 
> 
>> On May 11, 2018, at 5:50 PM, Carl Hoefs <newsli...@autonomy.caltech.edu> 
>> wrote:
>> 
>> Is printing from iOS still possible? Is AirPrint still a viable SDK to use? 
>> 
>> I can get AirPrint to bring up a printer selection screen, but it won't 
>> actually select a printer.
>> 
>> I present the printer selection screen:
>> 
>>   UIPrinterPickerController *printPicker = 
>>          [UIPrinterPickerController 
>> printerPickerControllerWithInitiallySelectedPrinter:nil];
>>   [printPicker presentAnimated:YES completionHandler:
>>         ^(UIPrinterPickerController *printerPicker, BOOL userDidSelect, 
>> NSError *error)
>>          {
>>                 // . . .
>>          }];
>> 
>> By default, this presents a tableview with an entry that says: 
>> 
>>   "Printer                          Select Printer >"
>> 
>> and below, it shows a preview of the image that will be printed. So far, so 
>> good.
>> 
>> If I tap on "Select Printer >" it takes me to a tableview list of the 
>> available printers. 
>> If I tap an available printer, it takes me back to the default screen, with 
>> NO printer selected!
>> 
>> The printer is an AirPrint-capable device (Canon), on the local wifi with 
>> the iPhone. I've implemented all of the UIPrintInteractionControllerDelegate 
>> callbacks (none of which get called).
>> 
>> What is going wrong here? There's nothing in the Xcode log.
>> 
>> -Carl
>> 
>> _______________________________________________
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/newslists%40autonomy.caltech.edu
>> 
>> This email sent to newsli...@autonomy.caltech.edu
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to