ld: entry point (_main) undefined. for architecture x86_64 : Xcode 9

I've been faced with same problem. here is how i fixed it: Select your Project then go to Build Setting -> Search Mach-O Type Change to -> Bundle . hope it will help!


Found out that "AppDelegate" wasn't part of "target" membership.


Adding @UIApplicationMain fixed the issue.

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
...
}

In my case, I missed @UIApplicationMain in AppDelegate.swift. Adding it right before class AppDelegate, my app started building again

Tags:

Ios

Xcode

Swift