Hi all,
I am new to iPhone developement.
Here is my question. I would like to do a 'device texting capability' check on my iPhone simulator before I deploy it to my phone. This is the code I wrote in the .m file. This is the function which is called when my SMS button is triggered.
Class messageClass = (NSClassFromString(@"MFMessageComposeViewController"));
if (messageClass != nil)
{
NSLog (@" \ntxting\n");
// We must always check whether the current device is configured for sending messages
if ([messageClass canSendText] == TRUE)
{
NSLog (@"canSendText is not passingg"); //Not entering this loop
[self displayTextSheet];
}
The problem is that the if-loop does not enter. I was wondering if the Messageview controller does not pop up in the simulator at all and only for the phone.
Please advice.
Update: I have added a NSLog in the messageClass if loop and that gets printed. so messageClass is not 'nil'