iPhone App Development - Testing Your App on an iPhone

What is it?

Swift is the current language for creating iPhone applications. It works within Apple's Interactive Development Environment (IDE) XCode. It is a combination of visual and programming interfaces.

Why should I learn it?

The world is mobile. While many content applications can function on phone browsers, there are some applications, like games, social media and ecommerce, that need native functionality.

What can I do with it?

You can create the visual interface as well as add code to represent functionality of your application using Swift and XCode. Then you can test and upload to Apple's App Store.

How long will it take?

Learning application development is a different and bit more difficult than creating websites. These tutorials will take several weeks to go through to explain the basic functionality available for application development. But with time and practice, you can master the skills necessary to create functional applications. Beyond iPhone development, there is native Android development and cross-platform options like React Native to consider.

Testing Your App on an iPhone

  1. First you need to make some app icons. This is the icon that will show on the user’s screen. Make a square image in Photoshop or other image software. This MUST be an exactly square icon. Make it 1024 x 1024 pixels. You used to have to use a site to create a site of app icons (like App Icon Maker), but now since version 14, XCode does that for you. You provide the largest size, and XCode can generate the full set of icons for various sizes. You can still use the old method, but you just have to change the Attributes Inspector for the App Icon for All Sizes for the platform (iOS, etc).
  2. In your Assets folder in the XCode project, find AppIcon, insert the 1024 square image. It can be any image file format, but .png seems to be the best choice.
  3. Need an Apple Developer Account ID. If you don't have one, create one on the Apple Developer Site
  4. In Xcode, add your Apple ID to Accounts preferences. Xcode. XCode, Settings, Accounts.
  5. In the Project Navigator, select the project to display the Project Editor.
  6. Click Signing and Capabilities and choose your name (of your Apple ID) from the Team pop-up menu.
  7. Connect the device to your Mac and choose your device from the Scheme toolbar menu. Look for the iPhone selection. Make sure your device and app are using the same iOS version under Deployment Info on the General tab. You may need to change your Privacy and Security Settings to allow Developer Mode, and this may require a restart of your phone. Make sure you are logged into your device after it restarts.
  8. If your device is not paired, you may need to go to Window, Devices and Simulators, to check the pairing status. Try unplugging your phone and plugging it back in, if it doesn't pair.
  9. Below the Team pop-up menu, click Fix Issue, if you have any.
  10. Xcode creates a free provisioning profile for you and the warning text under the Team pop-up menu disappears.
  11. Click the Run button.
  12. Xcode installs the app on the device before launching the app.
  13. When asked to put in password (for computer), pick Allow Always. You may have to “trust” your id on the phone (which requires Settings, General, Device Management). Follow instructions, Settings, General, Device Management.

This procedure should allow you to install your app on your phone and start using it. It may become unavailable after using it for a while, based on iOS updates or other changes. Just go back to XCode and go through the procedure again to install it on your iPhone.

Submitting an App to the App Store

Once you have completed an app, you might consider publishing it on the App Store. Developers distribute apps through the App Store for free or for a fee. There are numerous steps and reviews you must complete before an app is able to be available on the App Store. Apple provides full documentation. More information about the process can be found on the Instabug site.

Moving On

Great job! You have posted your application on an iPhone. Congrats!