SDK Registry Access
The Alphyn SDK’s native binaries (the Android .aar and the iOS Alphyn.xcframework) are served
from the Alphyn package registry and resolved by your build, not committed into the SDK package.
Your build authenticates to the registry with your app’s API key. This is the same delivery model
that gated mobile SDKs use (a private Maven / CocoaPods / npm feed behind a token); the credential
is a build-time secret and never lives in your source tree.
The credential
Section titled “The credential”ALPHYN_REGISTRY_KEY is your app API key: the key you generate on
portal.byterialab.com when you register your app (see
How to Register Your App). It is the same key used for
build registration, so you already have it. A React Native or Flutter project registers as two apps,
one per platform; either platform’s key authenticates the registry.
Supplying it at build time
Section titled “Supplying it at build time”The native binary is verified against a pinned SHA-256 wherever it is resolved, so the key only controls access, never integrity.
Android (Gradle). Export it in the build environment; the registry repository alphyn-cli integrate wires into your Gradle build reads it from there:
export ALPHYN_REGISTRY_KEY=<YOUR_APP_API_KEY>Keep it out of your repository the way you would any build secret: your shell profile, an untracked env file your build sources, or a CI secret store.
iOS via CocoaPods (React Native, Flutter). These packages fetch the framework during
pod install, which reads the environment variable, the same one Gradle uses, so exporting it once
covers both native layers:
export ALPHYN_REGISTRY_KEY=<YOUR_APP_API_KEY>cd ios && pod installiOS via Swift Package Manager (native iOS). alphyn-cli integrate generates a Swift package that
resolves the framework from the registry, and Swift Package Manager authenticates through ~/.netrc.
Add one line (replace the host if Byteria gave you a different endpoint):
machine packages.byterialab.com login x password <YOUR_APP_API_KEY>Unity. alphyn-cli integrate wires the registry Maven into the project’s custom Main Gradle
Template (Assets/Plugins/Android/mainTemplate.gradle) for the Android player and bundles the iOS
Alphyn.xcframework directly, so iOS needs no registry key. Enable Custom Main Gradle Template
under Player Settings > Publishing Settings so Unity uses the file, and supply the key exactly as
for Android above, by exporting ALPHYN_REGISTRY_KEY in the build environment.
If you prefer to pull the com.byterialab.alphyn-sdk package with the Unity Package Manager instead
of running the CLI, add it as a scoped registry in Packages/manifest.json:
{ "scopedRegistries": [ { "name": "Alphyn", "url": "https://packages.byterialab.com/npm", "scopes": ["com.byterialab"] } ], "dependencies": { "com.byterialab.alphyn-sdk": "<version>" }}and authenticate the Package Manager through ~/.upmconfig.toml (Basic auth: the user is the literal
x, the password is your app API key, base64-encoded together):
[npmAuth."https://packages.byterialab.com/npm"]_auth = "<base64 of x:YOUR_APP_API_KEY>"alwaysAuth = trueGenerate the value with printf 'x:%s' "$ALPHYN_REGISTRY_KEY" | base64. The package carries the C#
and the iOS framework; the Android .aar still resolves from the registry Maven at build time, so
keep the mainTemplate.gradle wiring and the Gradle key above even on this path.
CI. Add ALPHYN_REGISTRY_KEY as a secret and export it in the job that builds the app. A build
without it fails at dependency resolution (Gradle) or at pod install (CocoaPods), with a message
naming the missing key.
Custom endpoint
Section titled “Custom endpoint”The registry endpoint is built into the SDK package, defaulting to production
(https://packages.byterialab.com); you do not normally set it. If Byteria gives you a specific
endpoint, override it:
ALPHYN_REGISTRY_URLoverrides the Android Maven repository.ALPHYN_REGISTRY_SPM_URLoverrides where the iOSAlphyn.xcframeworkis fetched. It applies to every iOS path: native iOS via Swift Package Manager, and the React Native and Flutter pods, whose podspec reads it atpod install. Its production default ishttps://packages.byterialab.com/spm.
Offline alternative (native Android and iOS)
Section titled “Offline alternative (native Android and iOS)”If your environment cannot reach the registry at build time, native Android, native iOS, and Unity
can instead use the self-contained artifact from your app’s SDK Downloads page: the raw .aar as
a local file dependency, or Alphyn.xcframework embedded directly. For Unity, place both binaries in
the plugin folders (Assets/AlphynSDK/Plugins/Android and .../Plugins/iOS) instead of wiring
mainTemplate.gradle. Those carry the native inside them and need no registry key. See the platform
install pages for the exact steps. The React Native and Flutter packages resolve their native from the
registry and do not have this offline path.