tags:

views:

643

answers:

2

I'm trying to add the ability to send an email from my iPhone app, and step one appears to be to add the MessageUI Framework to my project and I it doesn't appear in my list of existing Frameworks. There is something called Message Framework. Is that it? Has Apple renamed it?

I did download the MailComposer sample and I can see that that project seems to have the MessageUI.framework in it, albeit not in the Frameworks folder with UIKit, Foundation, and CoreGraphics.

How should I proceed?

Note that I'm running Xcode 3.2 on Mac OS X Version 10.6.1

+2  A: 

I ran into the same thing (I think), check to make sure you're in the iPhone frameworks folder when you go to add framework. Hit M to take you to it, the Mac one has a bunch of M frameworks in it, the iPhone has only 1, message kit (I think), just hit M.

That's what was wrong with mine.

EDIT: http://i648.photobucket.com/albums/uu206/jpasq03/Screen16.png

I'm a new user, so I can't embed the image, sorry.

JoePasq
I'm still not finding it. What's the path to the iPhone frameworks folder? When I right click on the Frameworks folder in my project and choose add and Existing Frameworks, a long list appears and MessageUI is not in it. I see the option for Add Other... on the bottom of the list and can see that I can look in other folders but I haven't been able to locate it specifically.
Dale
Found it!!! It was at /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/System/Library/Frameworks/MessageUI.framework
Dale
The top of the open dialog has a recently saved/opened locations scroll box thing, try looking around in there.
JoePasq
There you go! Rock on, and don't forget the delegate methods. Also, I found this method really useful and change the status bar in the process.- (void) mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [self becomeFirstResponder]; [self dismissModalViewControllerAnimated:YES]; UIApplication *application = [UIApplication sharedApplication]; if([application statusBarStyle] != UIStatusBarStyleBlackOpaque) { [application setStatusBarStyle:UIStatusBarStyleBlackOpaque animated:YES]; }}
JoePasq
vote me up, pretty please.
JoePasq
I'm very new to this web site Joe. I think I "voted" you up, but I'm not sure if it was by setting the check mark or by hitting the up arrow. Let me know if you don't mind.Also, one important thing. WHen I added the framework from the folder I mentioned I got a bazillion syntax errors when I built my project. I found though that if I got the framework from the /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks all was well!
Dale
I also am new, and you did. Thanks. I think you hit the asker hits the check mark to say that the question was answered (and then the vote goes up) and other people who agree can second that with the arrows (or bury it). Ahh, you may want to double check on that when you compile for device, I think it may break it, and then you just re-add it from "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks/MessageUI.framework" I'm not quite sure about it though.
JoePasq
+1  A: 

This is the real answer - To add it to your project, open up your target information. (You can do this by selecting your build target, and right-clicking to select Get Info). On the 'General' tab, you'll see 'LInked Libraries'. Here you can add new libraries that are actually available. MessageUI.framework is indeed one of those libraries. This should solve your cross-platform build issues. – Malaxeur

Dale