Bumble Feb 23, 2017

Code Signing and Distributing Swift Applications

Article Summary

The Badoo iOS team learned the hard way: adopting Swift in 2015 meant navigating undocumented code signing nightmares that crashed enterprise apps at runtime. Here's what broke and how they fixed it.

When Badoo (now Bumble) started integrating Swift into their iOS apps, they hit critical distribution issues that Apple's tooling didn't handle automatically. This 2017 post documents three major problems with code signing and IPA packaging that broke their enterprise builds and App Store submissions.

Key Takeaways

Critical Insight

Early Swift adoption required manual scripting workarounds for code signing embedded frameworks, fixing enterprise certificate fields, and packaging SwiftSupport folders that Xcode's CLI tools omitted.

The article includes actual bash scripts showing exactly how to re-sign embedded Swift libraries and package IPAs correctly from the command line.

About This Article

Problem

Badoo's re-signing scripts didn't handle Swift's embedded dylibs in the Frameworks folder. This caused runtime crashes whenever enterprise builds were modified after compilation.

Solution

The team updated their bash scripts to find all .dylib files from the XcodeDefault.xctoolchain and re-sign them. Then they signed the application bundle using the codesign tool.

Impact

Enterprise certificate deployments started working once they added the Organizational Unit field requirement. This fixed the OS-level rejection crashes that had been preventing app installation on devices.