Print doc with iPhone application - iphone

I am a new iPhone Application developer. I want to create an application which will print a document or string by a button tap.After tapping the button search the printer which is in network path.iPhone device and printer will be connected with wireless LAN. I read the Apple guideline to create such type of application, but I am so new a developer that I don't understand all of this.
Thanks in advance.

You might find this tutorial http://bynomial.com/blog/?p=115 helpful.

Related

Getting all Wifi-Connections and their details in tableView

I want to get all the Wifi Connections details in my iPhone App and connected my iPhone with any of Wifi Connection same as shown in the given picture
can anyone guide me with any good tutorial Thankx in advance
though you can get the list using the stumbler source code http://code.google.com/p/iphone-wireless/ but this is undocumented API and if you wish to submit your app to the app store then it will get rejected , but will be ok with enterprise applications..

How can i Open Serial Port of Dock connector in iOS 5.0.1

I can successfully open the serial port of iPhone/iPad in lower version than iOs 5. with the use of
open("/dev/tty.iap", O_RDWR | O_NOCTTY | O_ASYNC))
but i got error "Operation not permitted" in iOS 5 .
(I used the Serial Programming for communicating accessory and iPhone)
Is there any one have idea about this.
Thanks.
Since it also doesn't work for me I think Apple blocked serial access on iOS5+. Stefan Esser (#i0n1c on twitter) just had a talk about this at a security conference. I'm waiting for the slides so then we know what happened to serial
Not sure if you got this working, but from what I have read you can not access the iPhone's serial port for communication while your app is in the sandbox. By sandbox, I mean when you click "run" in Xcode and transfer your app to your iDevice the app lives in a sandbox environment. This environment prohibits your app from accessing things such /dev/tty.iap the serial port within the dock connector. One solution I have read is to copy your app /Applications/which is a link to the location /var/stash/Applications.XXXXXX/ which should take your app out the sandbox environment, and give it access to /dev/tty.iap Let me know if this works for you as this is something I am eventually going to have to do with the app I am developing.
I got the same error and was able to solve it by putting the app in the directory where Cydia apps go rather than where Xcode automatically puts it (Found this hint in the second link in this related/identical post).

How to get name of paired MFI device to iPhone via bluetooth?

I have a MFi keyboard. It is already paired to the iPhone via bluetooth.
I want to programmatically get the name of the paired keyboard. I searched some forums and they say it's possible to do that...
But how do we get the name using "External Accessory"?
A sample code would help me a lot.
Thanks
Initialize your EAAccessory object and then call the property name on your accessory object
NSLog(#"%#",connectedAccessory.name);

iphone - making Wifi-list app

I want to programmatically show a list of available wifi on my iphone.
I tried to run this program but it doesn't work.
http://code.google.com/p/iphone-wireless/wiki/Stumbler
Does anyone have any tutorial or sample code about creating a list of wifi-network.
Thanks.
I think that's not possible. I didn't try it myself. But I just read the first few lines of the description of Stumbler. There's the following line:
Stumbler can not be distributed through the app store, as it uses private APIs!
So I don't think it's possible to create an application that lists all WiFis. On iPhone this is a part of the Operating System.
Sandro Meier

iPhone and printer integration Sample code/API for custom App development

My recent engagement demands a printer integration using iPhone. The app will
• Generate a PDF with the collected data
• Print the same when user clicks print button
I am fairly new in iPhone development. There are hardly any reference and sample codes to support the printing feature , however there are quite a few apps available in the market to print from iPhone!
Please help me with reference or sample code to realize the feature from within the custom app we are building.
Many Thanks
-Jeet
I haven't developed an app that supports printing, however, I'm pretty sure the ones that do must be connecting to a companion OS X application running on some computer on the same wifi network that the iPhone app connects to and sends its data to.
This means that you'll have to look at the printing docs and sample code for the Desktop and build a helper app that will receive connections from your iPhone app. There is sample code to show you how to discover a computer on your network using Bonjour. You can then just stream the data over the network using a socket to the Desktop app from the iPhone and have it pass along the print job.
You say that you're fairly new to iPhone development, so this comes with a warning that it's not for the faint of heart.
Here is a blog post on how to communicate between desktop and iPhone using Bonjour:
http://cocoa-nut.de/?p=27
Best Regards,
There is official printing API from Apple. This only support for iOS 4.2 and above though:
http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/Printing/Printing.html
I am also looking for the same solution as I need to do this for the application that I am working on. I am also generating the PDF and user can then print it.
As you are saying that already developed apps are printing without using intermediate PC. But while searching over the net I came around an application which is useful for printing for Epson
http://mobile.eurosmartz.com/products/print.html
There it is mentioned by the company it self that "Install “Print” on your iPhone, download the free WePrint software for your desktop/laptop computer and then you can print directly from your iPhone."
Also there is another application on iTunes called "PrinterShare- print from iPhone to anywhere". There also they mentioned that computer connected to printer needs the PrinterShare software.
So I think there is a mediator present in these printings.
Let me know if you find some more information on this topic, as this is very new and clients are asking to avail this facility in there applications.
If you come to know any sample application
Regards,
Vishal.
There is currently no Official printing API.
You could of course implement your own LPR printing code.
Or you can license a ready API from someone like www.e-workshop-dev.com