Total noob here, trying to learn Xcode AND Swift, getting this same issue.
However, trying to implement your solution, when I go to File | Project Settings in Xcode, my dialog box has nothing about Signing & Capabilities, just "Per-User Project Settings: Derived Data, Schemas (Show shared schmes automatically) and an Advanced... button. The Advanced... button just takes me to "Build Location" dialog with options of Xcode Default, Unique, Shared Folder, Custom, and Legacy.
Any help would be appreciated.