entry point (_main) undefined. for architecture x86_64 - XCode UITesting only
Asked Answered
A

1

6

I'm getting this error only when trying to run UITests. I'm not using storyboard and building the app runs fine and Unit testing runs fine as well.

  • In my AppDelegate I have @UIApplicationMain
  • I have no storyboard files or references to a storyboard file in my info.plist.
  • tried cleaning/rebuilding, restarting xcode

Even recording the UITests works fine and is able to open the app. It's just when I try to run the actual tests that I get the error.

Maybe I'm missing a target somewhere or need to add something to XCUIApplication launch args? Any ideas?

Alexandrite answered 8/12, 2016 at 12:40 Comment(0)
A
6

Since Unit tests were working I ended up comparing each line in Linking section under Build settings for both unit tests and UI tests.

Below are the things I changed to get UI tests to start working:

  • Under bundle loader I had to add $(TEST_HOST)

  • Under Mach-O Type which was set to executable I had to change it to Bundle.

Alexandrite answered 8/12, 2016 at 13:15 Comment(1)
Changing the Mach-O Type was the key for me!Hassock

© 2022 - 2024 — McMap. All rights reserved.