Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 115

Sherry
Lost but trying
Profile
Posts: 135
Reg: Jan 05, 2013
South Africa
11,650
10/09/15 10:35 AM (8 years ago)

Emailing not working on iPad

I am having a problem with emailing on iPad, however on iPhone there is no problem and everything works fine. If I click the email icon on pdf doc plugin or try to email an image using email image plugin on iPad I get the following error on the output when the iPad is connected to xCode: Warning: Attempt to present <MFMailComposeViewController: 0x14f816a00> on <UIAlertController: 0x150929980> whose view is not in the window hierarchy! and when I disconnect the iPad and click YES with Would you like to email this document nothing happens. A few days ago it opened the mail compose window but didn't dismiss it now I am not even getting as far as the email compose window. I had a problem with emails not dismissing when xCode 6 came out and then it automatically sorted itself out when a later Xcode build was published but this time I have an app that needs to go into the app store and can't wait in the hope Apple might or might not publish a build that fixes it so am asking for the help from the experts.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
10/10/15 12:22 PM (8 years ago)
 
Sherry
Lost but trying
Profile
Posts: 135
Reg: Jan 05, 2013
South Africa
11,650
like
10/10/15 02:16 PM (8 years ago)
I don't get exactly the same output message but the result on the app is the same you click YES to email the pdf file and nothing happens the same as what's mentioned on the stack overflow doc. Would you be able to guide me on the correct code to use and where to insert it to see if this fixes the pdf plugin because just pasting the fix mentioned dispatch_async(dispatch_get_main_queue(), ^ { [self presentViewController:vc animated:YES completion:nil]; }); throws an error in Xcode because it doesn't know what the vc ViewController is which is obvious but I'm not sure the correct one to use sorry I feel really stupid here but I don't know much about coding and tried typing [self presentViewController:MFMailComposeViewController as well as :UIAlertController but Xcode didn't like that. Today I managed to get the EmailImage plugin working after pasting code from a fresh download but pdf is still a problem even went so far as to build a brand new dummy app with just pdf doc plugin in it on both self host and BT but still.
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
10/29/15 03:00 PM (8 years ago)
The code to change is the "vc". Try replacing it with BT_viewController and see what happens.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.