@insidepics/expo-apple-intelligence 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 INSP LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,178 @@
1
+ # @insidepics/expo-apple-intelligence
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@insidepics/expo-apple-intelligence.svg)](https://www.npmjs.com/package/@insidepics/expo-apple-intelligence)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@insidepics/expo-apple-intelligence.svg)](https://www.npmjs.com/package/@insidepics/expo-apple-intelligence)
5
+ [![CI](https://github.com/InsidePics/expo-apple-intelligence/actions/workflows/ci.yml/badge.svg)](https://github.com/InsidePics/expo-apple-intelligence/actions/workflows/ci.yml)
6
+ [![license: MIT](https://img.shields.io/npm/l/@insidepics/expo-apple-intelligence.svg)](./LICENSE)
7
+
8
+ An Expo native module exposing Apple's on-device intelligence APIs — Foundation Models, Vision, Speech, and Image Playground — to React Native / Expo.
9
+
10
+ All processing runs locally on the device. Nothing is sent to the network. Features that depend on newer OS releases are availability-gated at runtime: when a capability is unavailable (older OS, unsupported hardware, or model not yet downloaded), the corresponding call resolves to `null` rather than throwing, so you can degrade gracefully.
11
+
12
+ ## Features
13
+
14
+ Grouped by the Apple framework that backs each capability, with the minimum OS version derived from the `@available` gates in the native source.
15
+
16
+ ### Vision — image analysis (iOS 15.1+ / macOS 13.0+)
17
+
18
+ - **Comprehensive analysis** — run every available Vision request in a single pass.
19
+ - **Face detection** — bounding boxes, landmarks, roll/yaw/pitch angles, and capture quality.
20
+ - **Text recognition (OCR)** — accurate-level recognition with up to 10 ranked candidates per observation.
21
+ - **Image classification** — full unfiltered label set with confidences.
22
+ - **Barcode & QR detection** — symbology, payload string, and corner points.
23
+ - **Human body pose** and **hand pose** detection — named joints with normalized coordinates and confidences.
24
+ - **Image feature print** — a similarity vector for nearest-neighbour / dedup use cases.
25
+ - **Saliency** — attention-based and objectness-based salient regions.
26
+ - **Animal detection** — bounding boxes with per-animal labels.
27
+ - **Rectangle detection** — bounding box plus four corner points.
28
+ - **Horizon detection** — horizon angle in radians.
29
+ - **Raw pixel decode** — decode any JPEG/PNG/HEIC to base64 RGBA bytes.
30
+
31
+ ### Vision — modern requests
32
+
33
+ - **Image aesthetics score** — overall aesthetic score and a utility-image flag. _Requires iOS 18.0+ / macOS 15.0+._
34
+ - **Lens smudge detection** — confidence that the lens was smudged/dirty. _Requires iOS 26.0+ / macOS 26.0+._
35
+ - **Structured document recognition** — paragraphs, tables, lists, barcodes, and detected data (emails, phone numbers, URLs, addresses, etc.). _Requires iOS 26.0+ / macOS 26.0+._
36
+
37
+ ### Foundation Models — on-device LLM (iOS 26.0+)
38
+
39
+ - **Availability check** and **text generation** against Apple's on-device `SystemLanguageModel`, with an optional system prompt.
40
+
41
+ ### Speech — transcription (iOS 26.0+)
42
+
43
+ - **Audio transcription** of a local audio file via `SpeechAnalyzer` / `SpeechTranscriber`, with an optional BCP-47 locale.
44
+
45
+ ### Image Playground — image generation (iOS 18.4+)
46
+
47
+ - **Text-to-image generation** via `ImageCreator`, in `animation`, `illustration`, or `sketch` styles; returns a path to the generated JPEG.
48
+
49
+ ## Requirements
50
+
51
+ - **iOS deployment target: 15.1** (macOS 13.0). This is the floor enforced by the podspec; the module compiles and links against this baseline.
52
+ - **Availability-gated features.** The 15.1 floor only covers the classic Vision requests. Newer capabilities are gated at runtime:
53
+ - Aesthetics → iOS 18.0 / macOS 15.0
54
+ - Image generation (Image Playground) → iOS 18.4
55
+ - Foundation Models, Speech transcription, lens-smudge, document recognition → iOS 26.0 / macOS 26.0
56
+ - On older OS versions these calls resolve to `null` instead of throwing.
57
+ - **Custom dev client / prebuild required.** This is a native module — it does **not** run in Expo Go. You must use a [development build](https://docs.expo.dev/develop/development-builds/introduction/) (or a bare/prebuild workflow) and rebuild the native app after installing.
58
+ - **Platforms:** `apple` (`ios` + `macos`), per `expo-module.config.json`.
59
+
60
+ > Note: many features (Foundation Models, Image Playground, document recognition) also require Apple Intelligence-capable hardware and that the relevant on-device models have been downloaded. Always check the return value for `null`.
61
+
62
+ ## Installation
63
+
64
+ ```sh
65
+ npx expo install @insidepics/expo-apple-intelligence
66
+ ```
67
+
68
+ Then regenerate the native project and rebuild the dev client:
69
+
70
+ ```sh
71
+ npx expo prebuild
72
+ # build & run the dev client
73
+ npx expo run:ios
74
+ ```
75
+
76
+ If you manage the iOS project directly, run `npx pod-install` after installing.
77
+
78
+ ## Usage
79
+
80
+ ```ts
81
+ import ExpoAppleIntelligence from '@insidepics/expo-apple-intelligence';
82
+ import type {
83
+ ImageAnalysisResult,
84
+ TextObservation,
85
+ } from '@insidepics/expo-apple-intelligence';
86
+
87
+ // 1. Run every available analysis on an image in a single pass.
88
+ const result: ImageAnalysisResult = await ExpoAppleIntelligence.analyzeImage(
89
+ '/path/to/photo.jpg'
90
+ );
91
+ console.log(`${result.faces.length} faces, ${result.labels.length} labels`);
92
+ console.log('image size', result.imageWidth, result.imageHeight);
93
+
94
+ // 2. Or call a single Vision request directly.
95
+ const lines: TextObservation[] = await ExpoAppleIntelligence.recognizeText(
96
+ '/path/to/receipt.jpg'
97
+ );
98
+ for (const line of lines) {
99
+ console.log(line.candidates[0]?.string, '@', line.candidates[0]?.confidence);
100
+ }
101
+
102
+ // 3. On-device LLM (iOS 26+). Returns null when unavailable.
103
+ if (ExpoAppleIntelligence.isFoundationModelAvailable()) {
104
+ const reply = await ExpoAppleIntelligence.generateText(
105
+ 'Summarize this caption in five words.',
106
+ 'You are a concise assistant.' // optional system prompt
107
+ );
108
+ console.log(reply);
109
+ }
110
+
111
+ // 4. Text-to-image (iOS 18.4+). Returns a file path, or null when unavailable.
112
+ const imagePath = await ExpoAppleIntelligence.generateImage(
113
+ 'a fox reading a book',
114
+ 'illustration'
115
+ );
116
+ ```
117
+
118
+ Image and audio arguments accept either a plain filesystem path or a `file://` URL.
119
+
120
+ ## API reference
121
+
122
+ The default export is the native module. Every method takes an image (or audio) path string. Vision coordinates are normalized (0–1) with a bottom-left origin, exactly as Apple returns them; face landmark points are normalized to the face bounding box.
123
+
124
+ | Function | Signature | Description | Min OS / Framework |
125
+ | --- | --- | --- | --- |
126
+ | `analyzeImage` | `(imagePath: string) => Promise<ImageAnalysisResult>` | Runs all available Vision analyses in one pass (most efficient). Includes iOS 26 lens-smudge & document results when available. | iOS 15.1 (Vision); richer fields gated higher |
127
+ | `detectFaces` | `(imagePath: string) => Promise<FaceObservation[]>` | Face detection with landmarks, roll/yaw/pitch, and capture quality. | iOS 15.1 / Vision |
128
+ | `recognizeText` | `(imagePath: string) => Promise<TextObservation[]>` | Accurate-level OCR; up to 10 candidates per observation. | iOS 15.1 / Vision |
129
+ | `classifyImage` | `(imagePath: string) => Promise<ClassificationObservation[]>` | Full unfiltered image classification. | iOS 15.1 / Vision |
130
+ | `detectBarcodes` | `(imagePath: string) => Promise<BarcodeObservation[]>` | Barcode & QR detection with symbology, payload, corner points. | iOS 15.1 / Vision |
131
+ | `detectBodyPoses` | `(imagePath: string) => Promise<BodyPoseObservation[]>` | Human body pose detection (named joints). | iOS 15.1 / Vision |
132
+ | `detectHandPoses` | `(imagePath: string) => Promise<HandPoseObservation[]>` | Hand pose detection (up to 4 hands). | iOS 15.1 / Vision |
133
+ | `generateFeaturePrint` | `(imagePath: string) => Promise<FeaturePrintResult \| null>` | Image similarity feature-print vector. | iOS 15.1 / Vision |
134
+ | `detectSaliency` | `(imagePath: string) => Promise<SaliencyResult \| null>` | Attention-based and objectness-based salient regions. | iOS 15.1 / Vision |
135
+ | `detectAnimals` | `(imagePath: string) => Promise<AnimalObservation[]>` | Animal detection with all labels. | iOS 15.1 / Vision |
136
+ | `detectRectangles` | `(imagePath: string) => Promise<RectangleObservation[]>` | Rectangle detection with corner points (max 10). | iOS 15.1 / Vision |
137
+ | `detectHorizon` | `(imagePath: string) => Promise<HorizonResult \| null>` | Horizon angle in radians. | iOS 15.1 / Vision |
138
+ | `decodeImagePixels` | `(imagePath: string) => Promise<{ pixels: string; width: number; height: number }>` | Decode any image to base64-encoded RGBA bytes. | iOS 15.1 |
139
+ | `calculateAesthetics` | `(imagePath: string) => Promise<AestheticsResult \| null>` | Aesthetic quality score + utility-image flag. Returns `null` on older OS. | iOS 18.0 / macOS 15.0 — Vision |
140
+ | `generateImage` | `(prompt: string, style?: 'animation' \| 'illustration' \| 'sketch') => Promise<string \| null>` | Text-to-image; returns a path to the generated JPEG, or `null`. | iOS 18.4 / ImagePlayground |
141
+ | `detectLensSmudge` | `(imagePath: string) => Promise<LensSmudgeResult \| null>` | Lens smudge confidence. Returns `null` on older OS. | iOS 26.0 / macOS 26.0 — Vision |
142
+ | `recognizeDocument` | `(imagePath: string) => Promise<DocumentRecognitionResult \| null>` | Structured document recognition (paragraphs, tables, lists, barcodes, detected data). | iOS 26.0 / macOS 26.0 — Vision |
143
+ | `isFoundationModelAvailable` | `() => boolean` | Synchronous check for on-device Foundation Model availability. | iOS 26.0 / FoundationModels |
144
+ | `generateText` | `(prompt: string, systemPrompt?: string) => Promise<string \| null>` | On-device LLM text generation with an optional system prompt. | iOS 26.0 / FoundationModels |
145
+ | `transcribeAudio` | `(audioPath: string, locale?: string) => Promise<TranscriptionResult \| null>` | Transcribe a local audio file; optional BCP-47 locale. | iOS 26.0 / Speech (SpeechAnalyzer) |
146
+
147
+ All result types (`FaceObservation`, `TextObservation`, `ImageAnalysisResult`, `DocumentRecognitionResult`, etc.) are exported from the package entry point.
148
+
149
+ ## Capability / availability matrix
150
+
151
+ | Capability | Min iOS | Min macOS | Backing framework |
152
+ | --- | --- | --- | --- |
153
+ | Faces, text, classification, barcodes, body/hand pose, feature print, saliency, animals, rectangles, horizon, pixel decode | 15.1 | 13.0 | Vision |
154
+ | Image aesthetics score | 18.0 | 15.0 | Vision |
155
+ | Text-to-image generation | 18.4 | — | ImagePlayground |
156
+ | Foundation Models availability + text generation | 26.0 | — | FoundationModels |
157
+ | Speech transcription | 26.0 | — | Speech (SpeechAnalyzer / SpeechTranscriber) |
158
+ | Lens smudge detection | 26.0 | 26.0 | Vision |
159
+ | Structured document recognition | 26.0 | 26.0 | Vision |
160
+
161
+ ## Contributing
162
+
163
+ ```sh
164
+ git clone https://github.com/InsidePics/expo-apple-intelligence.git
165
+ cd expo-apple-intelligence
166
+
167
+ pnpm install # install dependencies
168
+ pnpm build # compile the TypeScript module
169
+
170
+ # run the example app (open the iOS project)
171
+ pnpm open:ios
172
+ ```
173
+
174
+ The native Swift sources live in `ios/` (`ExpoAppleIntelligenceModule.swift`, `VisionHelpers.swift`, `VisionModern.swift`, `VisionProcessors.swift`); the TypeScript surface lives in `src/`. Keep the `@available` gates in the Swift code and the documented minimum-OS values in this README in sync when adding capabilities.
175
+
176
+ ## License
177
+
178
+ MIT © 2026 INSP LLC. See [LICENSE](./LICENSE).
@@ -0,0 +1,177 @@
1
+ export type NormalizedRect = {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ height: number;
6
+ };
7
+ export type NormalizedPoint = {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ export type FaceLandmarkRegion = NormalizedPoint[];
12
+ export type FaceLandmarks = {
13
+ faceContour?: FaceLandmarkRegion;
14
+ leftEye?: FaceLandmarkRegion;
15
+ rightEye?: FaceLandmarkRegion;
16
+ leftEyebrow?: FaceLandmarkRegion;
17
+ rightEyebrow?: FaceLandmarkRegion;
18
+ nose?: FaceLandmarkRegion;
19
+ noseCrest?: FaceLandmarkRegion;
20
+ medianLine?: FaceLandmarkRegion;
21
+ outerLips?: FaceLandmarkRegion;
22
+ innerLips?: FaceLandmarkRegion;
23
+ leftPupil?: FaceLandmarkRegion;
24
+ rightPupil?: FaceLandmarkRegion;
25
+ };
26
+ export type FaceObservation = {
27
+ boundingBox: NormalizedRect;
28
+ confidence: number;
29
+ /** Roll angle in radians */
30
+ roll?: number;
31
+ /** Yaw angle in radians */
32
+ yaw?: number;
33
+ /** Pitch angle in radians */
34
+ pitch?: number;
35
+ /** Face capture quality 0-1 */
36
+ quality?: number;
37
+ /** Landmark regions — points are normalized to the face bounding box */
38
+ landmarks?: FaceLandmarks;
39
+ };
40
+ export type TextCandidate = {
41
+ string: string;
42
+ confidence: number;
43
+ };
44
+ export type TextObservation = {
45
+ boundingBox: NormalizedRect;
46
+ confidence: number;
47
+ /** Up to 10 candidates, ordered by confidence */
48
+ candidates: TextCandidate[];
49
+ };
50
+ export type ClassificationObservation = {
51
+ identifier: string;
52
+ confidence: number;
53
+ };
54
+ export type BarcodeObservation = {
55
+ boundingBox: NormalizedRect;
56
+ confidence: number;
57
+ symbology: string;
58
+ payloadStringValue?: string;
59
+ topLeft: NormalizedPoint;
60
+ topRight: NormalizedPoint;
61
+ bottomLeft: NormalizedPoint;
62
+ bottomRight: NormalizedPoint;
63
+ };
64
+ export type PoseJoint = {
65
+ name: string;
66
+ x: number;
67
+ y: number;
68
+ confidence: number;
69
+ };
70
+ export type BodyPoseObservation = {
71
+ joints: PoseJoint[];
72
+ };
73
+ export type HandPoseObservation = {
74
+ joints: PoseJoint[];
75
+ };
76
+ export type FeaturePrintResult = {
77
+ data: number[];
78
+ elementType: string;
79
+ elementCount: number;
80
+ };
81
+ export type AestheticsResult = {
82
+ overallScore: number;
83
+ isUtility: boolean;
84
+ };
85
+ export type SaliencyRegion = {
86
+ boundingBox: NormalizedRect;
87
+ confidence: number;
88
+ };
89
+ export type SaliencyResult = {
90
+ attentionRegions: SaliencyRegion[];
91
+ objectnessRegions: SaliencyRegion[];
92
+ };
93
+ export type AnimalObservation = {
94
+ boundingBox: NormalizedRect;
95
+ confidence: number;
96
+ labels: ClassificationObservation[];
97
+ };
98
+ export type RectangleObservation = {
99
+ boundingBox: NormalizedRect;
100
+ topLeft: NormalizedPoint;
101
+ topRight: NormalizedPoint;
102
+ bottomLeft: NormalizedPoint;
103
+ bottomRight: NormalizedPoint;
104
+ confidence: number;
105
+ };
106
+ export type HorizonResult = {
107
+ /** Angle in radians */
108
+ angle: number;
109
+ };
110
+ export type LensSmudgeResult = {
111
+ confidence: number;
112
+ };
113
+ export type DocumentParagraph = {
114
+ text: string;
115
+ boundingBox: NormalizedRect;
116
+ detectedData: DetectedDataItem[];
117
+ };
118
+ export type DocumentTableCell = {
119
+ text: string;
120
+ row: number;
121
+ column: number;
122
+ };
123
+ export type DocumentTable = {
124
+ cells: DocumentTableCell[];
125
+ boundingBox: NormalizedRect;
126
+ };
127
+ export type DetectedDataItem = {
128
+ type: 'phoneNumber' | 'postalAddress' | 'calendarEvent' | 'moneyAmount' | 'measurement' | 'url' | 'email' | 'unknown';
129
+ value: string;
130
+ boundingBox: NormalizedRect;
131
+ };
132
+ export type DocumentListItem = {
133
+ text: string;
134
+ marker: string;
135
+ };
136
+ export type DocumentList = {
137
+ items: DocumentListItem[];
138
+ boundingBox: NormalizedRect;
139
+ };
140
+ export type DocumentBarcode = {
141
+ value: string;
142
+ symbology: string;
143
+ boundingBox: NormalizedRect;
144
+ };
145
+ export type DocumentRecognitionResult = {
146
+ paragraphs: DocumentParagraph[];
147
+ tables: DocumentTable[];
148
+ lists: DocumentList[];
149
+ barcodes: DocumentBarcode[];
150
+ };
151
+ export type ImageAnalysisResult = {
152
+ faces: FaceObservation[];
153
+ text: TextObservation[];
154
+ labels: ClassificationObservation[];
155
+ barcodes: BarcodeObservation[];
156
+ bodyPoses: BodyPoseObservation[];
157
+ handPoses: HandPoseObservation[];
158
+ rectangles: RectangleObservation[];
159
+ animals: AnimalObservation[];
160
+ featurePrint: FeaturePrintResult | null;
161
+ aesthetics: AestheticsResult | null;
162
+ saliency: SaliencyResult;
163
+ horizon: HorizonResult | null;
164
+ lensSmudge: LensSmudgeResult | null;
165
+ document: DocumentRecognitionResult | null;
166
+ imageWidth: number;
167
+ imageHeight: number;
168
+ platform: 'ios' | 'macos';
169
+ };
170
+ export type TranscriptionSegment = {
171
+ text: string;
172
+ };
173
+ export type TranscriptionResult = {
174
+ segments: TranscriptionSegment[];
175
+ };
176
+ export type ExpoAppleIntelligenceModuleEvents = Record<string, never>;
177
+ //# sourceMappingURL=ExpoAppleIntelligence.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoAppleIntelligence.types.d.ts","sourceRoot":"","sources":["../src/ExpoAppleIntelligence.types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAIF,MAAM,MAAM,kBAAkB,GAAG,eAAe,EAAE,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,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0 +1,3 @@
1
+ // --- Geometry primitives (normalized 0-1, bottom-left origin) ---
2
+ export {};
3
+ //# sourceMappingURL=ExpoAppleIntelligence.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoAppleIntelligence.types.js","sourceRoot":"","sources":["../src/ExpoAppleIntelligence.types.ts"],"names":[],"mappings":"AAAA,mEAAmE","sourcesContent":["// --- Geometry primitives (normalized 0-1, bottom-left origin) ---\n\nexport type NormalizedRect = {\n x: number;\n y: number;\n width: number;\n height: number;\n};\n\nexport type NormalizedPoint = {\n x: number;\n y: number;\n};\n\n// --- Face detection ---\n\nexport type FaceLandmarkRegion = NormalizedPoint[];\n\nexport type FaceLandmarks = {\n faceContour?: FaceLandmarkRegion;\n leftEye?: FaceLandmarkRegion;\n rightEye?: FaceLandmarkRegion;\n leftEyebrow?: FaceLandmarkRegion;\n rightEyebrow?: FaceLandmarkRegion;\n nose?: FaceLandmarkRegion;\n noseCrest?: FaceLandmarkRegion;\n medianLine?: FaceLandmarkRegion;\n outerLips?: FaceLandmarkRegion;\n innerLips?: FaceLandmarkRegion;\n leftPupil?: FaceLandmarkRegion;\n rightPupil?: FaceLandmarkRegion;\n};\n\nexport type FaceObservation = {\n boundingBox: NormalizedRect;\n confidence: number;\n /** Roll angle in radians */\n roll?: number;\n /** Yaw angle in radians */\n yaw?: number;\n /** Pitch angle in radians */\n pitch?: number;\n /** Face capture quality 0-1 */\n quality?: number;\n /** Landmark regions — points are normalized to the face bounding box */\n landmarks?: FaceLandmarks;\n};\n\n// --- OCR / Text recognition ---\n\nexport type TextCandidate = {\n string: string;\n confidence: number;\n};\n\nexport type TextObservation = {\n boundingBox: NormalizedRect;\n confidence: number;\n /** Up to 10 candidates, ordered by confidence */\n candidates: TextCandidate[];\n};\n\n// --- Image classification ---\n\nexport type ClassificationObservation = {\n identifier: string;\n confidence: number;\n};\n\n// --- Barcode detection ---\n\nexport type BarcodeObservation = {\n boundingBox: NormalizedRect;\n confidence: number;\n symbology: string;\n payloadStringValue?: string;\n topLeft: NormalizedPoint;\n topRight: NormalizedPoint;\n bottomLeft: NormalizedPoint;\n bottomRight: NormalizedPoint;\n};\n\n// --- Body pose detection ---\n\nexport type PoseJoint = {\n name: string;\n x: number;\n y: number;\n confidence: number;\n};\n\nexport type BodyPoseObservation = {\n joints: PoseJoint[];\n};\n\n// --- Hand pose detection ---\n\nexport type HandPoseObservation = {\n joints: PoseJoint[];\n};\n\n// --- Image feature print ---\n\nexport type FeaturePrintResult = {\n data: number[];\n elementType: string;\n elementCount: number;\n};\n\n// --- Aesthetics score (iOS 18+) ---\n\nexport type AestheticsResult = {\n overallScore: number;\n isUtility: boolean;\n};\n\n// --- Saliency ---\n\nexport type SaliencyRegion = {\n boundingBox: NormalizedRect;\n confidence: number;\n};\n\nexport type SaliencyResult = {\n attentionRegions: SaliencyRegion[];\n objectnessRegions: SaliencyRegion[];\n};\n\n// --- Animal detection ---\n\nexport type AnimalObservation = {\n boundingBox: NormalizedRect;\n confidence: number;\n labels: ClassificationObservation[];\n};\n\n// --- Rectangle detection ---\n\nexport type RectangleObservation = {\n boundingBox: NormalizedRect;\n topLeft: NormalizedPoint;\n topRight: NormalizedPoint;\n bottomLeft: NormalizedPoint;\n bottomRight: NormalizedPoint;\n confidence: number;\n};\n\n// --- Horizon detection ---\n\nexport type HorizonResult = {\n /** Angle in radians */\n angle: number;\n};\n\n// --- Lens smudge detection (iOS 26+) ---\n\nexport type LensSmudgeResult = {\n confidence: number;\n};\n\n// --- Document recognition (iOS 26+) ---\n\nexport type DocumentParagraph = {\n text: string;\n boundingBox: NormalizedRect;\n detectedData: DetectedDataItem[];\n};\n\nexport type DocumentTableCell = {\n text: string;\n row: number;\n column: number;\n};\n\nexport type DocumentTable = {\n cells: DocumentTableCell[];\n boundingBox: NormalizedRect;\n};\n\nexport type DetectedDataItem = {\n type:\n | 'phoneNumber'\n | 'postalAddress'\n | 'calendarEvent'\n | 'moneyAmount'\n | 'measurement'\n | 'url'\n | 'email'\n | 'unknown';\n value: string;\n boundingBox: NormalizedRect;\n};\n\nexport type DocumentListItem = {\n text: string;\n marker: string;\n};\n\nexport type DocumentList = {\n items: DocumentListItem[];\n boundingBox: NormalizedRect;\n};\n\nexport type DocumentBarcode = {\n value: string;\n symbology: string;\n boundingBox: NormalizedRect;\n};\n\nexport type DocumentRecognitionResult = {\n paragraphs: DocumentParagraph[];\n tables: DocumentTable[];\n lists: DocumentList[];\n barcodes: DocumentBarcode[];\n};\n\n// --- Comprehensive analysis result ---\n\nexport type ImageAnalysisResult = {\n faces: FaceObservation[];\n text: TextObservation[];\n labels: ClassificationObservation[];\n barcodes: BarcodeObservation[];\n bodyPoses: BodyPoseObservation[];\n handPoses: HandPoseObservation[];\n rectangles: RectangleObservation[];\n animals: AnimalObservation[];\n featurePrint: FeaturePrintResult | null;\n aesthetics: AestheticsResult | null;\n saliency: SaliencyResult;\n horizon: HorizonResult | null;\n lensSmudge: LensSmudgeResult | null;\n document: DocumentRecognitionResult | null;\n imageWidth: number;\n imageHeight: number;\n platform: 'ios' | 'macos';\n};\n\n// --- Speech transcription (iOS 26+) ---\n\nexport type TranscriptionSegment = {\n text: string;\n};\n\nexport type TranscriptionResult = {\n segments: TranscriptionSegment[];\n};\n\nexport type ExpoAppleIntelligenceModuleEvents = Record<string, never>;\n"]}
@@ -0,0 +1,51 @@
1
+ import { NativeModule } from 'expo';
2
+ import type { ExpoAppleIntelligenceModuleEvents, ImageAnalysisResult, FaceObservation, TextObservation, ClassificationObservation, BarcodeObservation, BodyPoseObservation, HandPoseObservation, AnimalObservation, RectangleObservation, FeaturePrintResult, AestheticsResult, SaliencyResult, HorizonResult, LensSmudgeResult, DocumentRecognitionResult, TranscriptionResult } from './ExpoAppleIntelligence.types';
3
+ declare class ExpoAppleIntelligenceModule extends NativeModule<ExpoAppleIntelligenceModuleEvents> {
4
+ /** Run all available analyses in a single pass (most efficient) */
5
+ analyzeImage(imagePath: string): Promise<ImageAnalysisResult>;
6
+ /** Face detection with landmarks, quality, angles */
7
+ detectFaces(imagePath: string): Promise<FaceObservation[]>;
8
+ /** OCR text recognition — array of observations with candidates */
9
+ recognizeText(imagePath: string): Promise<TextObservation[]>;
10
+ /** Image classification — all observations, unfiltered */
11
+ classifyImage(imagePath: string): Promise<ClassificationObservation[]>;
12
+ /** Barcode and QR code detection */
13
+ detectBarcodes(imagePath: string): Promise<BarcodeObservation[]>;
14
+ /** Human body pose detection */
15
+ detectBodyPoses(imagePath: string): Promise<BodyPoseObservation[]>;
16
+ /** Hand pose detection */
17
+ detectHandPoses(imagePath: string): Promise<HandPoseObservation[]>;
18
+ /** Image similarity vector */
19
+ generateFeaturePrint(imagePath: string): Promise<FeaturePrintResult | null>;
20
+ /** Aesthetic quality score (iOS 18+/macOS 15+ only, returns null otherwise) */
21
+ calculateAesthetics(imagePath: string): Promise<AestheticsResult | null>;
22
+ /** Salient regions */
23
+ detectSaliency(imagePath: string): Promise<SaliencyResult | null>;
24
+ /** Animal detection with all labels */
25
+ detectAnimals(imagePath: string): Promise<AnimalObservation[]>;
26
+ /** Rectangle detection with corner points */
27
+ detectRectangles(imagePath: string): Promise<RectangleObservation[]>;
28
+ /** Horizon angle in radians */
29
+ detectHorizon(imagePath: string): Promise<HorizonResult | null>;
30
+ /** Lens smudge detection (iOS 26+/macOS 26+ only, returns null otherwise) */
31
+ detectLensSmudge(imagePath: string): Promise<LensSmudgeResult | null>;
32
+ /** Structured document recognition (iOS 26+/macOS 26+ only, returns null otherwise) */
33
+ recognizeDocument(imagePath: string): Promise<DocumentRecognitionResult | null>;
34
+ /** Check if on-device Foundation Model is available (iOS 26+) */
35
+ isFoundationModelAvailable(): boolean;
36
+ /** Generate text using on-device Foundation Model (iOS 26+ only) */
37
+ generateText(prompt: string, systemPrompt?: string): Promise<string | null>;
38
+ /** Transcribe audio file to text (iOS 26+ only) */
39
+ transcribeAudio(audioPath: string, locale?: string): Promise<TranscriptionResult | null>;
40
+ /** Generate image from text prompt using ImagePlayground (iOS 18.4+ only) */
41
+ generateImage(prompt: string, style?: 'animation' | 'illustration' | 'sketch'): Promise<string | null>;
42
+ /** Decode any image (JPEG, PNG, HEIC, etc.) to raw RGBA pixels */
43
+ decodeImagePixels(imagePath: string): Promise<{
44
+ pixels: string;
45
+ width: number;
46
+ height: number;
47
+ }>;
48
+ }
49
+ declare const _default: ExpoAppleIntelligenceModule;
50
+ export default _default;
51
+ //# sourceMappingURL=ExpoAppleIntelligenceModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoAppleIntelligenceModule.d.ts","sourceRoot":"","sources":["../src/ExpoAppleIntelligenceModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AAEzD,OAAO,KAAK,EACV,iCAAiC,EACjC,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,OAAO,2BAA4B,SAAQ,YAAY,CAAC,iCAAiC,CAAC;IAC/F,mEAAmE;IACnE,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAE7D,qDAAqD;IACrD,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAE1D,mEAAmE;IACnE,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAE5D,0DAA0D;IAC1D,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC;IAEtE,oCAAoC;IACpC,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAEh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AEtC,6EAA6E;IAC7E,aAAa,CACX,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,WAAW,GAAG,cAAc,GAAG,QAAQ,GAC9C,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAEzB,kEAAkE;IAClE,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAC5C,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;;AAED,wBAEE"}
@@ -0,0 +1,3 @@
1
+ import { requireNativeModule } from 'expo';
2
+ export default requireNativeModule('ExpoAppleIntelligence');
3
+ //# sourceMappingURL=ExpoAppleIntelligenceModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoAppleIntelligenceModule.js","sourceRoot":"","sources":["../src/ExpoAppleIntelligenceModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAgGzD,eAAe,mBAAmB,CAChC,uBAAuB,CACxB,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo';\n\nimport type {\n ExpoAppleIntelligenceModuleEvents,\n ImageAnalysisResult,\n FaceObservation,\n TextObservation,\n ClassificationObservation,\n BarcodeObservation,\n BodyPoseObservation,\n HandPoseObservation,\n AnimalObservation,\n RectangleObservation,\n FeaturePrintResult,\n AestheticsResult,\n SaliencyResult,\n HorizonResult,\n LensSmudgeResult,\n DocumentRecognitionResult,\n TranscriptionResult,\n} from './ExpoAppleIntelligence.types';\n\ndeclare class ExpoAppleIntelligenceModule extends NativeModule<ExpoAppleIntelligenceModuleEvents> {\n /** Run all available analyses in a single pass (most efficient) */\n analyzeImage(imagePath: string): Promise<ImageAnalysisResult>;\n\n /** Face detection with landmarks, quality, angles */\n detectFaces(imagePath: string): Promise<FaceObservation[]>;\n\n /** OCR text recognition — array of observations with candidates */\n recognizeText(imagePath: string): Promise<TextObservation[]>;\n\n /** Image classification — all observations, unfiltered */\n classifyImage(imagePath: string): Promise<ClassificationObservation[]>;\n\n /** Barcode and QR code detection */\n detectBarcodes(imagePath: string): Promise<BarcodeObservation[]>;\n\n /** Human body pose detection */\n detectBodyPoses(imagePath: string): Promise<BodyPoseObservation[]>;\n\n /** Hand pose detection */\n detectHandPoses(imagePath: string): Promise<HandPoseObservation[]>;\n\n /** Image similarity vector */\n generateFeaturePrint(imagePath: string): Promise<FeaturePrintResult | null>;\n\n /** Aesthetic quality score (iOS 18+/macOS 15+ only, returns null otherwise) */\n calculateAesthetics(imagePath: string): Promise<AestheticsResult | null>;\n\n /** Salient regions */\n detectSaliency(imagePath: string): Promise<SaliencyResult | null>;\n\n /** Animal detection with all labels */\n detectAnimals(imagePath: string): Promise<AnimalObservation[]>;\n\n /** Rectangle detection with corner points */\n detectRectangles(imagePath: string): Promise<RectangleObservation[]>;\n\n /** Horizon angle in radians */\n detectHorizon(imagePath: string): Promise<HorizonResult | null>;\n\n /** Lens smudge detection (iOS 26+/macOS 26+ only, returns null otherwise) */\n detectLensSmudge(imagePath: string): Promise<LensSmudgeResult | null>;\n\n /** Structured document recognition (iOS 26+/macOS 26+ only, returns null otherwise) */\n recognizeDocument(\n imagePath: string\n ): Promise<DocumentRecognitionResult | null>;\n\n /** Check if on-device Foundation Model is available (iOS 26+) */\n isFoundationModelAvailable(): boolean;\n\n /** Generate text using on-device Foundation Model (iOS 26+ only) */\n generateText(prompt: string, systemPrompt?: string): Promise<string | null>;\n\n /** Transcribe audio file to text (iOS 26+ only) */\n transcribeAudio(\n audioPath: string,\n locale?: string\n ): Promise<TranscriptionResult | null>;\n\n /** Generate image from text prompt using ImagePlayground (iOS 18.4+ only) */\n generateImage(\n prompt: string,\n style?: 'animation' | 'illustration' | 'sketch'\n ): Promise<string | null>;\n\n /** Decode any image (JPEG, PNG, HEIC, etc.) to raw RGBA pixels */\n decodeImagePixels(imagePath: string): Promise<{\n pixels: string; // base64-encoded RGBA bytes\n width: number;\n height: number;\n }>;\n}\n\nexport default requireNativeModule<ExpoAppleIntelligenceModule>(\n 'ExpoAppleIntelligence'\n);\n"]}
@@ -0,0 +1,3 @@
1
+ export { default } from './ExpoAppleIntelligenceModule';
2
+ export * from './ExpoAppleIntelligence.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,cAAc,+BAA+B,CAAC"}
package/build/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { default } from './ExpoAppleIntelligenceModule';
2
+ export * from './ExpoAppleIntelligence.types';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,cAAc,+BAA+B,CAAC","sourcesContent":["export { default } from './ExpoAppleIntelligenceModule';\nexport * from './ExpoAppleIntelligence.types';\n"]}
@@ -0,0 +1,6 @@
1
+ {
2
+ "platforms": ["apple", "ios", "macos"],
3
+ "apple": {
4
+ "modules": ["ExpoAppleIntelligenceModule"]
5
+ }
6
+ }
@@ -0,0 +1,38 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = 'ExpoAppleIntelligence'
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.description = package['description']
10
+ s.license = package['license']
11
+ s.author = package['author']
12
+ s.homepage = package['homepage']
13
+ s.platforms = {
14
+ :ios => '15.1',
15
+ :osx => '13.0'
16
+ }
17
+ s.swift_version = '5.9'
18
+ s.source = { :git => 'https://github.com/InsidePics/expo-apple-intelligence.git', :tag => "#{s.version}" }
19
+ s.static_framework = true
20
+
21
+ s.dependency 'ExpoModulesCore'
22
+
23
+ s.frameworks = 'Vision'
24
+ s.weak_frameworks = 'FoundationModels', 'Speech', 'AVFAudio', 'ImagePlayground'
25
+
26
+ s.pod_target_xcconfig = {
27
+ 'DEFINES_MODULE' => 'YES',
28
+ }
29
+
30
+ s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}"
31
+ s.exclude_files = "Tests/**"
32
+
33
+ s.test_spec 'ExpoAppleIntelligenceTests' do |test_spec|
34
+ test_spec.source_files = 'Tests/**/*.swift'
35
+ test_spec.resources = 'Tests/Fixtures/*'
36
+ test_spec.frameworks = 'XCTest'
37
+ end
38
+ end