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

  • SEARCH
  • Home
  • 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 7712403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:37:21+00:00 2026-06-01T01:37:21+00:00

I’m creating an app that lets users take and store photos in a Core

  • 0

I’m creating an app that lets users take and store photos in a Core Data graph, then email these photos in a table from within the app.

I’ve been able to save the photos within the SQlite database by converting the asset paths to NSURL values and referencing them – to stop the database from suffering from memory issues.

My last task is to allow users to email their photos in a nicely laid out table, complete with a description of the photo. This is automatically generated from the UITableView that the images are displayed in.

I’m using the following to generate the HTML email:

- (NSString *)generateHTMLBody {

    NSString *res = @"<HTML><body><table border=""1"">\n";

    for (int i=0; i < [self.fetchedResultsController.fetchedObjects count]; i++) {
        NSString *rowCount = [NSString stringWithFormat:@"%d.", i+1]; 
        NSString *tmp = (NSString *)[imageList objectAtIndex:0];
        NSString *imageString = [NSString stringWithFormat:@"<img src=""%@"" />",tmp];

        res = res = [res stringByAppendingString:@"<tr><td>"];
        res = res = [res stringByAppendingString:rowCount];
        res = res = [res stringByAppendingString:@"</td>\n"];
        res = res = [res stringByAppendingString:@"<td>"];
        res = res = [res stringByAppendingString:imageString];
        res = res = [res stringByAppendingString:@"</td>\n"];
        res = res = [res stringByAppendingString:@"<td>"];
        res = res = [res stringByAppendingString:tmp];
        res = res = [res stringByAppendingString:@"</td></tr>\n"];
    }
    res = [res stringByAppendingString:@"</table></body></html>\n"];
    return res;
}

What I’m trying to do is load the images from the Core Data graph into an HTML img tag. I’m pulling the following asset path into the var tmp:

assets-library://asset/asset.JPG?id=2F62642E-00B3-4D85-82D2-A6A1F064F2CE&ext=JPG

However, this isn’t working. How would I load these photos into the email?

  • 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-06-01T01:37:24+00:00Added an answer on June 1, 2026 at 1:37 am

    How are you sending the email? Via a MFMailComposeViewController? I would have thought that you’d be attaching files via addAttachmentData:mimeType:fileName:. That’s probably easiest.

    Alternatively, if you want to build a custom, pretty html body with images included in there, you probably want to pursue a base64 encoding of your images. You then put something like <img src="data:image/gif;base64,XXX"> in your html, where XXX is the base64 encoding of your image. When I did this, I encoded using Google GTMBase64 in GTM:

    http://code.google.com/p/google-toolbox-for-mac/

    There are also articles here about base64 libraries, e.g.

    How do I do base64 encoding on iphone-sdk?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
We're building an app, our first using Rails 3, and we're having to build
I need a function that will clean a strings' special characters. I do NOT
I want to construct a data frame in an Rcpp function, but when I

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.