Entry Point (_main) undefined. for x86_64 architecture - only for Xcode UITesting

I get this error only when trying to run UITests. I do not use a storyboard, and creating the application is fine, and unit testing works fine.

  • In my AppDelegate app, I have @UIApplicationMain
  • I do not have storyboard files or links to the storyboard file in my info.plist.
  • tried to clean / restore, restart xcode

Even the UITests entry works great and can open the application. It is simple when I try to run actual tests to get an error.

Perhaps I am missing a target somewhere or do you need to add something to XCUIApplication start args? Any ideas?

+4
source share
1 answer

Since unit tests worked, I compared each line in the Binding section of the Build Settings section for both unit tests and user interface tests.

The following are the things I changed to start testing the UI:

  • In the package loader bundle, I had to add $ (TEST_HOST)

  • In Mach-O Type, which was installed in the executable, I had to change it to Bundle.

+3
source

Source: https://habr.com/ru/post/1663229/


All Articles