[Solved] IOS Error: Command MergeSwiftModule failed with a nonzero exit code

environment

Xcode13. 2 the first project created is set. The minimum version of IOS is 15.2, which has been compiled several times. The minimum IOS version of the switching project is IOS 10.0 After 0, the following errors appear:

error: Command MergeSwiftModule failed with a nonzero exit code

Solution:

Method 1: clean (Command + Shift + k)

Method 2: Change (Project -> target -> builfsetting -> compilation mode -> debug -> switch to whole module) (but this may slow down subsequent compilation)

Read More: