Try adding it to your project folder and then drag and drop it into your project in Xcode.
If it still doesn't work, you can simply create a new file in the project itself, name it the same as the file you are trying to copy, and then copy-paste all the code.
Hope it helps
source
to share