Explicit by design
No environment reads, network downloads, hidden certificate authorities, logging, or global state.
@udid-tools/core turns the Apple Profile Service flow into a small, explicit API. It generates valid mobile configuration profiles, optionally signs them with developer-provided PKCS#12 material, and safely parses CMS-signed device responses.
Explicit by design
No environment reads, network downloads, hidden certificate authorities, logging, or global state.
Safe failures
Expected failures return typed Result values. Throwing variants are always named OrThrow.
Future-compatible
Known Apple fields are typed while unknown response data is preserved losslessly.
Framework-agnostic
Use the same package from Next.js, Express, Node HTTP, serverless functions, or your own backend.
import { generateProfile, parseProfileServiceResponse } from "@udid-tools/core";
const generated = await generateProfile({ profile: { kind: "profile-service", identifier: "com.example.profile-service", displayName: "Device Identification", service: { responseUrl: "https://example.com/profile-response", deviceAttributes: ["UDID", "SERIAL", "PRODUCT", "VERSION"], }, },});
if (!generated.ok) { console.error(generated.error.code);}Signing is selected by providing a complete nested signing object. Parsing verifies CMS integrity by default, can validate against caller-provided trust anchors, correlates one-time challenges, and preserves unknown future response fields in raw.