hello, I'm developing an ios app using DPF.IOS but when i try to use MFMailComposeViewController I get an Access Violation error, can you help me please ?
my code :
procedureSendSMS.TestProcessAnswerSMSSend;{$IFDEFIOS}varlo_controller:MFMailComposeViewController;lo_nsarray:NSArray;lo_pointer:Pointer;beginiflo_controller.canSendMailthen//AccessViolationherebeginlo_pointer:=Pointer(nil);lo_nsarray.arrayByAddingObject(lo_pointer);lo_controller.setSubject(StrToNSString('SUJET GENIAL'));lo_controller.setMessageBody(StrToNSString('Un Message'),false);lo_controller.setToRecipients(lo_nsarray);lo_controller.setMailComposeDelegate(FParent);FParent.mailComposeController(lo_controller,0,nil);endelsebeginLog('Sorry'+#10#13+'You cant send Message '#10#13+'1) Your Device not support Message Compose'+#10#13+'2) Text Messaging not available');end;end;{$ENDIF}
I think my MFMailComposeViewController variable (lo_controller) isn't initialized but i don't know how to do this..
Thanks advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think you can use the DPF.iOS.MFMessageCompose class. It uses the MFMailComposeViewController.
Maybe you can look at the DPF.iOS.MFMessageCompose source and modify it to suit your needs.
regards
chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello, I'm developing an ios app using DPF.IOS but when i try to use MFMailComposeViewController I get an Access Violation error, can you help me please ?
my code :
I think my MFMailComposeViewController variable (lo_controller) isn't initialized but i don't know how to do this..
Thanks advance.
I think you can use the DPF.iOS.MFMessageCompose class. It uses the MFMailComposeViewController.
Maybe you can look at the DPF.iOS.MFMessageCompose source and modify it to suit your needs.
regards
chris