Justin Domnitz
Justin Domnitz

Reputation: 3307

Application tried to present a nil modal view controller on target <UIApplicationRotationFollowingController: 0x100c75280>

I'm working through some crash logs for an enterprise iOS application. My users get the following crash frequently.

main *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target UIApplicationRotationFollowingController: 0x100c75280.' AppDelegate.swift, line 13

There are a lot of reports of this occurring when presenting this MFMailComposeViewController without first checking if the device is configured for email. This is not the case in my application though.

Does anyone know in what cases this might occur?

Upvotes: 1

Views: 977

Answers (1)

Mike Atkins-Spelling
Mike Atkins-Spelling

Reputation: 524

Very hard to debug without seeing your code... Can you recreate the crash in Xcode with an Exception breakpoint to see whats going on?

Otherwise all I could suggest would be to look at line 13 of your AppDelegate and try to work out why whatever ViewController your trying to present has not been initialised for some reason?

Upvotes: 1

Related Questions