Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6665511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:43:52+00:00 2026-05-26T02:43:52+00:00

I am writing an enterprise client/server application. The client is an iOS app which

  • 0

I am writing an enterprise client/server application. The client is an iOS app which uses Cocoa Lumberjack to create the log files. These files will be essential for client debugging and troubleshooting. The file will be a maximum of 1MB, although making it smaller is an option.

I planned to code a “email log file” button but I can’t figure out how to send it as an attachment. I suppose I could stuff the email’s body with all my log messages, but that seems a bit ugly. What if I want to compress the file into a non-text format before sending? I’ve also considered creating a web service to upload the log file to the server but this seems like a lot of work, as I would then need to sort out who’s log file is who’s and have some kind of purge to keep it neat, etc.

Surely I’m not the first to face this issue. How is everyone else doing this?

Thanks in advance for any help you can give me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:43:52+00:00Added an answer on May 26, 2026 at 2:43 am

    Here’s some complete working code that creates an email, adds a HTML body, adds a text attachment, and sends shows the compose view.

    Make sure you also define path for resource.

    NSData *textData = [[self getEmailAttachment] dataUsingEncoding:NSUTF8StringEncoding];
    NSString *htmlData = [self getEmailBodyHTML];
    
    /* Set up the mail compose view and put in the body/attachment */
    MFMailComposeViewController *mailComposer = [[[MFMailComposeViewController alloc] init] autorelease];
    [mailComposer setMessageBody:htmlData isHTML:NO];
    [mailComposer addAttachmentData:textData mimeType:@"text/plain" fileName:@"logfile.txt"];
    
    /* Set default subject */
    [mailComposer setSubject:@"Email subject"];
    
    mailComposer.mailComposeDelegate = self;        
    [self presentModalViewController:mailComposer animated:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a J2SE app (no enterprise container) that uses JPA for persistence. Here
I'm currently writing a tool to plug into an existing enterprise application that uses
I am in the process of writing an enterprise-level application utilizing WCF and NetTCP
I am writing some logs to the event log using the Microsoft enterprise library
I have a problem with enterprise library 5. It's writing to the event log
I am writing a fat client application that I would ideally like to be
I'm writing a WPF user control which internally uses MVVM. In order to work
So I installed a trial of SQL Server 2008 enterprise edition while waiting for
Writing my first Linq application, and I'm trying to find the best way to
Writing a test app to emulate PIO lines, I have a very simple Python/Tk

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.