MFMessageComposeViewControllerDelegate ios5 didnot find - iphone

i have develop one app in ios4.0. in which i implementing the code of SMS and it works great but when i run in ios 5 it get me error like did not find MFMessageComposeViewControllerDelegate protocol whereas i am already imported MessageUI/MessageUI.h , MessageUI/MFMailComposeViewController.h.
Please help me...

Just add the Message Framework imports:
#import <MessageUI/MessageUI.h>
#import <MessageUI/MFMailComposeViewController.h>

Remove the MessageUI framework from your build settings and add it again

I have found a solution. just change the deployment target of your project to 4.0 and it works..

Related

MFMailComposeViewController.h Broken

After successfully implementing the MFMailComposeViewController in my app, run it in the simulator and my iPhone, where it still works fine, it just crashed.
I get 5 MFMailComposeViewController.h issues: Cannot find protocol declaration, Expected identifier or '(', etc,...
My Controller header includes:
MessageUI/MessageUI.h
MessageUI/MFMailComposeViewController.h
and conforms to protocol:
#interface DetallViewController : UIViewController < UIActionSheetDelegate,
MFMailComposeViewControllerDelegate>
I've tried to:
1) remove and add the framework
2) Restart the device and Xcode as suggested in many posts
3) Create a separate controller to handle MFMailComposeViewController
After 3 days with this issue I'm completely stuck on this. As you can imagine, any help would be appreciate.
I would think this is a kind of reference issue since it appears whether the framework is selected or not.
Thanks in advance
Just to anybody it may help, I finally found the issue:
A missing #end in an imported header.
Thanks to everybody for the efforts.

AVFoundation/AVCaptureDevice.h not found

i want to use this header #import < AVFoundation/AVCaptureDevice.h > in theos tweak, but i get this error:
AVFoundation/AVCaptureDevice.h: not such file or directory
i also add the AVFoundation framework to the makefile.
if i do #import < AVFoundation/AVFoundation.h> work fine, but i need this header AVCaptureDevice.h
help!
EDIT: My apologies, I completely missed the lower part of your post for some reason.
Just import the whole AVFoundation framework. It will include the AVCaptureDevice header for you.
For Theos projects, you need to add the frameworks to your makefile.
Look for this line (if it doesn't exist, add it manually):
*YOUR_PROJECT_NAME*_FRAMEWORKS
There's where you add any public framework you want to use. Suppose your app is called "myVideo" and you want to add the AVFoundation framework, you would do this:
myVideo_FRAMEWORKS = AVFoundation
As an additional piece of info, if you wanted to add more frameworks you do this:
myVideo_FRAMEWORKS = AVFoundation UIKit

iAd in iphone application "'ADBannerContentSizeIdentifier320x50' undeclared (first use in this function)"

I am using iAd in my iphone 4.0 application but after adding the ADBannerView on view and when i try to set the ADBannerView properties using below code :-
adViewTemp.requiredContentSizes= [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];
I get the below error message:-
error:
'ADBannerContentSizeIdentifier320x50'
undeclared (first use in this
function)
and i also check the sample provided by apple "iAdSuite" i get the same error in this sample.
so can any one suggest how i solve this issue.
Thanks
Make sure you have imported the iAds Franework and included the import statement.
#import <iAd/iAd.h>
Not just the header, add the Framework. In Frameworks on the left, cmd-click, choose Add Existing Frameworks, select the iAd framework.

XCode doesn't recognize UI Class UITextChecker

I am writing an app for my iPad running 3.2.2 with XCode 3.2.3. It seems that the highest version of the iOS for iPad this version of XCode has is 3.2, but other apps load fine onto the phone so this doesn't seem to be an issue. I am attempting to make use of the new UITextChecker class. I have imported UIKit, and UITextChecker.h appears in the headers folder under the UIKit.framework icon. However, when I try to compile this code:
NSString *theLanguage = [[UITextChecker availableLanguages] objectAtIndex:0];
or simply this:
UITextChecker *textChecker;
XCode tells me that UITextChecker is undeclared. Any ideas what it going on here? Thanks!
James
Here is a picture of the UIViewController's header file:
For whatever reason, UIKit.h does not import UITextChecker.h. You can fix this by also adding the following line.
#import <UIKit/UITextChecker.h>

iOS linking to "ABAddressBook.h"

So I suspect this to be a project problem as opposed to a code problem. I am still relatively new to xcode. I am trying to access the ABAddressBook libraries and have included them in the project alright.
![alt text][1][1]: http://i.stack.imgur.com/lBaW0.png
Now when I try to say import "ABAddressBook.h", it doesn't know what I am talking about. Is there anything else I need to do to get that set up? Thanks!
Try
#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>
You have to import two frameworks one is the
AddressBook and the other is AddressBookUI and then you have to import those files into your viewController subclass file and you are done