Unfold
Unfold: From Broken Codebase to Apple Best of 2019
Our senior iOS engineer inherited an unstable Unfold codebase, rebuilt the video rendering pipeline, and shipped one of Apple's Best Apps of 2019. The app was a creative toolkit for Instagram Stories and social media content. Performance issues resolved. Rendering pipeline rewritten. Apple featured the result. Unfold was later acquired by Squarespace.
- Duration
- 2017-2019, with continued contributions through acquisition by Squarespace
- Role
- Full outsourcing (dedicated senior iOS engineer)
- Stack
- Objective-C, UIKit, MVC, AVFoundation, AVMutableVideoComposition, CoreAnimation, CoreImage, GPUImage, CoreText / NSAttributedString, CALayer, Core Data, GCD / NSOperationQueue, Firebase Crashlytics
Outcomes
What shipped
Apple App Store Best of 2019 (Storytelling Simplified category)
Apple Editor's Choice
Featured in Apple's 2024 keynote to demonstrate screen-sharing functionality
Used by millions of creators worldwide
Acquired by Squarespace
The Recognition
Apple named Unfold one of the Best Apps of 2019. The category was “Storytelling Simplified.” The app received Editor’s Choice from Apple. It was promoted across App Store editorial. In 2024, Apple used Unfold in a keynote presentation to demonstrate iOS screen-sharing functionality.
The app was acquired by Squarespace and is used by millions of creators worldwide to make stories, reels, and short-form content for Instagram, TikTok, and Snapchat. Selena Gomez has used it. So have most of the people building Instagram presence in the late 2010s.
This is what most case studies open with. The trophies, the acquisition, the famous users. What most case studies leave out is the part that matters: what the codebase actually looked like when we got it, and what one senior iOS engineer had to do to get it from there to here.
What We Inherited
When EltexSoft’s iOS lead picked up Unfold, the project had already passed through previous outsourcers. The first developer had done good work. The fundamental template system, the way photos combined into composed images, was solid. Subscriptions were already wired up. A handful of templates worked.
Then a different developer had touched the codebase. To quote our engineer directly: it was “like cancer.” Stability was poor. Crashes were frequent. New features were difficult to add cleanly. The codebase had the kind of internal damage that’s worse than starting over, because you can’t just delete it. There are users in production. There are paying subscribers. The system has to keep working while you fix it.
This is the situation we’re hired into more often than the case studies admit. It’s not a greenfield build. It’s a rescue. And rescue iOS app development is one of the most valuable things a senior engineering team can do.
The Engagement
Unfold was a full outsourcing engagement. There was no internal engineering team on the client side. There was an investor (whose name our engineer never knew, by design — the client side used a manager as the single point of contact, partly as a translator, partly to protect their IP).
There was no Scrum. No formal sprint cadence. No version control discipline beyond “build it and push it to the store.” In the best case, there was a Trello board. In the typical case, requests came through Skype messages.
This is one of the harder operating conditions in iOS development: you’re senior enough to know the process is wrong, you’re not empowered to fix it, and you still have to ship production software for millions of users. The discipline has to come from inside the engineer, because it isn’t coming from anywhere else.
What We Built
Over the engagement, our iOS lead delivered the following work on Unfold:
Stabilization. First priority. Get the crash rate down. Untangle the parts of the codebase that were dragging the rest of the app down. Make the foundation stable enough that new features could be added without regressing existing ones.
Template expansion. A massive library of new design templates. Templates were what Unfold was. The library was the product. Each one required correct rendering across photo and video content, on a wide range of iOS device generations and screen sizes.
Video support. The big one. Adding video as a first-class content type alongside photos, including in templates that mixed both. This is where the hardest iOS engineering of the project lived.
Localization. Full app localization for international audiences. Unfold was used by creators in every major market, so this wasn’t a vanity feature.
Cloud Photos integration. Before our engagement, the app could only pull from on-device photo libraries. We added support for selecting photos from iCloud, which was where serious creators were storing their high-resolution source material.
Save progress indicator. Sounds small. Mattered enormously. When a user is exporting a multi-layer video composition, the operation takes seconds to minutes. Without a clear progress UI, users assume the app froze and force-quit it, killing the export. Adding a reliable progress indicator improved completion rates measurably.
Frame, color, and crop tools. A library of additional creative effects layered on top of the template system. Frames, color filters, video cropping. Each one had to integrate with the rendering pipeline without destabilizing it.
The Hardest Engineering Problem
The technical problem at the center of Unfold was rendering. Specifically: rendering templates that mixed photos and videos, in 2018, on iOS hardware that had real memory and performance constraints.
Here’s why it was hard. Every photo and video a user imported had different properties. Different resolutions. Different aspect ratios. Different orientations. Different codecs and qualities. When those assets were composed into a template alongside text, animated layers, and effects, the export pipeline had to produce a single coherent video file. If anything was off, the result was visible: stretched images, misaligned elements, wrong colors, dropped frames, or a crashed export with no output at all.
The video generation specifically was the bottleneck. Rendering a template with many layers, text, animations, and embedded video could take a long time, consume large amounts of memory, and trigger memory-pressure crashes mid-export on older devices. Users hit this constantly because users are creative and they will absolutely import a 4K video into a template designed for a square photo.
The solution was a unified rendering pipeline. Here’s what went into it:
Normalization layer. Before any rendering started, the pipeline normalized every input asset to a target resolution and aspect ratio for the active template. No template had to know whether its inputs were portrait or landscape, 1080p or 4K, photo or video. The normalization was a single choke point that absorbed the variation.
Pre-scaling and compression. Large assets were down-sampled before being handed to the rendering stage. The export quality target was set by the template and the device, not by the source. Pushing a 4K video through a template that targets 1080p doesn’t improve the output. It just uses more memory.
AVFoundation + AVMutableVideoComposition. The standard Apple stack for video composition, used correctly. AVMutableVideoComposition for timeline construction. AVAssetExportSession for the final write. Custom video instructions for positioning, scaling, and transitioning content within the composition.
Background rendering. Heavy rendering work moved off the main thread via GCD and NSOperationQueue. The UI stayed responsive. Progress reporting flowed back to the main thread for the indicator.
Progressive generation. Instead of holding the entire video composition in memory at once, the pipeline rendered in chunks and streamed them to disk. This was the single biggest win against memory-pressure crashes.
Intermediate caching. Previews and intermediate render results were cached so that re-edits didn’t trigger full re-renders.
CALayer optimization. Aggressive avoidance of unnecessary redraws. Layer hierarchies were structured to minimize the recomposition surface area.
Per-device export presets. Older devices got lower-quality export presets automatically. The app didn’t ask the user. It detected the device and adjusted, because asking a user to choose an export preset is a UX failure.
Memory hygiene. Objective-C memory management in 2018 still required active discipline. Retain cycles in blocks. Cleanup of temporary assets. Avoiding duplication of large image and video buffers. Manual @autoreleasepool blocks around heavy loops. Every megabyte mattered when a device had 2GB of RAM and Safari was running in the background.
This is what one senior iOS engineer with deep platform experience can produce on a hard problem when given the runway. It’s also what a junior engineer or a freelancer working three projects in parallel cannot produce, no matter how many hours they bill. The depth has to be in the head of the person writing the code.
The Incident
No production iOS development story is complete without one. Here’s ours, told honestly.
At one point, a feature flag was pushed to production that incorrectly granted every user a free subscription. By the time the issue was caught, a meaningful chunk of the user base had paid features unlocked for free. The client mentioned at the time that the app had something on the order of 100,000 active users. That’s a real number of people getting things they hadn’t paid for.
The fix was a corrected build that revoked the flag. The communications strategy was to frame it as an intentional decision: a chance for everyone to try the full feature set briefly. The relationship was preserved. The client kept us on.
We’re telling this story for a specific reason. Every long-running mobile app development engagement has incidents like this. Vendors who claim they don’t have them are either lying or haven’t been around long enough. The thing that matters is what happens next: whether the team owns it, fixes it cleanly, and earns back trust. We did. We were on Unfold for years after this incident.
Why It Worked
Our iOS engineer, asked years later why Unfold succeeded where competitors didn’t, gave a simple answer. The team joined the idea at the right moment. The design was pleasant. The user flow didn’t have unnecessary complications. At a time when most apps in the space had clumsy font pickers, awkward color tools, and confusing template flows, Unfold felt good to use.
Engineering enabled that. A rendering pipeline that didn’t crash. Templates that worked across device generations. Export quality that was consistently good. A progress indicator that told users what was happening. The features the user noticed sat on top of months of unglamorous iOS development foundation work.
This is the part of software engineering that doesn’t make case study headlines but determines whether case studies happen at all.
Why This Story Matters for How We Work
A few things about the Unfold engagement are characteristic of how EltexSoft operates as an iOS development company and worth pulling out explicitly:
One senior engineer can carry a product to Apple Best of the Year. Not a team of fifteen. Not a pod of three. One person with ten-plus years of iOS experience, given clear ownership and the runway to do the work properly. This is the boutique model in its purest form. We don’t pyramid-staff with juniors because the math doesn’t allow it: at our size, every engineer has to be senior enough to scope a system end-to-end.
We come in after worse contractors more often than we come in first. The Unfold codebase had been through prior outsourcers. Some had built well. Some hadn’t. The work was a rescue and an expansion, not a greenfield build. That’s true of a significant share of our engagements. PropertyRate’s Kohana-to-Laravel migration is the same pattern. Modernizing legacy codebases that nobody else wants to touch is one of the most valuable things a senior engineering team can do.
Continuity compounds. Our iOS engineer on Unfold is still EltexSoft’s iOS tech lead today, almost ten years later. The senior engineers we hire stay. The clients they work for benefit from a level of institutional knowledge and codebase familiarity that’s impossible to replicate with rotating contractors. That same engineer now ships Swift 6, SwiftUI, and async/await — the iOS platform has transformed since Unfold, but the engineering depth hasn’t changed.
Process discipline has to come from inside the engineer when it doesn’t come from the client. Unfold had minimal formal process on the client side. The discipline that produced an Apple Best of Year app had to come from our side: code review (self-imposed when necessary), refactoring on instinct, profiling before shipping, memory hygiene, crash monitoring. The work product reflects the engineer’s standards, not the client’s process maturity.
Who We Are
EltexSoft is a boutique software engineering studio and iOS app development company. 35-50 senior engineers. Headquartered in Lisbon, Portugal. Engineering team in Ukraine. Founded in 2015.
Our iOS clients include Unfold (acquired by Squarespace, Apple’s Best of 2019), Shell, FreeStuffFinder, HeyTutor, MOTTIV, and RiseMD. We also build Android apps, Laravel backends, Django APIs, Vue.js frontends, and React applications.
5.0 Clutch rating across 30+ verified reviews. 200+ five-star Upwork reviews. Top Rated Plus and Expert-Vetted agency status (top 1%). Average client engagement: 3+ years.
We’ve shipped iOS apps through every major platform transition since 2015: Objective-C to Swift, UIKit to SwiftUI, callbacks to async/await, and now into Swift 6 strict concurrency and visionOS. The team that takes on your codebase today is the team that maintains it for the next decade.
30-minute technical call. Bring your App Store app, your codebase you inherited from someone else, or your new product idea. We’ll tell you what we’d build and what we wouldn’t.
Tech stack
What we used
Have a similar problem?
Tell us what you're building. One business day reply.