Xcode error in Signing And Capabilities section when running Product > Archive

Hello, I have an Xcode project that I want to deploy to App Store.

When I run Product>Archive I receive an "Archive failed" error in the Signing And Capabilities section.

I tried both "Automatically Manage Signing" checked and unchecked.

When "Automatically Manage Signing" is unchecked, I receive 2 errors: "Failed to create a provisioning profile. There are no devices registered in your account on the developer website..." and "No profiles for 'net.myprojectname' were found. XCode could not find any IOS development provisioning profiles matching 'net.myprojectname'

When "Automatically Manage Signing" is checked, I receive those same 2 errors even before I run Product>Archive.

I do have a provisioning profile that appears to be visible to Xcode when the Automatically Manage Signing is unchecked.

When I try to just build the project and run it on the simulator, it works fine.

Again, all I want is to deploy the project to the App Store.

Do I really need a registered iPhone in order to do so? (I don't have one)

Or is there another way to solve it?

Thank you in advance for any help.