iOS Swift Newbie Gotcha Reminders #3 — To Commit or Not To Commit “.ipa” files and “.app.dSYM.zip” files to your git repo?

Raymond
iOS Newbies
Published in
2 min readFeb 6, 2019

--

This is a series of of multiple XCode / Swift / iOS Programming Gotchas to remind myself and hopefully relieve the stresses of many other beginner programmers whom are struggling with developing iOS apps via XCode.

Learning is a process of making many mistakes.

3. To Commit or Not To Commit “.ipa” files and “.app.dSYM.zip” files to your git repo?

As we use fastlane to build our app or manually through XCode to generate our app, we may encounter a scenarios where ipa files are created within our directory structure of our app.

These files are the compiled versions of our app to be later uploaded to App Store Connect. IPA files are bulky and large files and it is recommended to not commit to our git repo because it can become burdensome for CI (continuous integration) to download and may be a source of confusion for future developers on the team.

Solution: Use .git_ignore !!!

Simply add the above two lines of code to our .git_ignore file.

Or we may even want to consider copy and pasting from this git repo.

But please be cautious! If you run a CI/CD you team probably has different setting requirements for your .git_ignore.

Accidents happen: What if I committed to git repo already?

Remove it from your repository simply by removing the cached file

git rm --cached myapp.ipa
git commit -m "remove myapp.ipa"

Done!

References:

Cheers!

--

--