Approov Unity Service Layer
Protect UnityWebRequest and HttpClient traffic on iOS and Android with Approov token injection, dynamic certificate pinning, secure string substitution, trace headers, and project-based configuration.
io.approov.service.unity Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/approov-unity.git 
README Markdown
Copy this to your project's README.md
## Installation
Add **Approov Unity Service Layer** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/approov-unity.git
```
[](https://www.pkglnk.dev/pkg/approov-unity)README
Approov Unity Service
io.approov.service.unity is a Unity 6+ UPM package that adds Approov protection to both UnityWebRequest and HttpClient.
Install
Add the package from a Git URL in Unity Package Manager:
https://github.com/approov/approov-service-unity.git
After installing the package:
- Import the
Shapes Appsample from the Package Manager if you want the demo content. The sample scene is not shown directly underPackages/io.approov.service.unitybecause Unity hidesSamples~in installed packages. After import, openAssets/Samples/Approov Unity Service Layer/<package-version>/Shapes App/Scenes/SampleScene.unity. - Open
Tools/Approov/Approov Settingsand paste the config string fromapproov sdk -getConfigString. Use the same window to install the native iOS SDK if you are targeting iOS. - For Android, no manual
mainTemplate.gradleor manifest edits are required. The packaged Android library resolves the Approov SDK and OkHttp from Maven automatically. The Android project minimum API level must be set to 23 or higher.
Initialize
using Approov;
ApproovService.Initialize();
The parameterless initializer reads the config string from project settings. Native initialization only runs on iOS and Android player builds.
Use With UnityWebRequest
using Approov;
using UnityEngine.Networking;
UnityWebRequest request = UnityWebRequest.Get("https://approov.io");
yield return ApproovService.SendWebRequest(request);
Use ApproovService.SendWebRequest(...) as the primary UnityWebRequest integration surface. It applies request mutation, token injection, secure-string substitution, and Approov certificate validation before dispatch.
ApproovWebRequest remains available for compatibility, but it should not be the primary documented path because Unity method hiding can bypass Approov processing if the instance is handled through a UnityWebRequest reference.
Use With HttpClient
using Approov;
using System.Net.Http;
HttpClient client = ApproovService.CreateHttpClient();
HttpResponseMessage response = await client.GetAsync("https://approov.io");
Supported Surface
ApproovServiceApproovWebRequestApproovHttpClientHandlerApproovExceptionhierarchy
Low-level native bridge details are package internals and are not the recommended integration surface.
iOS SDK Installer
The package includes an editor installer that:
- queries GitHub Releases for
approov/approov-ios-sdk - downloads
Approov.xcframework - installs it into
Assets/Plugins/iOS/Approov.xcframework - pins the resolved release in project settings so the project is reproducible
Use Tools/Approov/Approov Settings to install the latest release, install a specific version, or reinstall the pinned version.
Repository Role
This repository is the package-first home for the shared Approov Unity service layer. It replaces the old quickstart-style repo layout with a reusable package that can be consumed directly from GitHub and used across the main Unity networking surfaces.
Migration From The Old Quickstart
The old flow asked users to copy Assets/ into their project and manually fetch native binaries. The package now owns that setup:
- runtime code lives inside the UPM package
- Android dependencies are resolved automatically through Gradle/Maven
- iOS uses the built-in Unity editor installer for
Approov.xcframework - the demo is distributed as a Package Manager sample instead of a separate copy step
Platform Notes
- This package is intended only for mobile apps iOS/Android projects
- Unity 6+ or 2022 LTS version
- Android builds require project min SDK 23 or higher
- iOS uses
Approov.xcframework
Comments
No comments yet. Be the first!
Sign in to join the conversation
Sign In