iPad application to generate a report - ios

I am trying to create an iPad application which has a FORM, after entering the data, when I save, the data needs to be generated as a report and sent as an email to whomever is required (the email is entered in the FORM). I want to know if this can be achieved without using web service . What is the flow in this case? Can the email client on iPad be used for this purpose?

You'd want to use an MFMailComposeViewController to display the interface for sending an email. You can pass your data to this view controller's messageBody property as an NSString. See the documentation for details.
The email message can also include an attachment (a PDF or any other file available to the app) using the addAttachmentData:mimeType:fileName: method of the MFMailComposeViewController object. In this particular case, you'd draw the form to a PDF document. Start with the Drawing and Printing Guide for iOS in Apple's documentation for details.

Related

Manipulate PDF iOS (add signature)

I'm trying to find the best solution for my problem. User is using safari on an iPad, and at one point the customer contract is created using a webservice, which sends me the URL to a PDF file.
Right now the user opens the PDF, prints it and scans it after the customer signs the contract. What they want is to capture the signature digitally, so the contract doesn't need to be scanned later.
My question is: what is the best way to embed the signature to an existing pdf file?
I wanted something similar to what the iOS mail app does natively
http://heresthethingblog.com/2015/10/28/ios-9-tip-sign-pdf-mail-pdf-tricks/
Thanks

Sending Email with attachment from Parse.com

I am working on my first IOS app which will be displayed in a public place where a user can draw an image and send this image to an email adres. I don't want to use Mail for this and the image also can not be stored on the iPad.
Therefore, i use Parse.com to store the image including name and email adres.
Now, i need to make a simple interface to send all the emails to the correct email adres including the image. We would like to check the image an email adres before sending. So i was thinking of showing some sort of tabel, with the image, name and emailadres and a send or delete button. So with a quick click we can send the image.
Now I don't know where to start!
What is the most easy way to do this? Making a second IOS app where all the images will be shown and can send/delete from? Using Mailgun and Cloud Code?
Or true a web-base interface? Using PHP?
I am all very new to this, so please help me.
Parse integrates with mail services like Mandrill so you can send e-mails from there using cloud code.
You need to have some users in the system, or some store of user details at least, then you can upload the images. Look at using a class for images, where the class just has a single PFFile and a relationship to a user.
Now, in your app you can display images and the associated user info. When hitting the 'send' button you would call a cloud function with the image objectId. The cloud code can use that to find the image, it can use Parse.Cloud.httpRequest to get the data for the image from the PFFile. Once you have that you can create your e-mail and send it.

How to share text or image from ios app to Yammer

I need to share the text or image from one ios app to Yammer social network.
I am able to do login using iOS SDK of Yammer but not getting how can I share text or image from ios app to Yammer. I got the code to share text from browser but not from application.
Anybody has any idea??
Thanks in advance for your help and efforts.
This is documented on the Yammer API page. In order to post text and attach image
https://developer.yammer.com/v1.0/docs/messages-json-post
Parameters:
body - The text of the message body.
attachmentn and pending_attachmentn - Yammer provides two methods to associate attachments with a message. Both make use of multi-part HTTP upload (see RFC1867).
The first method is the easiest, simply use file form elements with names attachment1 through attachment20. If there are a several attachments or the attachments are large it may take some time for a message to POST causing your application to appear to hang.
An alternative way is to use the Pending Attachments resource (see below for details) allowing attachments to be uploaded in parallel. Apps that support HTTP chunked transfer encoding can monitor the progress of each upload. On success each pending attachment’s response body includes an id. These pending attachment ids are to be submitted with the message using form elements pending_attachment1 through pending_attachment20. Finally, if form elements for both attachmentN and pending_attachmentN are present only the pending_attachmentN elements will be honored.
I never used Yammer, but I wrote another app like Yammer used the given API, Yamme site should provide an API to share.

Send an email using text fields for the subject and body instead of MFMailComposeViewController

I want to send an email within my app, but without the standard email layout from apple's mail app, which could be obtained through MFMailComposeViewController. I would like to have two text fields, one for the users email, one for the body, and a button to send the email. Thanks!
The whole point of MFMailComposeViewController is that it looks and acts the same as the system standard e-mail application, also after iOS itself changes (think iOS 6 --> iOS 7). This is primarily for user convenience, so you're supposed to use it. AFAIK, you don't get direct access to the e-mail protocol stack anyway, but then again, you don't need to worry about it.
Of course, you can set the subject and body programmatically, so if you really wanted to, you could have those two text fields, and then copy whatever the user has entered, to use it with MFMailComposeViewController, but why bother? It makes the user experience worse, and it's extra work for you.

How do I access in my app content of email created in the app

I have created an iphone app that allows the user to send an email using MFMailComposeViewController. I know that when the email is sent a copy is kelp in the "Sent" emails of the email client. What I wanted to do was also save that data/information to a text file on the iphone (as a log file). I can't find how to access the email information (recipient, body, etc) so as to input into the text file. Can this be done?
Thanks in advance for your help
No it can't be done in that you can't access the user's emails.
Your app can log when you present a MFMailComposeViewController and what data your app filled it in with before it was presented to the user. But you won't know if they changed it.
You dont have access to the email text in MFMailComposer class. What you can do is, create a view to capture to, cc, subject and message and then launch MFMailComposer delegate and prepopulate all the captured data. The user still has to submit the mail and could change the text all together. The captured data can then be stored within the app.

Resources