Migrate from bitHumanKit
Move an iPhone, iPad or Mac app from retired bitHumanKit to Expression2 or Essence2Kit.
bitHumanKit is retired and is no longer a product of the Swift package. Move your app to Expression2 or Essence2Kit, the two products that render the avatar on the device.
What replaces it
| With bitHumanKit | Now |
|---|---|
the package’s old GitHub URL (github.) | https: (package identity homebrew-bithuman) |
the bitHumanKit product | the Expression2 or Essence2Kit product |
import bitHumanKit | import Expression2 or import Essence2Kit |
config.apiKey on VoiceChatConfig | Expression2Credential. or Essence2Credential., before you create an engine |
| iPhone 16 Pro or iPad Pro M4 or newer, plus two Apple memory entitlements | Expression 2: iOS 16 or macOS 13 or newer. Essence 2: iOS 26 or macOS 26 or newer. The engines need no entitlement |
Pick Expression2 to animate any character from one portrait, or Essence2Kit for a photoreal person. The iOS & iPadOS page compares the two.
What the products do not include
bitHumanKit was a voice agent: VoiceChat listened, answered with a language model and spoke. Expression2 and Essence2Kit render the avatar only. You feed 16 kHz mono speech in and take lip-synced frames out.
Keep your own speech recognition, language model and speech synthesis, and pass each reply’s audio to the engine. VoiceChat, AvatarRendererView, HardwareCheck, ExpressionWeights and AgentCatalog have no counterpart. Every entry point the products do have is on the Swift reference.
Steps
8 steps
1. Remove the old product
In
Package.swift, delete thebitHumanKitproduct line from your target. In Xcode, open your target’s General → Frameworks, Libraries, and Embedded Content and removebitHumanKit.2. Point the package at its current URL
If your project lists the package at its old GitHub URL, remove it under Project → Package Dependencies, then add it again with the current URL from the table above.
3. Add the product your app uses (
Expression2orEssence2Kit)The Xcode steps, the
Package.swiftline with the current version, and each product’s deployment target are under Install.4. Replace the imports
Change
import bitHumanKittoimport Expression2orimport Essence2Kit.5. Set the credential
Replace
config.apiKeywithExpression2Credential.set(secret)orEssence2Credential.set(secret)(Authenticate).6. Render
Replace the
VoiceChatandAvatarRendererViewcode with the engine loop in Run your first avatar.7. Remove what only
bitHumanKitneededDelete the
com.apple.developer.kernel.increased-memory-limitandcom.apple.developer.kernel.extended-virtual-addressingentitlements, unless other code in your app needs them. DeleteNSSpeechRecognitionUsageDescriptionunless your own code uses speech recognition. KeepNSMicrophoneUsageDescriptionif your app records the user.8. Update and build
Choose File → Packages → Update to Latest Package Versions in Xcode, or run
swift package update, then build for a physical device.
All steps done.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
The build fails with product 'bitHumanKit' not found in package 'homebrew-bithuman' | a target still lists the retired product | remove the product line (step 1) |
No such module 'bitHumanKit' | a source file still imports it | change the import (step 4) |
| Essence 2 does not start on an older iPhone | Essence 2 needs iOS 26 or newer | use Expression2 on that device |
More fixes, by symptom, are on Swift troubleshooting.