Build a custom adapter for Unity
Develop a custom adapter for Unity by creating an XML file that wraps your Android and iOS integrations, allowing publishers to add it to their Unity projects.
Read time 1 minuteLast updated 4 hours ago
As many of ironSource publishers are using Unity engine to develop their games, we recommend you to create a dedicated interface for Unity. Our best practice is doing so by using an XML file. Alternatively, if your publishers are working with Unity manual integration, they can add the native artefacts directly to their Unity project. Follow these instructions to provide a Unity adapter for your publishers:
- Create custom adapters for Android.
- Create custom adapters for iOS.
- Create an XML file that wraps your Android & iOS integrations, as explained below.
Create your custom adapter XML
The XML file will wrap both your Android and iOS custom adapters. Make sure to save your XML file as:IS<your\_network\_name>CustomAdapterDependencies.xml
Example
<dependencies> <androidPackages> <androidPackage spec=your-SDK-gradle> <repositories> <repository>your-network-repository-url</repository> </repositories> </androidPackage> </androidPackages> <androidPackages> <androidPackage spec=Your-Adapter-gradle> <repositories> <repository>Your-adapter-repository-url</repository> </repositories> </androidPackage> </androidPackages> <iosPods> <iosPod name=adapter_name version=your-pod-version> <sources> <source>https://github.com/CocoaPods/Specs</source> </sources> </iosPod> </iosPods> </dependencies>