Swift project crashing with Thread 1: EXC_BAD_ACCESS (code = 1, address = 0x0)
I ran into the same issue today. As of Xcode 6 beta 6 the auto complete suggests:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]) -> Bool {}
This crashes at startup with an EXC_BAD_ACCESS and a blank screen.
As soon as an !
is added to the last argument, everything works fine:
func application(application: UIApplication,didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]!) -> Bool {}
In current documentation the !
is missing as well:
optional func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]) -> Bool