Reputation: 103
I am new to iOS development and struggling with few build errors. I looked up the web on how to fix these errors but could not get a hint. Using Xcode 9.4 with built in Swift.
Link is below as I was not allowed to include the screenshot in this post.
Xcode build errors
Upvotes: 9
Views: 9906
Reputation: 101
I am running Xcode 9.3 and Android Studio 3.5.1.
All I did was remove the "." on the definition:
UIApplication.LaunchOptionsKey: Any
To:
UIApplicationLaunchOptionsKey: Any
without the period. Works like a charm! Enjoy.
Upvotes: 2
Reputation: 51
Neither the original question nor the accepted answer note that the code with the error is generated code when a project is created and as such generally shouldn't need to be changed.
The problem is because of the version of Xcode. UIApplicationLaunchOptionsKey has been renamed to UIApplication.LaunchOptionsKey in the newer version of Xcode (10.2). I came across this when I tried to open my project in an older version of Xcode. This sucks because I now can't work on my project on my older computer that can't be updated to the latest version.
Upvotes: 5
Reputation: 899
It should be like this :
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return true
}
Upvotes: 29