Shipping Talsec Inside Your Own SDK: Mergeable iOS Frameworks
TL;DR: Talsec's iOS RASP frameworks are now mergeable. If you build an SDK, you can ship Talsec inside it as part of a single framework, so your customers integrate one artifact and nothing else. Debug builds stay dynamic and quick to iterate on, and Release builds produce one optimised binary. You need Xcode 15 or later, Embed & Sign, the right MERGED_BINARY_TYPE settings, and a Release-build check before every ship. This article walks through all of it.

The story: one artifact, delivered reliably
Not every Talsec customer ships an app. A growing number ship SDKs: payment components, onboarding flows, analytics and fraud-scoring modules, and other building blocks that end up inside other companies' apps. A partner of ours in this space came to us with a clear goal. They wanted Talsec's runtime protection built into their own SDK, so that every app embedding their component would be protected automatically.
Their condition was simple and non-negotiable: their customers must receive one artifact. One framework to add, one integration guide, one vendor relationship. Their customers shouldn't have to integrate, configure or even notice a second security SDK.
On iOS, the textbook options don't deliver that. Apple doesn't allow a dynamic framework nested inside another in a shipped app, so the App Store rejects the build. Flattening the frameworks means every customer has to add and Embed & Sign a second framework themselves. Repackaging the SDK in some other ad-hoc way wasn't an option either: whatever we shipped had to keep Talsec's protections working exactly as designed. We weren't willing to trade security for convenience.
Apple's mergeable libraries gave us a way to deliver both. That is now how the Talsec iOS frameworks ship.
How it works: dynamic in Debug, merged in Release
A mergeable framework behaves like a dynamic framework while you develop and like a static one when you ship:
Debug.
TalsecRuntime.frameworkstays a separate dynamic image. Incremental builds stay fast, and nothing about your day-to-day workflow changes.Release. The linker copies Talsec's code into the target that links it: your app, or your own SDK framework. Startup has one less framework to map, and SDK code nothing references can be stripped. The framework bundle stays in the product so its resources and
PrivacyInfo.xcprivacyare still there.
For SDK vendors this is the key part. When your dynamic framework links TalsecRuntime and merges it in Release, Talsec's code becomes part of your framework's executable. You ship one binary, and your customer's app embeds only your framework.
The protection code is no longer a separate library image next to the app. It is part of the executable you sign and distribute. The integration API does not change.
Requirements
These are precise requirements, not suggestions.
Xcode 15 or later. Older linkers do not accept a mergeable framework.
Embed & Sign. Leave the framework on Embed & Sign. Do Not Embed drops the bundle, the resources and the privacy manifest, even when the code was merged.
MERGED_BINARY_TYPEon the linking target. It decides whether a Release link merges.automaticis the usual Release behaviour for an app target. A dynamic framework merges Talsec only if that framework target sets it too.nonekeeps the dynamic layout, andmanualmerges only the frameworks you list.Release builds for verification. Debug and Release no longer produce the same binary layout. Release links follow static-link rules, so only a Release build shows what actually reaches users.
No duplicate third-party symbols.
TalsecRuntimecontains statically linked third-party dependencies. In Debug they stay inside the Talsec image, so the build succeeds even if your target links the same libraries. A Release merge pulls them into the merging target, and a second copy there stops the link with duplicate symbols that Debug never reported. If you hit this, contact Talsec support and we'll help you resolve it.
A few behaviours to keep in mind:
The XCFramework you download is larger, because it carries extra link metadata. Merging doesn't raise your minimum deployment target.
Each target that links the framework is a separate link. An app and an app extension that both link it each get their own copy in Release, and each runs its own static initialization. The same applies to a watchOS app and its extension.
Crash frames that used to land in the framework binary now land in the executable that merged it. Symbolicate them with the Talsec dSYM shipped beside the XCFramework.
Setup for SDK vendors: Talsec inside your dynamic framework
Add the built TalsecRuntime.xcframework to your framework project. Then, on your dynamic framework target:
Add
TalsecRuntime.frameworkto Link Binary With Libraries.Copy it into your framework bundle with a Copy Files phase, Destination Frameworks, so the product contains
YourFramework.framework/Frameworks/TalsecRuntime.framework. Debug loads that nested image, and Release still reads resources andPrivacyInfo.xcprivacyfrom it.In the Release configuration, set
MERGED_BINARY_TYPEtoautomatic. The Release link copies Talsec's code into your framework binary.In the Debug configuration, set
MERGED_BINARY_TYPEtonone. Debug keeps the nested dynamic image.Add
@loader_path/FrameworkstoLD_RUNPATH_SEARCH_PATHS, so dyld resolves the nested image from your framework, not from the app.
Your customer's app then gets the single-artifact experience:
They add your XCFramework and set it to Embed & Sign on the app target.
They do not add
TalsecRuntime.xcframework. The app target doesn't link it, embed it, list it in a runpath or import its module.They build against your framework alone. The Talsec bundle travels inside it.
After a Release merge, crash frames from the SDK symbolicate against your framework's dSYM and the Talsec dSYM shipped with the XCFramework.
CI checklist: what to run before you ship
Run these on every release, in the Xcode version you require in CI:
FAQ
Sources
Last updated
Was this helpful?

