I tested all of the above solutions but nothing solved the problem. I was using Xcode 10.2 and macOS 10.14.3. first i installed swift 5 runtime support for command line tools but nothing changed second i updated OS to 10.14.4 and nothing changed third i updated Xcode to 11.2.1 and the problem solved (do not user Xcode 11.2. it has archiving issue and deprecated)