{"id":2838,"date":"2026-03-23T15:10:00","date_gmt":"2026-03-23T15:10:00","guid":{"rendered":"https:\/\/adjoe.io\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/"},"modified":"2026-11-24T17:27:52","modified_gmt":"2026-11-24T17:27:52","slug":"how-to-distribute-a-binary-ios-sdk-grpc-swift","status":"publish","type":"engineer_blog","link":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/","title":{"rendered":"How to distribute a binary iOS SDK with third-party dependencies"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/adjoe.io\/solutions\/monetize-your-app\/mediation\/\" target=\"_blank\" rel=\"noreferrer noopener\">adjoe<\/a> SDK allows app developers to integrate video, playable, and banner ad formats into their apps to monetize their reach easily and effectively. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We distribute this SDK as a binary framework. It prevents our customers from making errors when building our SDK from the source code. And there are obviously some security reasons for keeping our code closed. Our SDK has other third-party dependencies. We will refer to them as transitive dependencies in this article, because this is what they are from the app developer\u2019s perspective. To provide the best experience for SDK users during integration, we need to answer a few questions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Which dependency manager should we use for developing and distributing our SDK?<\/li>\n\n\n\n<li>How do we plan to deliver our transitive dependencies to the app developers: source code, precompiled libraries, or another option?<\/li>\n\n\n\n<li>How can we guarantee binary compatibility between the app and our SDK? In other words, how can we avoid Swift compiler conflicts?<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, I\u2019ll answer these questions. As an example of a third-party dependency, we will use the grpc-swift library. We widely use it for client\u2013server communication. grpc-swift dependencies have some significant restrictions, which makes this topic even more interesting.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choosing binary formats<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Back in the day, the main approach for distributing iOS binaries was using a fat framework, also known as a universal framework. This format combines binaries for multiple architectures with a single file. Developers used to build frameworks for multiple architectures and then used the <a href=\"https:\/\/ss64.com\/osx\/lipo.html\" target=\"_blank\" rel=\"noreferrer noopener\">lipo tool<\/a> to put them together.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The main downsides of a fat library are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The users of the framework need to strip unused architectures from the fat binaries. For instance, when building an app for an iOS device, the iPhone simulator binary part needs to be excluded from the framework. Otherwise, it unnecessarily occupies additional disk space.<\/li>\n\n\n\n<li>A fat library doesn\u2019t support multiple binaries with the same architecture. Since Apple Silicon was announced, we now have one more additional configuration for building binaries: arm64 for iPhone simulator. This is the same architecture as iPhone devices have, but the binary for the simulator should be built separately (since it\u2019s built against different iOS SDKs).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In 2019 Apple announced XCFramework. It\u2019s a distributable binary package created by Xcode that contains variants of a framework or library so that it can be used on multiple platforms (iOS, macOS, tvOS, and watchOS), including Simulator builds. It supports multiple binaries of the same architecture and doesn\u2019t require stripping.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The best choice for our team is to use XCFramework as a format for distributing our SDK, since it\u2019s essentially the only officially supported binary format.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">grpc-swift through CocoaPods<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are two main reasons why we need to distribute our SDK through <a href=\"https:\/\/cocoapods.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">CocoaPods<\/a>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We need to support distribution through CocoaPods for many game developers who want to integrate our SDK. It\u2019s the default dependency manager for Unity projects.<\/li>\n\n\n\n<li>adjoe\u2019s SDK depends on different ad networks, like Mintegral and Meta, and these frameworks are also exclusively distributed through CocoaPods.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We also can use CocoaPods to set up our development configuration, which means we\u2019re going to have an Xcode project with an SDK target and a Podfile that describes all dependencies for our SDK target.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can add grpc-swift as a dependency for our SDK by adding a <code>pod 'grpc-swift\u2019<\/code> line to the Podfile. Then we run pod install and build our XCFramework.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, we need to build .framework for iPhone devices.<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Shell<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-bash\">xcodebuild archive \\\n -quiet \\\n -project ${PROJECT} \\\n -scheme ${SCHEME} \\\n -sdk iphoneos \\\n -archivePath &quot;${ARCHIVES_PATH}\/ios_devices.xcarchive&quot; \\\n SKIP_INSTALL=NO \\\nBUILD_LIBRARIES_FOR_DISTRIBUTION=YES\n<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Then, if we want customers to be able to run apps on a simulator, we need to build our framework for <code>iphonesimulator<\/code> devices. This step will create .framework that supports both x86_64 (Intel processors) and an arm64 (Apple Silicon) simulator.<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Shell<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-bash\"> xcodebuild archive \\\n -quiet \\\n -project ${PROJECT} \\\n -scheme ${SCHEME} \\\n -sdk iphonesimulator \\\n -archivePath &quot;${ARCHIVES_PATH}\/ios_simulators.xcarchive&quot; \\\n SKIP_INSTALL=NO \\\nBUILD_LIBRARIES_FOR_DISTRIBUTION=YES\n<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The final step is to generate .xcframework by combining framework files from the previous steps:<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Shell<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-bash\">xcodebuild -create-xcframework \\\n   -framework ${ARCHIVES_PATH}\/ios_devices.xcarchive\/Products\/Library\/Frameworks\/${XCFRAMEWORK_NAME}.framework \\\n   -framework ${ARCHIVES_PATH}\/ios_simulators.xcarchive\/Products\/Library\/Frameworks\/${XCFRAMEWORK_NAME}.framework \\\n   -output ${XCFRAMEWORK_PATH}<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">When we try to run these scripts, we face the first issue. The output says the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" height=\"648\" width=\"1906\" src=\"https:\/\/adjoe.io\/wp-content\/uploads\/2023\/06\/iOS-binary.png\" alt=\"Compiler error when trying to build grpc-swift with BUILD_LIBRARIES_FOR_DISTRIBUTION flag enabled\" class=\"wp-image-2868\" style=\"width:910px;height:348px\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s figure out what happened.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We passed <code>BUILD_LIBRARIES_FOR_DISTRIBUTION=YES<\/code> while archiving the frameworks. This option is required for making XCFramework. With this option, \u201cxcode archive\u201d generates a .swiftinterfece file, which is the compiler\u2019s representation of a framework\u2019s public interfaces. The swiftinterface file enables two features.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Module stability and library evolution<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The first is<strong> <\/strong>Module Stability, which allows you to use different Swift compiles for the libraries and the app. The other is Library Evolution<strong> <\/strong>that<strong> <\/strong>allows you to change the library API without recompiling the app. Both options are enabled by having a .swiftinterface file. And the file itself is generated only when we provide the <code>BUILD_LIBRARIES_FOR_DISTRIBUTION=YES<\/code> flag. You can <a href=\"https:\/\/www.swift.org\/blog\/abi-stability-and-more\/\" target=\"_blank\" rel=\"noreferrer noopener\">read more here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We don\u2019t really use Library Evolution, since we never expect any app developer to update our library without recompiling their application.<strong> <\/strong>But Module Stability is a very important feature that we want to support. This is because we have many different SDK users, and we don\u2019t want to force them to use the same compiler version as we do.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The reason for the issue above is that grpc-swift doesn\u2019t<strong> <\/strong>support the Module Stability<strong> <\/strong>feature. Actually, the error itself is <a href=\"https:\/\/github.com\/grpc\/grpc-swift\/issues\/1063.\" target=\"_blank\" rel=\"noreferrer noopener\">from one of the grpc-swift dependencies<\/a> \u2013 SwiftNIO.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The workaround we can use is to build all grpc-swift dependencies with <code>BUILD_LIBRARIES_FOR_DISTRIBUTION=FALSE<\/code> and to keep it as <code>YES<\/code> only for our SDK. We need to do the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Remove <code>BUILD_LIBRARY_FOR_DISTRIBUTION=YES<\/code> line from \u201cxcode archive\u201d scripts<\/li>\n\n\n\n<li>Set <code>BUILD_LIBRARY_FOR_DISTRIBUTION<\/code> to \u201cYes\u201d in the Build Settings section<\/li>\n\n\n\n<li>Override <code>BUILD_LIBRARY_FOR_DISTRIBUTION<\/code> for swift-grpc targets in Podfile through the post-install hook. We need this because otherwise <code>BUILD_LIBRARY_FOR_DISTRIBUTION<\/code> will be inherited from the SDK target and will be YES for grpc-swift dependencies. Add the script below to your Podfile.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" height=\"617\" width=\"2048\" src=\"https:\/\/adjoe.io\/wp-content\/uploads\/2023\/06\/Untitled.png\" alt=\"\" class=\"wp-image-2869\"\/><\/figure>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Ruby<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">post_install do |installer|\n installer.pods_project.targets.each do |target|\n   target.build_configurations.each do |config|     \n     config.build_settings[&#039;BUILD_LIBRARY_FOR_DISTRIBUTION&#039;] = &#039;NO&#039;\n   end\n end\nend<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">After that, you regenerate the project and run xcodebuild scripts again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then it builds, and you have your XCFramework, which simultaneously supports iOS devices and iOS simulators for both Intel and Apple Silicon processors:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" height=\"171\" width=\"1280\" src=\"https:\/\/adjoe.io\/wp-content\/uploads\/2023\/06\/grpc-swift.png\" alt=\"Internal file structure of xcframework\" class=\"wp-image-2872\" style=\"width:910px;height:137px\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we should add grpc-swift as a dependency to the podspec file, upload our XCFramework to the public server, and publish the podspec file to CocoaPods repo. The podspec file will look like this:<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Ruby<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code\">Pod::Spec.new do |spec|\n spec.name         = &quot;AdjoeWaveSDK&quot;\n spec.version      = &quot;0.1.1&quot;\n spec.summary      = &quot;Adjoe Wave SDK&quot;\n spec.description  = &quot;Core functionality of Adjoe Wave SDK&quot;\n spec.license      = { :type =&gt; &#039;Commercial&#039;, :text =&gt; &#039;https:\/\/adjoe.io\/privacy\/&#039; }\n spec.homepage     = &quot;https:\/\/adjoe.io&quot;\n spec.source       = { :http =&gt; &quot;path-to-sdk-on-server\/AdjoeWaveSDK.zip&quot;, :type =&gt; &#039;zip&#039; } \n spec.author       = { &quot;AdjoeWave&quot; =&gt; &quot;contact@adjoe.io&quot; } \n spec.platform     = :ios, &quot;11.0&quot;\n spec.swift_version = &#039;5.0&#039;\n\n\n spec.ios.preserve_paths = &#039;AdjoeWaveSDK.xcframework&#039;\n spec.ios.vendored_frameworks = &#039;AdjoeWaveSDK.xcframework&#039;\n\n\n spec.dependency &#039;gRPC-Swift&#039;\nend<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Now the customer\u2019s developer only needs to add our SDK to his Podfile: pod \u2018AdjoeWave\u2019.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With this approach, there\u2019s one huge potential issue. Our SDK compiled and linked against grpc-swift libraries, but it didn\u2019t embed them. On the client\u2019s project side, these grpc-swift libraries will be downloaded as source files. Then they\u2019ll be built by the client\u2019s Swift compiler version, which can differ from the one we used to build our SDK. This can potentially make grpc-swift libraries incompatible with the our SDK, since grpc-swift doesn\u2019t support the Module Stability feature.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The compiler is aware of this, and it gives you a warning during the build process of our SDK: <em>\u201cmodule \u2018SwiftProtobuf\u2019 was not compiled with Library Evolution support; using it means binary compatibility for \u2018AdjoeWaveSDK\u2019 can\u2019t be guaranteed.\u201d<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s see how we can benefit from using <a href=\"https:\/\/www.swift.org\/package-manager\/\" target=\"_blank\" rel=\"noreferrer noopener\">Swift Package Manager<\/a> instead of CocoaPods.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">grpc-swift through Swift package manager<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we are going to switch our development configuration from CocoaPods to Swift Package Manager.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The main advantages of having Swift Package Manager for SDK development are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Native support in Xcode. You don\u2019t need to install any additional Ruby libraries like with CocoaPods. It just works out of the box.<\/li>\n\n\n\n<li>Many libraries are dropping support for CocoaPods. <a href=\"https:\/\/forums.swift.org\/t\/grpc-swift-is-dropping-support-for-cocoapods\/56841\" target=\"_blank\" rel=\"noreferrer noopener\">grpc-swift is one of these libraries<\/a>. While it is still possible to use grpc-swift through CocoaPods, you cannot get the latest version of the library. That\u2019s because it\u2019s only available from Swift Package Manager.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;We don\u2019t need Podfile anymore, and we\u2019ll add grpc-swift dependency right from the Xcode:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" height=\"494\" width=\"1880\" src=\"https:\/\/adjoe.io\/wp-content\/uploads\/2023\/06\/Untitled-3.png\" alt=\"Adding grpc-swift dependency to the SDK target\" class=\"wp-image-2870\" style=\"width:910px;height:269px\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we can build the XCFramework. The same as for the CocoaPods configuration, we need to remove <code>BUILD_LIBRARIES_FOR_DISTRIBUTION=YES<\/code> from Xcode achieve scripts and add it to our SDK target.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We don\u2019t need <strong><code>spec.dependency 'grpc-swift'<\/code> <\/strong>in our distributable podspec file. Because now grpc-swift is linked statically (it\u2019s the default linkage type for SPM packages) to our SDK and there is no need to provide it as a transitive dependency anymore. This also means that all the implementation details are hidden inside our framework\u2019s binary.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we try to test our binary with some app, we\u2019ll receive an error message:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" height=\"1102\" width=\"1756\" src=\"https:\/\/adjoe.io\/wp-content\/uploads\/2023\/06\/Untitled-2.png\" alt=\".swiftinterface file exposed internal grpc-swift dependencies\" class=\"wp-image-2871\" style=\"width:910px;height:643px\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The reason for this issue is fascinating. When we link static libraries (grpc-swift) to a dynamic library (our SDK), those libraries\u2019 symbols are exported by the dynamic library by default. This makes grpc-swift part of our SDK\u2019s public interface, which is not allowed \u2013 as we found out earlier. There\u2019s <a href=\"https:\/\/github.com\/apple\/swift\/issues\/43633\" target=\"_blank\" rel=\"noreferrer noopener\">an open bug<\/a> in the Swift repository that addresses this issue. Hopefully, it\u2019ll be fixed some day.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The workaround here is to hide grpc-swift libraries from the public interface. For this, we need to mark all grpc-swift-related imports in our source code with <code>@_implementationOnly<\/code>, as shown below.<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Swift<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-swift\">@_implementationOnly import SwiftProtobuf\n@_implementationOnly import NIO\n@_implementationOnly import NIOHPACK\n@_implementationOnly import Logging\n@_implementationOnly import GRPC<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">We need to do this not only for our own code but also for the code we generated through <code>protoc<\/code> tool. To automate with step, we can add a script that adds <code>@_implementationOnly<\/code> to every line that imports the grpc-swift library:<\/p>\n\n\n\n\n\t<div class=\"code-block code-block--acf code-block--has-language\" data-block=\"code-block\">\n\t\t\t\t\t<div class=\"code-block__header\">\n\t\t\t\t<span class=\"code-block__language\">Shell<\/span>\n\t\t\t<\/div>\n\t\t\t\t<pre class=\"code-block__pre\"><code class=\"code-block__code language-bash\">sed -i &#039;&#039; &#039;s\/import SwiftProtobuf\/@_implementationOnly import SwiftProtobuf\/g&#039; generated_protos\/**\/*.swift\nsed -i &#039;&#039; &#039;s\/import GRPC\/@_implementationOnly import GRPC\/g&#039; generated_protos\/**\/*.swift\nsed -i &#039;&#039; &#039;s\/import NIO\/@_implementationOnly import NIO\/g&#039; generated_protos\/**\/*.swift<\/code><\/pre>\n\t<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">There\u2019s <a href=\"https:\/\/github.com\/apple\/swift-protobuf\/issues\/1157\" target=\"_blank\" rel=\"noreferrer noopener\">an open merge request<\/a> that proposes adding a specific option to <code>protoc<\/code> that does the same job as script above.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, after all these steps, our SDK works fine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, we can see another huge benefit of using Swift Package Manager. Since it statically links all the dependencies (in our case grpc-swift) to the target (our SDK), dependencies are embedded in the target. Our SDK binary is standalone now, and all implementation details are hidden from the user. The app developer won\u2019t have any Xcode or Swift compiler conflicts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But there\u2019s also one important caveat to pay attention to:<strong> <\/strong>If a customer\u2019s application contains a grpc-swift library, it may cause issues with duplicated grpc-swift symbols in runtime. This happens because <code>@_implementationOnly<\/code> only hides things from the public interface but does not affect symbol visibility. There\u2019s <a href=\"https:\/\/github.com\/apple\/swift-package-manager\/issues\/4414\" target=\"_blank\" rel=\"noreferrer noopener\">an open issue<\/a> in the swift-package-manager repository for this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What\u2019s the best solution?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s give some answers to the questions we asked ourselves in the beginning:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We are free to use different dependency managers for developing and distribution environments. As we have business requirements to support CocoaPods, we definitely need to support it for distribution. For our development environment, we choose Swift Package Manager because it\u2019s an industry standard these days, and more libraries will be switching from CocoaPods to Swift Package manager. As we\u2019ve just seen, grpc-swift has already done this.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Distributing transitive dependencies as a source code is a working approach, but it may cause binary incompatibility, as we\u2019ve seen above \u2013 see \u201cgrpc-swift through CocoaPods.\u201d Having transitive dependencies as precompiled binaries would be a perfect solution, but it\u2019s not possible if the dependency doesn\u2019t support the Module Stability feature. The trade-off solution is not to expose transitive dependencies to the app developer at all by using static linkage and <code>@_implementationOnly<\/code> trick. But in some scenarios, it may lead to duplicate-symbols warnings. The choice here really depends on your requirements.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To guarantee binary compatibility between the app and SDK, we may use the power of XCFramework and the Module Stability feature. If it\u2019s not possible \u2013 as in the case of grpc-swift \u2013 we may simply embed transitive dependencies in our SDK by using static linkage.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re interested in more details regarding grpc-swift and Module Stability, you can check out <a href=\"https:\/\/github.com\/grpc\/grpc-swift\/issues\/1063\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">this thread<\/a> and <a href=\"https:\/\/github.com\/grpc\/grpc-swift\/issues\/1063#issuecomment-785727051\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">read a comment<\/a> from one of the Swift-Protobuf developers. He explains how adding Library Evolution support for grpc-swift significantly impacts performance.<\/p>\n\n\n<section class=\"l-section l-section--jobs-include is-light l-pt-lg l-pb-lg\" data-block=\"jobs-include\">\n\t<div class=\"l-wrapper\">\n\t\t<div class=\"jobs-include\">\n\t\t\t\n\t\t\t<div class=\"jobs-include__table-wrap\" tabindex=\"0\">\n\t\t\t\t<table id=\"jobs-include-table-1\" class=\"jobs-include__table\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th scope=\"col\">Role<\/th>\n\t\t\t\t\t\t\t<th scope=\"col\">Team<\/th>\n\t\t\t\t\t\t\t<th scope=\"col\">Location<\/th>\n\t\t\t\t\t\t<\/tr>\n\t\t\t\t\t<\/thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\" data-label=\"Role\">\n\t\t\t\t\t\t\t\t\t<a class=\"jobs-include__role\" href=\"https:\/\/adjoe.io\/ko\/careers\/open-positions\/7a80a967-7259-4ef9-8314-245d4f467287\/\">\n\t\t\t\t\t\t\t\t\t\tProduct Owner &#8211; Dashboards (f\/m\/d)\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/th>\n\t\t\t\t\t\t\t\t<td data-label=\"Team\">\n\t\t\t\t\t\t\t\t\tAdvertising Solutions\t\t\t\t\t\t\t\t<\/td>\n\t\t\t\t\t\t\t\t<td data-label=\"Location\">\n\t\t\t\t\t\t\t\t\tHamburg\t\t\t\t\t\t\t\t<\/td>\n\t\t\t\t\t\t\t<\/tr>\n\t\t\t\t\t\t\t\t\t\t\t<\/tbody>\n\t\t\t\t<\/table>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/div>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>The adjoe SDK allows app developers to integrate video, playable, and banner ad formats into their apps to monetize their&#8230;<\/p>\n","protected":false},"author":51,"featured_media":6201,"template":"","engineer_blog_category":[74],"class_list":["post-2838","engineer_blog","type-engineer_blog","status-publish","has-post-thumbnail","hentry","engineer_blog_category-ios"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Improving Code Obfuscation in Android Apps<\/title>\n<meta name=\"description\" content=\"Read how our iOS Developer distributes a binary iOS SDK with transitive dependencies (gRPC-swift library) to build adjoe\u2019s product.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Improving Code Obfuscation in Android Apps\" \/>\n<meta property=\"og:description\" content=\"Read how our iOS Developer distributes a binary iOS SDK with transitive dependencies (gRPC-swift library) to build adjoe\u2019s product.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/\" \/>\n<meta property=\"og:site_name\" content=\"adjoe | Making every interaction the start of lasting value\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/Adjoe\/100076450974671\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-24T17:27:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/03\/5-How-to-Distribute-a-Binary-iOS-SDK-with-Third-Party-Dependencies.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"1190\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/how-to-distribute-a-binary-ios-sdk-grpc-swift\\\/\",\"url\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/how-to-distribute-a-binary-ios-sdk-grpc-swift\\\/\",\"name\":\"Improving Code Obfuscation in Android Apps\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/how-to-distribute-a-binary-ios-sdk-grpc-swift\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/how-to-distribute-a-binary-ios-sdk-grpc-swift\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/5-How-to-Distribute-a-Binary-iOS-SDK-with-Third-Party-Dependencies.png\",\"datePublished\":\"2026-03-23T15:10:00+00:00\",\"dateModified\":\"2026-11-24T17:27:52+00:00\",\"description\":\"Read how our iOS Developer distributes a binary iOS SDK with transitive dependencies (gRPC-swift library) to build adjoe\u2019s product.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/how-to-distribute-a-binary-ios-sdk-grpc-swift\\\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/how-to-distribute-a-binary-ios-sdk-grpc-swift\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/how-to-distribute-a-binary-ios-sdk-grpc-swift\\\/#primaryimage\",\"url\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/5-How-to-Distribute-a-Binary-iOS-SDK-with-Third-Party-Dependencies.png\",\"contentUrl\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/5-How-to-Distribute-a-Binary-iOS-SDK-with-Third-Party-Dependencies.png\",\"width\":1800,\"height\":1190},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/company\\\/engineer-blog\\\/how-to-distribute-a-binary-ios-sdk-grpc-swift\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to distribute a binary iOS SDK with third-party dependencies\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#website\",\"url\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/\",\"name\":\"adjoe | Making every interaction the start of lasting value\",\"description\":\"adjoe is a global tech company powering user acquisition, monetization and audience engagement across the app economy \u2013 making every interaction the start of lasting value.\",\"publisher\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#organization\",\"name\":\"adjoe | Making every interaction the start of lasting value\",\"url\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/OG-img-1200x630-1.jpg\",\"contentUrl\":\"https:\\\/\\\/adjoe.io\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/OG-img-1200x630-1.jpg\",\"width\":1200,\"height\":630,\"caption\":\"adjoe | Making every interaction the start of lasting value\"},\"image\":{\"@id\":\"https:\\\/\\\/adjoe.io\\\/ko\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/people\\\/Adjoe\\\/100076450974671\\\/\",\"https:\\\/\\\/www.instagram.com\\\/adjoe.io\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/adjoe\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Improving Code Obfuscation in Android Apps","description":"Read how our iOS Developer distributes a binary iOS SDK with transitive dependencies (gRPC-swift library) to build adjoe\u2019s product.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/","og_locale":"ko_KR","og_type":"article","og_title":"Improving Code Obfuscation in Android Apps","og_description":"Read how our iOS Developer distributes a binary iOS SDK with transitive dependencies (gRPC-swift library) to build adjoe\u2019s product.","og_url":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/","og_site_name":"adjoe | Making every interaction the start of lasting value","article_publisher":"https:\/\/www.facebook.com\/people\/Adjoe\/100076450974671\/","article_modified_time":"2026-11-24T17:27:52+00:00","og_image":[{"width":1800,"height":1190,"url":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/03\/5-How-to-Distribute-a-Binary-iOS-SDK-with-Third-Party-Dependencies.png","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/","url":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/","name":"Improving Code Obfuscation in Android Apps","isPartOf":{"@id":"https:\/\/adjoe.io\/ko\/#website"},"primaryImageOfPage":{"@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/#primaryimage"},"image":{"@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/#primaryimage"},"thumbnailUrl":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/03\/5-How-to-Distribute-a-Binary-iOS-SDK-with-Third-Party-Dependencies.png","datePublished":"2026-03-23T15:10:00+00:00","dateModified":"2026-11-24T17:27:52+00:00","description":"Read how our iOS Developer distributes a binary iOS SDK with transitive dependencies (gRPC-swift library) to build adjoe\u2019s product.","breadcrumb":{"@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/#primaryimage","url":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/03\/5-How-to-Distribute-a-Binary-iOS-SDK-with-Third-Party-Dependencies.png","contentUrl":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/03\/5-How-to-Distribute-a-Binary-iOS-SDK-with-Third-Party-Dependencies.png","width":1800,"height":1190},{"@type":"BreadcrumbList","@id":"https:\/\/adjoe.io\/ko\/company\/engineer-blog\/how-to-distribute-a-binary-ios-sdk-grpc-swift\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/adjoe.io\/ko\/"},{"@type":"ListItem","position":2,"name":"How to distribute a binary iOS SDK with third-party dependencies"}]},{"@type":"WebSite","@id":"https:\/\/adjoe.io\/ko\/#website","url":"https:\/\/adjoe.io\/ko\/","name":"adjoe | Making every interaction the start of lasting value","description":"adjoe is a global tech company powering user acquisition, monetization and audience engagement across the app economy \u2013 making every interaction the start of lasting value.","publisher":{"@id":"https:\/\/adjoe.io\/ko\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/adjoe.io\/ko\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/adjoe.io\/ko\/#organization","name":"adjoe | Making every interaction the start of lasting value","url":"https:\/\/adjoe.io\/ko\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/adjoe.io\/ko\/#\/schema\/logo\/image\/","url":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/11\/OG-img-1200x630-1.jpg","contentUrl":"https:\/\/adjoe.io\/wp-content\/uploads\/2026\/11\/OG-img-1200x630-1.jpg","width":1200,"height":630,"caption":"adjoe | Making every interaction the start of lasting value"},"image":{"@id":"https:\/\/adjoe.io\/ko\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/Adjoe\/100076450974671\/","https:\/\/www.instagram.com\/adjoe.io\/","https:\/\/www.linkedin.com\/company\/adjoe"]}]}},"_links":{"self":[{"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog\/2838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog"}],"about":[{"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/types\/engineer_blog"}],"author":[{"embeddable":true,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/users\/51"}],"version-history":[{"count":7,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog\/2838\/revisions"}],"predecessor-version":[{"id":5536,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog\/2838\/revisions\/5536"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/media\/6201"}],"wp:attachment":[{"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/media?parent=2838"}],"wp:term":[{"taxonomy":"engineer_blog_category","embeddable":true,"href":"https:\/\/adjoe.io\/ko\/wp-json\/wp\/v2\/engineer_blog_category?post=2838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}