In this tutorial, you are going to learn how to sideload your apps onto your iPhones and iPads! The following steps are for the latest iOS and Xcode versions. Incase you have an older iPhone in which iOS cannot be updated, you'll have to do some minor changes to side-load your app.
During the sideloading steps, at various times, you may see a popup that will request your password for Keychain. It's essential that you enter your password and click Always Allow. This pop up might show up more than once, usually around 3-4 times. You must click Always Allow every single time.
The reason for this is because Xcode is setting up your developer certificates and signing in the background. If at any point in this process you deny permission, you'll get an error that says Swift Sdtlib tool error and you will have to troubleshoot using these steps listed here: Swift Sdtlib tool error: Task failed with exit code 1.
Open up your Xcode project. Make sure you're signed in (General tab).
Connect your iPhone to your Mac via a USB cable.
Head over to Product (on the menu bar on top) > Destination. You should see your device here, click on that.
Click on the play button. You'll see plenty of things happening on the status bar (center top) and you'll see the app running on your phone. In this process Mac will ask you to enter your Mac password plenty of times, type in and click Always allow.
If this is your first time you'll encounter an error on the first attempt that asks you to verify the developer app certificate, go to General > Profile and device management > Developer app > Trust. Repeat the previous steps and this will allow the app to run on your device.
To check if both your iOS and Xcode versions are the same, head over to Xcode and on the menu click on Xcode and go to About Xcode. Here you'll find the version.
Incase you don't have a latest iOS device, you can still side load by going to Deployment Target in Deployment Info and selecting the version of your iOS.
Apart from that, follow all the other steps outlined above.
Now you don't have to carry your laptop around to show your apps to your family and friends. You've got it running on an actual device!