I'm currently in the process of submitting my first app to the Apple store.
I've completed the following processes
/usr/bin/codesign --force --sign 79640A11C8D22589BD337496ABB8443581513846 --entitlements /Users/Gaby/Library/Developer/Xcode/DerivedData/RoyalAppInspection-dthvtpxadkslqmhkwdpaqkyujscg/Build/Intermediates/RoyalAppInspection.build/Debug-iphoneos/RoyalAppInspection.build/RoyalAppInspection.app.xcent /Users/Gaby/Library/Developer/Xcode/DerivedData/RoyalAppInspection-dthvtpxadkslqmhkwdpaqkyujscg/Build/Products/Debug-iphoneos/RoyalAppInspection.app
79640A11C8D22589BD337496ABB8443581513846: no identity found Command /usr/bin/codesign failed with exit code 1
You almost made it on your own, but in the end there seems to be something wrong with your profile.
First I would recommend a tool to "look inside" the profile to make sure it's the right one: http://furbo.org/2013/11/02/a-quick-look-plug-in-for-provisioning/
This will just add some more information about the profile, when selecting it in Finder and pressing space (Quick Look).
Check your Xcode Preferences:
Xcode stores the profiles in
If your distribution profile is not in there, double click on it.
Then it should appear in that folder, but with a hashed name, e.g.
1edf8f42-fd1c-48a9-8938-754cdf6f7f41.mobileprovision at this point the Quick Look plugin comes in handy :-)
Next, check your Project Settings:
Next, check your Scheme Settings:
Next, check the Keychain Access
iPhone Distribution: Elena Carrasco (8HE2MJLM25)on the right
Apple Worldwide Developer Relations Certificate Authority
Next, check the Keychain Access private key
cmd + shift + gto enter the path manually
Hope one of this does trick for you!
I just found a very nice explanation about the whole code sign process (it's really worth reading): https://www.objc.io/issues/17-security/inside-code-signing/