We have recently updated Xcode & Cordova and made some changes on our app. Every time when i hit the "Generate PDF"-button the UIDocumentActivityViewController shows up. Now when you click on iBooks or any other app listed, the app crashes/freezes.
2015-11-04 13:40:48.987 Foo-App[405:31201] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
2015-11-04 13:40:54.350 Foo-App[405:31201] Creating pdf from html has been started.
2015-11-04 13:40:54.357 Foo-App[405:31201] Creating pdf from html has been started.
2015-11-04 13:40:54.421 Foo-App[405:31201] Html2Pdf webViewDidFinishLoad
2015-11-04 13:40:54.444 Foo-App[405:31201] HTMLtoPDF did succeed (file:/var/mobile/Containers/Data/Application/B9F83B50-4201-44D4-A01B-549C5017BC15/Documents/Ihr-Haus.pdf)
2015-11-04 13:40:58.804 Foo-App[405:31201] Html2Pdf webViewDidFinishLoad
2015-11-04 13:40:58.847 Foo-App[405:31201] HTMLtoPDF did succeed (file:/var/mobile/Containers/Data/Application/B9F83B50-4201-44D4-A01B-549C5017BC15/Documents/Ihr-Haus.pdf)
2015-11-04 13:40:58.883 Foo-App[405:31201] Attempt to present <_UIDocumentActivityViewController: 0x18413000> on <MainViewController: 0x17db5e70> which is waiting for a delayed presention of <MFMailComposeViewController: 0x18b01400> to complete
2015-11-04 13:40:59.456 Foo-App[405:31201] Warning: Attempt to present <MFMailComposeViewController: 0x18b01400> on <MainViewController: 0x17db5e70> which is already presenting <_UIDocumentActivityViewController: 0x18b5a800>
Process 405 stopped
* thread #1: tid = 0x79e1, 0x366cfc84 libsystem_kernel.dylib`__pthread_kill + 8, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x366cfc84 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
-> 0x366cfc84 <+8>: blo 0x366cfc9c ; <+32>
0x366cfc88 <+12>: ldr r12, [pc, #0x4] ; <+24>
0x366cfc8c <+16>: ldr r12, [pc, r12]
0x366cfc90 <+20>: b 0x366cfc98 ; <+28>
What happened? Before the update everything went well. Any help would be super! Greets
EDIT:
This is where we call the html2pdf to create a pdf
// create PDF and send by e-mail
window.html2pdf.create(
sgs.mailBody,
"~/Documents/Ihr-Haus.pdf",
//cordova.file.documentsDirectory."Ihr-Haus.pdf",
// success
function(status) {
cordova.plugins.email.open({
subject: 'Your PDF',
attachments: [
"~/Documents/Ihr-Haus.pdf"
//cordova.file.documentsDirectory."Ihr-Haus.pdf"
],
body: sgs.mailBody,
isHTML: true
});
console.log('success',status);
},
// error
function(status) {
console.log('fail',status);
}
);
UPDATE 25.11 After i've uninstalled the email-composer plugin and removed all the lines i got this new error:
015-11-25 12:25:27.299 Konfigurator[6189:1204820] Html2Pdf webViewDidFinishLoad
2015-11-25 12:25:27.345 Konfigurator[6189:1204820] HTMLtoPDF did succeed (/var/mobile/Containers/Data/Application/F3E4B450-251D-4C1E-A9C1-8530302F2A9E/Documents/Ihr-Haus.pdf)
2015-11-25 12:25:27.351 Konfigurator[6189:1204820] Warning: Attempt to present <_UIDocumentActivityViewController: 0x18bb7c00> on <MainViewController: 0x16e7e4d0> which is already presenting <_UIDocumentActivityViewController: 0x17436e00>
2015-11-25 12:25:39.883 Konfigurator[6189:1204820] *** Assertion failure in -[_UIOpenWithAppActivity performActivity], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.29.5/UIDocumentInteractionController.m:408
igurator[6189:1204820] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIDocumentInteractionController has gone away prematurely!'
*** First throw call stack:
8c9 0x28c905bb 0x28781efd 0x287851a1 0x28569107 0x28477a55 0x28477531 0x2847742b 0x27d075cf 0x365d7e1b 0x365dc6c9 0x242cb535 0x242c9a2f 0x2421c0d9 0x2421becd 0x2d3d6af9 0x284a52dd 0x6ab33 0x36600873)
type NSException
Process 6189 stopped
* thread #1: tid = 0x126254, 0x366cfc84 libsystem_kernel.dylib`__pthread_kill + 8, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x366cfc84 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
-> 0x366cfc84 <+8>: blo 0x366cfc9c ; <+32>
0x366cfc88 <+12>: ldr r12, [pc, #0x4] ; <+24>
0x366cfc8c <+16>: ldr r12, [pc, r12]
0x366cfc90 <+20>: b 0x366cfc98 ; <+28>