EinfachHans / capacitor-email-composer

E-Mail Composer Plugin for Capacitor
MIT License
21 stars 7 forks source link

Error if no email account on device #3

Closed vogloblinsky closed 2 years ago

vogloblinsky commented 2 years ago

Just tested with an iPhone with iOS 15 and no email account.

To Native -> EmailComposer open 126488619 2021-10-02 18:44:50.261700+0200 App[434:10379] [MFMailComposeViewController] Unable to initialize due to + [MFMailComposeViewController canSendMail] returns NO. 2021-10-02 18:44:50.263913+0200 App[434:10379] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target <Capacitor.CAPBridgeViewController: 0x10540b540>.' *** First throw call stack: (0x181f0b05c 0x19a425f54 0x1847f237c 0x1845dc9b4 0x184578dfc 0x1846ef638 0x184601de0 0x104cce438 0x104cce4dc 0x105124a20 0x105126700 0x105136a90 0x181ec3ce4 0x181e7debc 0x181e913c8 0x19d6a238c 0x1848370bc 0x1845b4be8 0x104b60ddc 0x104df5a24) libc++abi: terminating with uncaught exception of type NSException dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target <Capacitor.CAPBridgeViewController: 0x10540b540>.' terminating with uncaught exception of type NSException

EinfachHans commented 2 years ago

You should check this with the hasAccount function before