IosNeeds
Declares what a native module's iOS side needs beside its Swift class: Info.plist keys, frameworks and Swift packages.
Usage
Connect a reporting service
This type is used by defineModule
// modules/crash-service/crash-service.ts
import { defineModule, fn } from 'kuito';
export default defineModule('CrashService', {
start: fn.main<(key: string) => Promise<void>>(),
ios: { class: 'CrashServiceModule' },
android: { class: 'com.example.myapp.modules.crashservice.CrashServiceModule' },
});Type declaration
export interface IosNeeds {
/** The `final` Swift class conforming to the generated `<Name>Spec`, in `ios/`. */
class: string;
/** The class's `@MainActor static func launch()` runs as the app finishes launching (docs/native-modules.md#launch). */
launch?: boolean;
/** Info.plist keys, such as usage descriptions. */
infoPlist?: Record<string, PlistNeed>;
/** System frameworks the app target links, like `CoreHaptics`. */
frameworks?: string[];
swiftPackages?: SwiftPackageNeed[];
}Members 5
| Name | Type | Required | Description |
|---|---|---|---|
class | string | Yes | The final Swift class conforming to the generated <Name>Spec, in ios/. |
launch | boolean | No | The class's @MainActor static func launch() runs as the app finishes launching (docs/native-modules.md#launch). |
infoPlist | Record<string, PlistNeed> | No | Info.plist keys, such as usage descriptions. |
frameworks | string[] | No | System frameworks the app target links, like CoreHaptics. |
swiftPackages | SwiftPackageNeed[] | No | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.