3 - Add X3M SDK and Loomit adapters to your app
Add the npm package
add the package react-native-xmediator
to your app.
Add the native SDK dependencies to your app.
Pick networks you want to add to your app.
Configure the XMediator provider
In the root of your app, usually in the App.tsx
file, add the following code:
import { XMediatorProvider } from "react-native-xmediator";
export default function App() {
return (
<XMediatorProvider
appKey={"<YOUR_APP_KEY>"}
// other props
>
{/* your app code... */}
</XMediatorProvider>
);
}
Tip
The XMediatorProvider
has a autoInitialize
prop (default: true
). If set to false
, you will need to use a useInitialize
hook.