Register Your App ID
Sign into your Apple developer account. Once signed into your account, navigate to Certificates, Identifiers & Profiles.
Under Identifiers, you are going to select App IDs and click on the + button at the top right to add a new App ID.
Enter a Name and Bundle ID (i.e. com.domainname.appname)
Keep Game Center and In-App Purchases as the only services selected to enable in your app.
Register Your Device
Under Devices, you are going to select All and click the Add button (+) at the top right to register a new device.
Add a New App
From your Apple Developer account, you’ll want to navigate to App Store Connect.
Select My Apps and click on the Add button (+).
After clicking the Add (+) New App button, you'll be prompted to fill out the below information.
Note: If you’ve just created an App ID, it could take a few hours for the Bundle ID to be selectable from this screen.
You'll need to complete the "Create Your Signing Certificates" and "Archive Your App" sections in Xcode.
Create Your Signing Certificates
Ensure you are signed into your Apple developer account through Xcode, which can be done through Xcode > Preferences.
From Accounts, you're able to Manage Certificates and add new. From the lower-left corner of the signing certificates sheet, click the Add button (+) , and choose a certificate type from the pop-up menu.
Please make sure to create an iOS Development and iOS Distribution certificate.
NOTE: When your Mac asks you for permission to create the certificates, select ALWAYS ALLOW.
For additional information about creating, viewing and exporting signing certificates, read Apple's documentation HERE.
Archive Your App
In Xcode, switch from simulator mode to Generic iOS Device.
Next, click on Product and select Archive.
If the archive builds successfully, it appears in the Archives organizer. The Archives organizer is a pane in the Organizer window that you use to upload your app to App Store Connect. To open the Archives organizer, choose Window > Organizer and click Archives.
To complete the upload of your app to App Store Connect, click the blue Upload to App Store button.
Choose the Build Before You Submit
Navigate back to the My Apps section of App Store Connect.
Before you submit an app to App Review, you choose which build (from all the builds you uploaded) that you want to submit.