If you press cmd on the word UIApplicationDelegate in the class definition of your code, you will open the protocol definition. I suspect you are using this call:
func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow?) {...}
and this may have changed in Swift 1.2, but does not seem to have been widely documented. If you wrote instead
func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow) {...}
then you will get the error message that you are reporting.
This particular problem has not been fixed by the automated program that Daniel Nagy mentions - I ran into a similar problem.
If you provided this optional function, just add ? after the UIWindow in the function definition.
source share