Check out example codes for "application tried to present a nil modal view controller on target". It will help you in understanding the concepts better.

Code Example 1

if MFMailComposeViewController.canSendMail() {
// Send mail code
}

Learn ReactJs, React Native from akashmittal.com