Could not determine bundle identifier for xxxTest TEST_HOST

前端 未结 3 2128
庸人自扰
庸人自扰 2021-02-08 14:33

We do have troubles getting our CI to work with Xcode. We encounter the issue Could not determine bundle identifier for xxxTest TEST_HOST: some path that does not exist

相关标签:
3条回答
  • 2021-02-08 15:02

    One reason to have this error is that your info.plist of your target is not in its path. So if you moved it or removed the reference to it, you may get this error.

    So if you moved it, put it back into its place or path. if you removed the reference to it, add it again, close and reopen the project.

    0 讨论(0)
  • 2021-02-08 15:09

    In my app I found a solution.

    The problem was of course in the test target.

    I hope that this solution will work for you too. Go to your test target build settings.

    Search for test host.

    In my case this testHost was looking like

    build/{buildConfigurationName}-iphoneos/{schemeName}.app/{appName}
    

    Which is wrong as the actual path must be

    build/{buildConfigurationName}-iphoneos/{schemeName}.app/{schemeName}
    

    so if you have a build configuration called Alpha, in your app named MyApp, with a scheme called MyApp-Alpha the test host path should be

    build/Alpha-iphoneos/MyApp-Alpha.app/MyApp-Alpha
    

    it was

    build/Alpha-iphoneos/MyApp-Alpha.app/MyApp
    

    I hope this can help... unfortunately this issue appears in many cases.

    0 讨论(0)
  • So after ages of having this issue, we could find the right checkbox to fix this issue.

    It somehow sounds weird but the issue was the configurations for the command-line builds inside of the Project settings.

    I assume this happens because we always test against the debug configuration and it was set to release. Therefore it did the wrong build for the test host.

    This does set the defaultConfigurationName inside of the {projectname}.xcodeproject.

    Please comment if you have any more insights of this.

    0 讨论(0)
提交回复
热议问题