Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 388
JustinM Avatar asked Dec 08 '16 12:12

JustinM


1 Answers

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.

like image 152
JustinM Avatar answered Nov 03 '22 00:11

JustinM