Simulator Support
Supported Configurations (NCKit 1.2.1+)โ
| Host | Simulator | Supported | Notes |
|---|---|---|---|
| Apple Silicon Mac (M1/M2/M3/M4) | iOS arm64 Simulator | Yes | ios-arm64_x86_64-simulator slice |
| Intel Mac | iOS x86_64 Simulator | Yes | Native x86_64 from 1.2.1+ |
| Intel Mac | iOS arm64 Simulator (Rosetta) | Yes | Optional; not required on 1.2.1+ |
Use Exact Version 1.2.1 or newer so Xcode links the universal simulator slice. See Requirements.
Older releases (before 1.2.1)โ
Releases before 1.2.1 shipped ios-arm64-simulator only. On Intel Mac:
| Simulator | Supported |
|---|---|
| x86_64 (native) | No |
| arm64 (Rosetta) | Yes |
Enable Rosetta on Intel Mac (pre-1.2.1 only)โ
- In Xcode, go to Product โ Destination
- Select Rosetta Simulator (any iPhone model)
Or add to your Podfile / xcconfig:
EXCLUDED_ARCHS[sdk=iphonesimulator*] = x86_64
What Happens on Unsupported Simulatorโ
On an older NCKit build with only ios-arm64-simulator, running on an Intel x86_64 simulator without Rosetta:
- Build may succeed โ linker skips the arm64 simulator slice
- Launch crashes at
df_createโNCKitError.libraryInit(orSIGABRTif uncaught)
Fix: Upgrade to 1.2.1 or use Rosetta / a physical device.
do {
let processor = try NCKitProcessor(modelURL: modelURL)
} catch NCKitError.libraryInit {
#if targetEnvironment(simulator)
print("Simulator: upgrade to NCKit 1.2.1+ or use Rosetta / device")
#else
throw NCKitError.libraryInit
#endif
}
Simulator-Safe Architecture Patternโ
final class NCKitManager {
private var processor: NCKitProcessor?
var isAvailable: Bool { processor != nil }
func initialize() {
do {
let modelURL = try NCKitModelLocator.modelTarGzURL()
processor = try NCKitProcessor(modelURL: modelURL)
} catch {
print("NCKit unavailable: \(error)")
}
}
func denoise(inputURL: URL, outputURL: URL) throws {
guard let proc = processor else {
try FileManager.default.copyItem(at: inputURL, to: outputURL)
return
}
try NCKitFileProcessor.processFile(
inputURL: inputURL,
outputURL: outputURL,
processor: proc
)
}
}
Physical Device Testingโ
For full noise cancellation testing, always use a physical iOS device (iPhone or iPad).