Course contentsShow
← React Native
Lesson 110 of 1,5552. Project Scaffolding with ExpoFree lesson

Linking Proprietary SDKs

Integrate third-party native libraries through custom development client configurations.

In this lesson, you will learn how to bridge specialized, closed-source native SDKs into your Expo project using custom development clients.

The Challenge of Proprietary SDKs

Sometimes your app needs to interact with hardware or services that aren't public—like a custom payment terminal, a biometric sensor, or a private enterprise security suite. These "proprietary SDKs" come as binary files (like .framework or .aar files) rather than standard npm packages. Since Expo Go is a pre-built app, it cannot "see" these private files. To use them, you must create a Custom Development Client.

The Integration Strategy

To link these libraries, you use a Config Plugin. This is a small piece of JavaScript that tells the Expo prebuild process how to modify your native ios and android folders before they are compiled.

  1. Placement: You place your proprietary SDK files in your project directory (e.g., inside an ios/Frameworks/ folder).
  2. The Plugin: You write a Config Plugin that hooks into the prebuild cycle to inject the path of these files into your Podfile (for iOS) or build.gradle (for Android).
  3. Prebuild: When you run npx expo prebuild, Expo reads your config, runs your plugin, and automatically links the proprietary code into the native project structure.

Here is a conceptual look at how a plugin tells Expo where to look for a framework:

// my-proprietary-plugin.js
const { withXcodeProject } = require('@expo/config-plugins');

module.exports = function withMySdk(config) {
  return withXcodeProject(config, (config) => {
    // Logic to add the local SDK file to the project's framework search paths
    const xcodeProject = config.modResults;
    xcodeProject.addFramework('./ios/Frameworks/Proprietary.framework', { embed: true });
    return config;
  });
};

Bridging the Gap

Once the native side is linked via the plugin, the SDK is effectively "part" of your app. However, JavaScript doesn’t automatically know how to talk to it. You will typically need to write a small Native Module (using the bridge communication concepts we covered earlier) to expose the specific functions of the proprietary SDK to your React Native code. By using a custom development client, you ensure that your local environment has the same native capabilities as your production build.

Key Takeaway: Linking proprietary SDKs requires using a Config Plugin to inject binary files into your project during prebuild, allowing you to interface with private native code through a custom development client.