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 9120197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:34:26+00:00 2026-06-17T05:34:26+00:00

I have a scorekeeping app that has variables for team names, score, etc. I

  • 0

I have a scorekeeping app that has variables for team names, score, etc. I would like to be able to take the data stored in those variables and send it via email to whomever. In other words, when the game is complete you can choose to send an email to a friend/family member with the team names and score already filled in the text of the email. I would rather it not be sent as an attachment. I know how to specify a subject and body, but not how to populate the body with the data from the app (which doesn’t get stored). The code I’m using:

    - (IBAction)email:(id)sender {
MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];
[composer setMailComposeDelegate:self];
if ([MFMailComposeViewController canSendMail]){
    [composer setToRecipients:[NSArray arrayWithObject:@"", nil]];
    [composer setSubject:@"Game Results Provided by Simple-Score"];
    [composer setMessageBody:@"" isHTML:NO];
    [composer setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
    [self presentModalViewController:composer animated:YES];
}

The problem I run into, my normal way of displaying an int which would be:

    [composer setMessageBody:@"%i", variable];

gives the error “no visible @interface for ‘MFMailComposeViewController’ declares the selector ‘setMessageBody'” instead of the output i want. If I enter static text in the setMessageBody field, it displays fine.

  • 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-17T05:34:27+00:00Added an answer on June 17, 2026 at 5:34 am

    setMessageBody doesn’t take a format string as an argument, so this is wrong:

    [composer setMessageBody:@"%i", variable];
    

    It takes an NSString object as an argument, so you want something like this:

    [composer setMessageBody:[NSString stringWithFormat:@"%i", variable]];
    

    Obviously assuming that variable is the right type.

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

Sidebar

Related Questions

I have 2 UILabels for a scorekeeping app (Home and Away). The user can
Have a look at the menu link Produkter on http://marckmann.se/ I would like to
Have a text box which get data for price. If someone enter something like
Have an app that can use tts to read text messages. It can also
Have a xml data like <Items><Item><name>test1</name></Item><Item><name>test2</name></Item></Items> Looks like jaxb cannot unmashall this when defining
Have a Facebook app that is failing as of this morning with the following
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
Have a chat room, issue is, is that when you submit something, the message
Have to set expiry date for my app. At present, I am storing the
Have a photography site that I want to prevent image copying from. How can

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.