How to find duplicate lines of code in Xcode
Not in Xcode itself, but there are third party solutions. They both can analyse Swift code.


PMD, it includes CPD, the copy-paste-detector.
jscpd, a copy/paste detector for programming source code