1

to get help , I followed this post http://www.thoughtsonmobile.com/category/development/crossplattform-app-development

My objective is to use PhoneGap 1.4.1 plugin in iOS to write to an XML file and send that xml file via attachment in mail client

I am able to create an empty XML file in the path /var/mobile/Applications/D7558E05-1345-443E-A2E6-.../Document/readme.xml which I verified under Iexplorer to be under the Documents folder

I followed the steps in the mentioned site, exactly, but there is one confusion on how to pass the path to the Phonegap.exec command.. Should I pass the complete path "/var/mobile/Applications/D7558E05-1345-443E-A2E6-.../Document/readme.xml"

should I pass as follows

window.plugins.emailComposer.showEmailComposerWithCB(null, "subject", "body", "hello@gmail.com","ccsupport@test.com","bccsupport@test.com", false,XMLFilePath); where var XMLFilePath = window.rootFS.fullPath + "/" + "readme.xml"; or should it be just XMLFilePath = window.rootFS.fullPath

As mentioned in the site, in the EmailComposer.js I added
if(attachment) args.attachment = attachment; and checked, by alerting if the args.attachment is getting the path, its coming as /var/mobile/Applications/D7558E05-1345-443E-A2E6-.../Document/readme.xml

I added snippet as per the site, "NSString* attachmentPath = [options valueForKey...."to the EmailComposer.m code from "https://github.com/phonegap/phonegap-plugins/blob/master/iOS/EmailComposer/EmailComposer.m" which I am using

When I run the code I am NOT getting the attachment, am oly getting the subject, to and body

Please help

It would be very useful if you could upload a sample, complete xcode project for mail attachment.

4

0 回答 0