IosNeeds
Declares what a native module's iOS side needs beside its Swift class: Info.plist keys, frameworks and Swift packages.
Utilização
Connect a reporting service
Este tipo é usado por 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' },
});Declaração do tipo
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[];
}Membros 5
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
class | string | Sim | The final Swift class conforming to the generated <Name>Spec, in ios/. |
launch | boolean | Não | The class's @MainActor static func launch() runs as the app finishes launching (docs/native-modules.md#launch). |
infoPlist | Record<string, PlistNeed> | Não | Info.plist keys, such as usage descriptions. |
frameworks | string[] | Não | System frameworks the app target links, like CoreHaptics. |
swiftPackages | SwiftPackageNeed[] | Não | — |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.