xcode 4 fails to initiate unit tests (with linker error) after I created a new scheme

前端 未结 6 1886
星月不相逢
星月不相逢 2020-12-23 20:06

My unit tests worked fine in xcode4 until I had to create a new schema to compile a package to run on my device for testing.

All I did was creating a new Target an

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-23 20:20

    We were using nodejs-mobile which would build with the app but fail building with the tests.

    Undefined symbols for architecture x86_64:
      _start_node
    

    In addition to all of the previous answers (build settings, search paths, making a brand new Unit Test, deleting DerivedData), what finally resolved it was creating a brand new new UI test instead of a Unit Test in Xcode.

    It built successfully. Then you can copy your test definitions from your current test to the one one.

    If you do not need the UI part, you can uncomment XCUIApplication().launch() in setUp of the generated tests, which makes it run as fast as before.

提交回复
热议问题