Home United States USA — software Hosting IPA and dSYM Files of Continuously Delivered iOS Apps

Hosting IPA and dSYM Files of Continuously Delivered iOS Apps

253
0
SHARE

Learn a few methods of hosting IPA files when developing iOS apps, using Fastlane or self-hosted CI servers, so you can access previous versions of the app.
You might be wondering why we need to host IPA files of released apps on the server. There are some situations when IPA files come in handy:
The Continuous Integration server is the best place to host an IPA files in case of the self-hosted CI servers like Xcode Server, Jenkins, TeamCity, etc, however, for a cloud-hosted CI server like TravisCI and CircleCI we need to host IPA file somewhere else. It’s because cloud-based CI server launch fresh VM for the each build and VM will be destroyed after the build is finished. We might lose the IPA and other build artifacts unless we upload it to some other services. There are a few options; we can host our build artifacts like test reports, IPA files, dSYMS, etc.
There are self-hosted CI servers like Xcode Server from Apple, and other open source CI servers like Jenkins, TeamCity, etc. The good thing about self-hosted CI servers is we don’t have to find any other place to host the build artifacts. It’s already available on the CI server unless we remove it. Sometimes we need to clean up the CI server; in that case, we need to move out the build artifacts of the release build to any other location on the same server. In both cases, we have an access to IPA files and dSYMS.
The latest version of Xcode Server with Xcode 9 has a new feature that will create IPA files which can be visible from the Xcode Bots. I shared new features of the Xcode Servers in my previous blog post, Xcode Server + Xcode 9 = Comprehensive iOS CI.
With Xcode Server, it becomes so easy to access the IPA files of release bots. Similarly, we can have those on Jenkins or other CI servers.
As mentioned earlier, it would be challenging to access build artifacts from cloud-based CI servers as new VM are launched for every build and destroyed at the end of the build. We have to upload the generated build artifats using a script to some other services, like AWS. We can easily upload the assets on GitHub using the Fastlane set_github_release action.
We can combine some Fastlane actions to achieve this:
The above code snippet will push the tag to GitHub and create a release by uploading IPA and dSYMS to GitHub.
There are some pros and cons of using GitHub for hosting IPA and dSYMS on GitHub.
The pros are
The cons are
Now we managed to upload our IPA files to the server, but how to use those files to go back to the old version of iOS app? There are multiple ways to achieve this, but simplest one is using Xcode. The process is very simple. In Xcode 8, with iPhone plugged in, open Window -> Devices. In the left navigation, select the iPhone plugged in. Click on the + symbol under Installed Apps. Navigate to the.ipa you want to be installed. Select and click open to install the app.
Although using Xcode is the simplest way to install IPA on a real iOS device, we need to have certificates and a provisioning profile that has been used to sign the app. Xcode couldn’t install the app on devices without having a certificate or provisioning profile. There is one more thing to note: if the distribution certificate has expired, then we are no longer able to install the app using Xcode unless we resign the app with an active certificate and provisioning profile.
In the fast-paced world of Continuous Delivery, we deploy an iOS app frequently, so it’s very important to track the important assets like IPA files and dSYMS to go back to the previous version of the app easily if needed. You might want to see how your app evolved over a period of time, or maybe not, but keeping the build artifacts for some time is a good idea. We can achieve this using Fastlane or self-hosted CI servers.

Continue reading...