top of page

What I learned by developing and publishing my first iOS app - Part 2

Welcome to part two of a two part series where I go over several topics and tools that I learned while developing and publishing my first iOS app. In this second part I will be focusing more on the tools I had to learn and get comfortable with to build and publish my app. All but one of the tools are specific to iOS development only.


If you have not read Part 1, I highly recommend you do before continuing, it focuses more on the programming side of app development.


Get started with Version Control Systems


A version control system ( VCS) is a software tool that helps software teams manage changes to their source code over time, a practice called version control. VCS software tracks changes to your codebase and allows you to easily switch back and forth between different versions. This helps avoid errors and allows users to fall back to a previous version of the codebase should any issues arise. These features also make it easier to collaborate with other developers by keeping a record of all the changes introduced by each developer.




VCS software is a tool that virtually every serious company who develops any kind of software uses. Not using a VCS is like trying to write a thousand page novel by pencil and paper, it will not be possible to revert to a previous version of your novel if you ever needed to. Now imagine trying to write a chapter while another writer edits parts of the same chapter. Surely there will be conflicts and a large amount of time wasted.


I will not go into the details of how VCS software works because it varies from software to software and can get quite complex. The main thing to understand is that they all simplify the practice of version control. Just like Microsoft Word makes it easy to track changes and edits to a document, so do version control systems. This is increasingly helpful as the number of developers working on a codebase increases.


A popular free and open source VCS software is Git. It is easy to get started with and is simple to use once you get through the initial learning curve. When I developed my first iOS app I used Git to manage changes to my code, and on multiple occasions it saved me by allowing me to revert back to a previous version of my codebase. Personally, I do not think it is too difficult to get started with Git.


There are other version control systems, such as Subversion, a popular alternative to Git which is also free and open source. I have not personally used it so there's not much I can say about it. However that does not mean you should not try it out, you may like it better than Git.


Whether you choose Git, Subversion, or another VCS, the point I want to make is that you should choose one and start using it as soon as possible. Once you get comfortable with using a version control tool you will never not use one again.



Identifiers, Certificates, Profiles, and Entitlements in Apple Development


Apple implements an array of measures to increase the security and integrity of third party apps available in the App Store. One measure is to require developers to sign their apps using certificates. When I was getting started with iOS development, I was surprised by the process I had to go through just to see my simple “Hello, World!” app running on my phsyical device.


Unlike in Android, you cannot simply install any third party application to an iOS device without validating its integrity first. The integrity and capabilities of an app are set up and validated by using identifiers, distribution certificates, provisioning profiles, and entitlements.


Identifiers uniquely identify your application. Every app you develop must have a unique identifier. Typically it is a reverse domain name such as “com.company.product”. Identifiers are not limited to iOS apps, they are also used to identify services, such as a website that uses Sign in with Apple.


Certificates in Apple development are cryptographically signed certificates. They are signed by Apple using a private key, and are then used by developers to sign their own apps or to validate their services. Different certificates are used for different things, for example, some certificates are used to sign an app for public distribution on the App Store, while others are used by services that wish to use Apple’s Push Notification Service.


Provisioning Profiles combine identifiers and certificates to determine what capabilities (Entitlements) an application has on which devices. To put it simply, provisioning profiles say “applications with this Identifier signed with this Certificate are okay to run on these devices”. There are two categories of profiles, development and distribution. Development profiles limit the amount of devices an application can be installed in, while distribution profiles do not.


Entitlements are capabilities that an application wishes to get access to. For example, there are entitlements for accessing a user's location, using the bluetooth radio on the device, sending notifications, and many more. Applications developed for Apple devices have a file called Entitlements.plist which lists the capabilities the application wishes to get access to. Here is one place where it is important to have the correct certificate and provisioning profile, because only a subset of capabilities will be available for the type of certificate and provisioning profile you have. For example, development profiles allow for certain capabilities not allowed for distribution profiles, such as capabilities specific for debugging purposes.

Apple Documentation on Signing and Certificates: https://help.apple.com/xcode/mac/current/#/dev3a05256b8


App Store Connect


For those interested in publishing an app to the App Store, you will use an online portal called App Store Connect. This site is where you manage builds of your app and submit them for review. This is also the place where you add a description, screenshots, and optionally a video of your app in action to display on the App Store.


Once you submit your app for review, App Store Connect is where you can check the status of your app within the review process. If there are no issues, Apple will notify you that your app has been approved, at which point you may publish your app from App Store Connect.


App Store Connect is where you manage your builds, however it is not where you upload them. Uploading builds is a process done through Xcode using the Archive tool. To access the Archive tool, you must select the Any iOS Device (arm64) option from the build devices list. Once you do that, go to Product>Archive, this will begin generating a build of your app.

Once your app is finished building, you can open the Organizer window to view your archived builds. From here you will see an option to distribute your app. Here is an image of the Organizer window for the app I published.




As you can see from the screenshot above, there is a button to distribute the app. First you select one of your archived builds, then you click on the distribute button. This will start a series of steps where you will sign the build using your certificates, and also set some options.

I will admit that the first time I uploaded a build of my app to App Store Connect I was very confused and googled everything along the way. However, after uploading that first build, uploading subsequent builds was simple and straightforward. I would highly recommend you upload a simple build from Xcode to App Store Connect to get familiar with the process. No need to worry about the build not being usable, you don’t need to submit it to the app store, and you can easily delete it from the App Store Connect portal.

Apple Developer site: https://developer.apple.com

TestFlight


TestFlight is a handy tool provided by Apple that lets developers test beta versions of their apps by allowing them to distribute different builds to different users. TestFlight also collects simple analytics of your app and makes it easy for users to submit feedback directly from their phone. The tool can be accessed through the App Store Connect site.


TestFlight allowed me to upload a build and send it to my friends and family so they could download it and provide me valuable feedback. Through App Store Connect I could see analytics for the app I distributed through TestFlight. The site also neatly organized the feedback that my users provided. All this was very valuable information that I used to improve my application.


TestFlight is available to all developers enrolled in the Apple Developer Program. If you plan on publishing an App on the App Store, you must have this membership. The membership costs $99/year.


I highly recommend using TestFlight as a precursor to publishing on the App Store because it will require you to sign your application as if it were going up for public distribution on the app store, with the added benefit of beta testing. Once testing is complete and the build is proven to have no issues, you can take the same build and submit it for App Store approval.​

bottom of page