Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changeset/expo-58-upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@infinitered/react-native-mlkit-core": major
"@infinitered/react-native-mlkit-document-scanner": major
"@infinitered/react-native-mlkit-face-detection": major
"@infinitered/react-native-mlkit-image-labeling": major
"@infinitered/react-native-mlkit-object-detection": major
"@infinitered/react-native-mlkit-text-recognition": major
---

Upgrade to Expo SDK 58 (React Native 0.88, React 19.3).

BREAKING CHANGE: The modules now target the Expo SDK 58 native toolchain
(`expo-modules-core` ~58). Consuming apps must be on Expo SDK 58. The iOS
deployment target (16.4) is unchanged; Android `compileSdk` is raised from 36 to
37 (required by RN 0.88 and the SDK 58 Expo libraries).

No public JavaScript/TypeScript API changes — this is a native toolchain and
peer-dependency bump.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
# diverged from origin/main.
fetch-depth: 0

- name: Setup Node.js 20.x
- name: Setup Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

- name: Install Dependencies
run: yarn install --immutable
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 20.x
- name: Setup Node.js 22.x
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 22.x

- name: Install Dependencies
run: yarn install --immutable
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 20.19.5
nodejs 22.14.0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/exit-npm-0.1.2-ef3761a67d-abc407f07a.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ob1-npm-0.84.4-8bf3112c2f-15621cfa2d.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Here are some previews in action:

## Quickstart: Running the example app

### Prerequisites

- Node.js 22.13 or newer (the version we use is pinned in `.tool-versions`)
- Yarn, via [Corepack](https://nodejs.org/api/corepack.html) (`corepack enable`) — the repo pins Yarn 3
- Xcode (iOS) and/or Android Studio (Android) for native builds

### 1. Clone the project

```bash
Expand Down Expand Up @@ -117,6 +123,10 @@ Running `yarn build` inside of an expo module workspace will start watch mode fo
| ^53.0.0 | ^4.0.0 |
| ^54.0.0 | ^5.0.0 |
| ^56.0.0 | ^6.0.0 |
| ^58.0.0 | ^7.0.0 |

The current release (`^7.0.0`) requires Expo SDK 58 (React Native 0.88). On iOS the minimum deployment target is
16.4; on Android, `minSdkVersion` is 24 and `compileSdkVersion` is 37.

### React Native Firebase

Expand Down
4 changes: 2 additions & 2 deletions apps/ExampleApp/.eas/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ that give us **native build coverage** on pull requests.

## Why this exists

Our existing CI (CircleCI `test_and_build`) only does:
Our existing CI (GitHub Actions, `.github/workflows/ci.yml`) only does:

- `yarn lint`
- `yarn ci:lint`
- `yarn ci:build` — which at the module level is just `tsc` (TypeScript only)
- `yarn test` — Jest

Expand Down
4 changes: 2 additions & 2 deletions apps/ExampleApp/.eas/workflows/build-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Build ExampleApp on PRs

# Native build validation for pull requests.
#
# CircleCI already lints, type-checks (`yarn ci:build` == `tsc`) and runs Jest,
# GitHub Actions (ci.yml) already lints, type-checks (`yarn ci:build` == `tsc`) and runs Jest,
# but it never compiles any native code. Every module under `modules/*` ships
# real native sources (Swift podspecs + Android Gradle/Kotlin), and none of it
# is compiled in CircleCI. This workflow closes that gap by building the
# is compiled there. This workflow closes that gap by building the
# ExampleApp on EAS for both platforms: because the app depends on every module,
# a successful build transitively proves the native code for all of them
# compiles.
Expand Down
3 changes: 1 addition & 2 deletions apps/ExampleApp/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"updates": {
"fallbackToCacheTimeout": 0
},
"jsEngine": "hermes",
"assetBundlePatterns": [
"**/*"
],
Expand Down Expand Up @@ -56,7 +55,7 @@
"deploymentTarget": "16.4"
},
"android": {
"compileSdkVersion": 36
"compileSdkVersion": 37
}
}
],
Expand Down
3 changes: 2 additions & 1 deletion apps/ExampleApp/app/components/Screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
LayoutChangeEvent,
Platform,
ScrollView,
ScrollViewInstance,
ScrollViewProps,
StyleProp,
View,
Expand Down Expand Up @@ -155,7 +156,7 @@ function ScreenWithScrolling(props: ScreenProps) {
style,
} = props as ScrollScreenProps

const ref = useRef<ScrollView | null>(null)
const ref = useRef<ScrollViewInstance | null>(null)

const { scrollEnabled, onContentSizeChange, onLayout } = useAutoPreset(props as AutoScreenProps)

