skip to Main Content

I am testing my App today, and everything was working well, I was testing it on iOS 15, and after that I wanted to test it on iOS 13, so I set my iOS Deployment Target to iOS 13.0, then I changed the test target to the same version: iOS 13.0, and when I try to compile my code in testing environment, the Xcode tells me Command MergeSwiftModule failed with a nonzero exit code, Compiling for iOS 13.0, but module ‘xxxTests’ has a minimum deployment target of iOS 14.2:

I am pretty sure I have set both App target and tests target to iOS 13, now the warning still persists even when I reset them to the previous settings.

I didn’t find anywhere that I have set the tests target to iOS14.2, which is so weird, did I miss anything?

enter image description here

enter image description here

enter image description here

enter image description here

4

Answers


  1. Chosen as BEST ANSWER

    Solved, incase anyone meets the same problem, just create a new test scheme, which will solve the problem


  2. You can solve this deleting $HOME/Library/Developer/Xcode/DerivedData/NAME_OF_THE_PROJECT_FOLLOWED_BY_RANDOM_STRINGS

    And then building it again

    Login or Signup to reply.
  3. I solved this problem by cleaning the build folder to do this go to the menu bar and select the following:

    Product > Clean Build Folder

    Alternatively there is also a shortcut to do this:

    ⇧+⌘+K

    Login or Signup to reply.
    1. Clean your build folder.
    2. Create a new scheme
      That’s it!
      1.Clean your build folder.2.Create new scheme
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search