A high-performance, on-device Anisette Data generator and ADI emulation library for iOS, macOS, tvOS, and visionOS via Swift Package Manager.
AnisetteKit is built on top of foundational ideology behind Sidestore's omnisette-server and uses unicorn-engine's linux elf64 emulation to achieve self-contained on-device authentication:
- SideStore/omnisette-server: Originally demonstrated that ADI shared libraries (
libstoreservicescore.soandlibCoreADI.so) could be executed in an AArch64 Linux environment to provision and generate valid Anisette authentication data. However,omnisette-serverrequired deploying and maintaining a remote Linux server or Docker container, introducing network latency, hosting overhead, and server dependencies. - Unicorn Engine (TCI): A lightweight, multi-platform CPU emulator. By leveraging Unicorn compiled with the Tiny Code Interpreter (TCI) backend into multi-platform XCFrameworks,
AnisetteKitexecutes the Linux AArch64 binaries inside an in-process virtual machine. This enables seamless, zero-server execution directly on iOS, tvOS, and visionOS without requiring JIT entitlements or debug servers.
- Full On-Device Execution: Runs entirely local on device.
- NO Servers Required: Completely eliminates the need for remote or external Anisette servers.
- Custom TCI Engine for Unicorn: Powered by our custom Tiny Code Interpreter (TCI) implementation added to Unicorn Engine (
-DUNICORN_ENABLE_TCI=ON), enabling pure C bytecode interpretation of Linux AArch64 binaries across iOS, macOS, tvOS, and visionOS without JIT. - NO JIT-Entitlement / Debug-Server Required: Runs on iOS, tvOS, and visionOS devices without requiring JIT entitlements, debug servers, or W^X kernel violations.
- Native Host Execution on macOS: Runs Linux AArch64 binaries directly on ARM64 host CPUs via in-process memory mapping for fastest header generation.
| Platform | Runtime Mode | JIT Required |
|---|---|---|
| iOS (Real Device) | TCI Bytecode Interpreter | No |
| iOS Simulator | TCI Bytecode Interpreter | No |
| macOS (ARM64 & x86_64) | Native AArch64 / Emulated | No |
| tvOS (Device & Simulator) | TCI Bytecode Interpreter | No |
| visionOS (Device & Simulator) | TCI Bytecode Interpreter | No |
- When to use: Initializes the client, attaches a provider, and conditionally resolves/validates the
.sodirectory via closure for providers that require local binaries. - Parameters:
provisioningDir: DirectoryURLwhere persistent device provisioning state (adi.pb) is saved.clientInfo: Apple client identification string (defaults toAnisetteConstants.defaultClientInfo).provider: Optionalany AnisetteDataProvider(defaults toNativeAnisetteDataProvideron macOS,UnicornAnisetteDataProvideron other platforms).libraryDirectoryResolver: Optional closure returning the directoryURLcontaining required.sobinaries (required when local providers are used).
- When to use: Pre-flight validation before initialization to verify
libstoreservicescore.soandlibCoreADI.soexist in the specified directoryURL. - Parameters:
directory: FilesystemURLto inspect.
getAnisetteData(identifier:storage:headers:) async throws -> (headers: [String: String], newBlob: Data?)
- When to use: Core entrypoint for Anisette header generation with configurable provisioning storage and request headers.
- Parameters:
identifier: Persistent deviceUUID.storage:.disk(default) or.memory(existingBlob:).headers: OptionalAnisetteRequestHeadersobject to customize client/device metadata.
- Returns: Tuple
(headers: [String: String], newBlob: Data?)containing generated headers and newly provisioned blob if created.
AnisetteDataProvider: Public protocol for ADI data providers (requiresLocalLibraries,getAnisetteHeaders,startProvision,endProvision).UnicornAnisetteDataProvider: Pure C Unicorn TCI emulation provider (available on all platforms).NativeAnisetteDataProvider: Direct host memory-mapped AArch64 execution provider (macOS only).
LibraryDirectoryResolver:@Sendable () throws -> URLclosure type for supplying runtime.sodirectory.AnisetteRequestHeaders: Structure representing Anisette request headers with full parameter customizability and fluent.with { ... }support.AnisetteDataResponse: Structure holding cryptographic output response headers (oneTimePassword,machineID).AnisetteError: Strongly-typed errors (librariesNotFound,loaderFailed,symbolMissing,adiError,invalidArgument,httpError,invalidResponse).AnisetteConstants: Contains default headers, routing code (17106176), URLs, and required binary names (AnisetteConstants.Libraries.requiredNames).
This project is provided for educational and research purposes only.
AnisetteKitis an independent project and is not affiliated with, sponsored by, or endorsed by Apple Inc.- Use of this software is entirely at your own risk. The author and contributors assume no responsibility or liability for any damages, locked accounts, account penalties/bans, or legal repercussions arising from the use or distribution of this code.
- By using this library, you agree to comply with all applicable terms, laws, and regulations.
AnisetteKit is licensed under the GNU Affero General Public License v3.0 (AGPLv3).
- Strong Copyleft: Any application, framework, or tool that compiles against, links against (statically or dynamically), or includes
AnisetteKitis considered a combined/derivative work and must be fully open-sourced under the AGPLv3 upon distribution. - Network / Cloud Trigger (AGPL Section 13): If you run
AnisetteKitas part of any network service, cloud API, or server backend (e.g. hosting a remote Anisette server), you must make the complete, corresponding source code of the entire service and all linked software available to all users interacting with it over the network. - Closed-Source / Proprietary Use Prohibited: Closed-source, commercial, or proprietary distribution without full source disclosure is strictly prohibited under the AGPLv3.
- App Store Distribution Prohibited: Inclusion in, linking against, or distribution through any App Store builds is strictly prohibited.
Copyright © 2026 Magesh K. All rights reserved.
Full license information can be found at LICENSE