Testing AirPrint from your iOS apps

Recently while working on our iOS app we had to integrate AirPrint feature in the app to let the user print some documents from the app. AirPrint is an Apple technology that lets you print documents from your iOS and MAC devices without requiring any additional software. The printer needs to be AirPrint capable and many latest printers have adopted the technology. A full list can be found here http://support.apple.com/kb/ht4356.

But if you are stuck with a printer which is not AirPrint compatible (check your printer model in the link above to see if it is indeed AirPrint compatible or not), you can still test your app with that printer. Thanks to my teammate for pointing me to this useful software called handyPrint which helps you with exactly this issue.

For testing from an iOS simulator:

1. Your MAC machine needs to be on the same network as your printers.

2. So, before handyPrint, if you go to your iOS app on the simulator and try to search for a printer, it will show you the below message. Even though printers are available on your network, they are not AirPrint compatible.

Screen Shot 2014-05-06 at 3.54.40 PM Screen Shot 2014-05-06 at 3.54.50 PM

3. Download and install handyPrint from http://www.netputing.com/applications/handyprint-v5/

Screen Shot 2014-05-06 at 3.56.13 PM

4. Open handyPrint. It will show you your network printers. Turn the switch it displays to ON. You will see a green light below with the text ‘Sharing’.

Screen Shot 2014-05-06 at 3.56.54 PM

You will notice that this is a trial version of handyPrint valid for just 14 days. You can purchase the full license with a very small donation (as less as 5$).

5. Now go back to your app on the simulator and click on Search Printers. This time it will show up both the printers that are being displayed on handyPrint. Select any printer you like and give a print command and it will all work.

Screen Shot 2014-05-06 at 3.57.13 PM

For testing from an iOS device:

1. Make sure handyPrint is installed and your printers are shared as detailed above.

2. On your MAC, click on the wifi option and click on ‘Create Network’.

Screen Shot 2014-05-06 at 3.59.16 PM

3. Enter a name for the network and click create.

Screen Shot 2014-05-06 at 3.59.30 PM

4. Your MAC will now broadcast the TestPrinting network. On your iOS device, go to Settings->Wifi. You will see ‘TestPrinting’ listed or you can add it from ‘Other’ option. Your iOS device will now be on the TestPrinting network. Connect your MAC to an ethernet cable to make sure that the connection between the MAC and the printer still works.

photo 1 photo 2

5. Go to your app on your iOS device and search for printers. The two shared printers will now show up. Select a printer and give the print command and it should work. You can see the job in the print queue on your MAC as well.

photo 3 Screen Shot 2014-05-06 at 4.10.21 PM

Advertisements

iOS 7 app icon sizes and misc. information

I wanted to create a one-stop guide for the icon sizes that are required for any app submitted to the app store and one that is compiled with base sdk iOS 7.x and targeting iPhones and iPad devices. The below table is an exercise for exactly that. Also included is some miscellaneous information that may come in handy.

iOS7_icon_img_size_name

The ‘Image name’ row is just a file naming convention for the resources that you use for a particular device type.

Although iPhone 5, iPad 3rd and 4th gen are no longer being sold by Apple, I decided to keep them in the table since they use the same set of icons as iPhone 5C/5S and iPad Air respectively (which are being sold by Apple as of this day).

For more information, you can refer to Apple’s own documentation:

https://developer.apple.com/library/ios/documentation/userexperience/conceptual/MobileHIG/IconMatrix.html

3D dragging in iOS using Core Animation

I recently installed an app on my iPhone called ‘Taasky’

https://itunes.apple.com/us/app/taasky-beautiful-simple-easy/id720309412?mt=8

It is a simple task manager to create and manage your to-do lists. Despite the simple functionality it is ordained to do, the UI is beautiful and intuitive and the animations are elegant. One particular animation from the app struck a chord with me. It was a 3D dragging of a view from the top when you pull down your main view to create a task. I have recently started learning Core Animation programming in iOS and wanted to emulate this particular animation of Taasky as best as I can.

The result is my HV3DDrag project on github: https://github.com/hetalv985/HV3DDrag

And here is a video of the animation in action that the HV3DDrag project achieves:

 

Please checkout the project on github and do let me know through your comments if you have any feedback.

iOS – Color Selector

I recently published a simple color selector tool for iOS. The project is available for free under the MIT license and can be integrated easily in your iOS apps. It is currently designed to work for iPhone 4, iPhone 4s, iPhone 5 and iPhone 5s form factors. The project has been created with Xcode 5.0 with Base SDK iOS 7. The deployment target is iOS 6.0 which means it works on iOS 6.0, 6.1, 7.0 and above. The code has been tested on iOS simulators for iOS 6.0, 6.1 and 7.0 with 3.5 inch and 4 inch displays.

Here is the link to the Github project: https://github.com/hetalv985/HVColorSelector

And here is a link to the wiki page where you can see the screenshots:

https://github.com/hetalv985/HVColorSelector/wiki

If you have any suggestions or feedback, please feel free to leave a comment.

Note: In case you face a crash when trying to run the project, select the Target in Xcode. Click on General. Go to Deployment Info section and set the ‘Main Interface’ to be either ‘Main_iPhone4’ or ‘Main_iPhone5’ storyboard and then run the app.