Expand Down
8 changes: 6 additions & 2 deletions apps/ExampleApp/app/components/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ComponentType, forwardRef, Ref, useImperativeHandle, useRef } from "rea
import {
StyleProp,
TextInput,
TextInputInstance,
TextInputProps,
TextStyle,
TouchableOpacity,
Expand Down Expand Up @@ -102,7 +103,10 @@ export interface TextFieldProps extends Omit<TextInputProps, "ref"> {
*
* - [Documentation and Examples](https://github.com/infinitered/ignite/blob/master/docs/Components-TextField.md)
*/
export const TextField = forwardRef(function TextField(props: TextFieldProps, ref: Ref<TextInput>) {
export const TextField = forwardRef(function TextField(
props: TextFieldProps,
ref: Ref<TextInputInstance>,
) {
const {
labelTx,
label,
Expand All @@ -123,7 +127,7 @@ export const TextField = forwardRef(function TextField(props: TextFieldProps, re
inputWrapperStyle: $inputWrapperStyleOverride,
...TextInputProps
} = props
const input = useRef<TextInput | null>(null)
const input = useRef<TextInputInstance | null>(null)

const disabled = TextInputProps.editable === false || status === "disabled"

Expand Down
68 changes: 34 additions & 34 deletions apps/ExampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@expo-google-fonts/space-grotesk": "^0.2.2",
"@expo/metro-runtime": "~56.0.13",
"@expo/metro-runtime": "~58.0.15",
"@infinitered/react-native-mlkit-document-scanner": "workspace:^6.0.0",
"@infinitered/react-native-mlkit-face-detection": "workspace:^6.0.0",
"@infinitered/react-native-mlkit-image-labeling": "workspace:^6.0.0",
Expand All @@ -42,36 +42,36 @@
"@react-native-async-storage/async-storage": "2.2.0",
"@react-navigation/native": "^6.0.8",
"@react-navigation/native-stack": "^6.0.2",
"@shopify/flash-list": "2.0.2",
"@shopify/flash-list": "2.3.2",
"date-fns": "^2.30.0",
"expo": "^56.0.8",
"expo-asset": "~56.0.15",
"expo-build-properties": "~56.0.16",
"expo-dev-client": "~56.0.18",
"expo-font": "~56.0.5",
"expo-image": "~56.0.9",
"expo-image-picker": "~56.0.15",
"expo-linking": "~56.0.13",
"expo-localization": "~56.0.6",
"expo-splash-screen": "~56.0.10",
"expo-status-bar": "~56.0.4",
"expo": "^58.0.21",
"expo-asset": "~58.0.19",
"expo-build-properties": "~58.0.11",
"expo-dev-client": "~58.0.17",
"expo-font": "~58.0.11",
"expo-image": "~58.0.18",
"expo-image-picker": "~58.0.10",
"expo-linking": "~58.0.15",
"expo-localization": "~58.0.5",
"expo-splash-screen": "~58.0.12",
"expo-status-bar": "~58.0.4",
"i18n-js": "3.9.2",
"mobx": "6.10.2",
"mobx-react-lite": "4.0.5",
"mobx-state-tree": "5.3.0",
"react": "19.2.3",
"react-dom": "19.2.3",
"react-native": "0.85.3",
"react": "19.3.0",
"react-dom": "19.3.0",
"react-native": "0.88.1",
"react-native-device-info": "^14.0.4",
"react-native-gesture-handler": "~2.31.1",
"react-native-reanimated": "~4.3.1",
"react-native-safe-area-context": "~5.7.0",
"react-native-screens": "~4.25.2",
"react-native-web": "^0.21.0",
"react-native-worklets": "0.8.3"
"react-native-gesture-handler": "~3.3.0",
"react-native-reanimated": "4.7.1",
"react-native-safe-area-context": "~5.10.1",
"react-native-screens": "~4.30.0",
"react-native-web": "~0.21.4",
"react-native-worklets": "0.13.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/core": "^7.29.7",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
Expand All @@ -84,15 +84,15 @@
"@react-native-community/cli": "^20.0.0",
"@react-native-community/cli-platform-android": "^20.0.0",
"@react-native-community/cli-platform-ios": "^20.0.0",
"@react-native/metro-config": "0.85.3",
"@react-native/metro-config": "0.88.1",
"@rnx-kit/align-deps": "^3.0.3",
"@types/i18n-js": "3.8.2",
"@types/jest": "29.5.14",
"@types/react": "~19.2.16",
"@types/react-test-renderer": "19.0.0",
"@types/jest": "30.0.0",
"@types/react": "~19.3.0",
"@types/react-test-renderer": "19.3.0",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"babel-jest": "^29.2.1",
"babel-jest": "~30.5.2",
"eslint": "8.17.0",
"eslint-config-prettier": "8.5.0",
"eslint-config-standard": "17.0.0",
Expand All @@ -103,21 +103,21 @@
"eslint-plugin-react-native": "4.0.0",
"eslint-plugin-reactotron": "^0.1.2",
"expo-atlas": "^0.3.0",
"jest": "^29.2.1",
"jest-expo": "~56.0.4",
"jest": "~30.5.2",
"jest-expo": "~58.0.13",
"patch-package": "6.4.7",
"postinstall-prepare": "1.0.1",
"prettier": "2.8.8",
"react-test-renderer": "19.2.3",
"react-test-renderer": "19.3.0",
"reactotron-core-client": "latest",
"reactotron-mst": "^3.1.7",
"reactotron-react-native": "latest",
"ts-jest": "^29.1.1",
"ts-jest": "^29.4.0",
"ts-node": "^10.9.2",
"typescript": "~5.9.2"
"typescript": "~6.0.3"
},
"engines": {
"node": ">=18"
"node": ">=22.13"
},
"prettier": {
"printWidth": 100,
Expand Down
6 changes: 5 additions & 1 deletion apps/ExampleApp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"compilerOptions": {
"baseUrl": ".",
// Metro resolves imports like a bundler; Node16 rejects ESM-only type packages (e.g. reanimated 4.7)
"module": "preserve",
"moduleResolution": "bundler",
// TS 6 no longer auto-includes every @types package; test/ uses Node APIs
"types": ["jest", "node"],
"paths": {
"app/*": [
"./app/*"
Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/adding-a-new-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ the files required. See the Expo Modules API documentation for more information.

## 2. Add the module to the example app

Add your module as a dependency to the example app in `apps/InfinteRedAI`, run `yarn install` in the example app, and
then run `yarn prebuild` to generate the native code.
Add your module as a dependency to the example app in `apps/ExampleApp`, run `yarn install`, and then run
`npx expo prebuild` in `apps/ExampleApp` to generate the native code.

## 3. Add the module to the documentation

Expand Down
8 changes: 4 additions & 4 deletions docs/contributing/editing-native-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ autocompletion, and linting.

## iOS

1. If you haven't already, run the `prebuild` script to create the ios example app
1. If you haven't already, run `expo prebuild` to create the ios example app
```shell
cd apps/ExampleApp
yarn prebuild
npx expo prebuild
```
2. Open Xcode and open the `./apps/ExampleApp/ios` directory.
3. In the project navigator, find the module you want to edit. It will be
Expand All @@ -27,10 +27,10 @@ autocompletion, and linting.

## Android

1. If you haven't already, run the `prebuild` script to create the android example app
1. If you haven't already, run `expo prebuild` to create the android example app
```shell
cd apps/ExampleApp
yarn prebuild
npx expo prebuild
```
2. Open Android Studio and open the `./apps/ExampleApp/android` directory.
3. In the project navigator, find the module you want to edit.
Expand Down
18 changes: 18 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ the following pages:
- [Document Scanner](./document-scanner)
- [Text Recognition](./text-recognition/)

## Compatibility

Each major version of RN MLKit targets a specific Expo SDK. Install the version that matches your app's Expo SDK:

| Expo SDK | RN MLKit |
| -------- | -------- |
| ^49.0.0 | &lt;= 0.7.7 |
| ^50.0.0 | ^1.0.0 |
| ^51.0.0 | ^2.0.0 |
| ^52.0.0 | ^3.0.0 |
| ^53.0.0 | ^4.0.0 |
| ^54.0.0 | ^5.0.0 |
| ^56.0.0 | ^6.0.0 |
| ^58.0.0 | ^7.0.0 |

The current release (`^7.0.0`) requires Expo SDK 58 (React Native 0.88). On iOS the minimum deployment target is
16.4; on Android, `minSdkVersion` is 24 and `compileSdkVersion` is 37.

## FAQ

### Why is each module a separate package?
Expand Down
12 changes: 8 additions & 4 deletions docs/running-the-example-app/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ An example app is provided that demonstrates the correct use of the modules in a
MLKit is not supported in the Android emulator. You will need to use a hardware device.
:::

## Prerequisites

- Node.js 22.13 or newer (the version we use is pinned in `.tool-versions`)
- Yarn, via [Corepack](https://nodejs.org/api/corepack.html) (`corepack enable`) — the repo pins Yarn 3
- Xcode (iOS) and/or Android Studio (Android) for native builds

## 1. Clone the project

```bash
Expand All @@ -30,11 +36,9 @@ yarn install
yarn build
```

##

## 5. Build and run the app
## 4. Build and run the app

From `~app/ExampleApp` use the included script to run the app in the android emulator.
From `apps/ExampleApp` use the included script to run the app in the android emulator.

```bash
yarn android
Expand Down
Loading
Loading