SMB client for React Native via libsmb2 and Nitro Modules.
- SMBv2/v3
SmbTaskper operation —result(),subscribe(),cancel()- 4-slot connection pool, interactive-priority slot 0
- 8-chunk pipelining per connection
SmbError/SmbTaskError, React hooks
| React Native | >= 0.76 |
| React | >= 19 |
| react-native-nitro-modules | >= 0.22, < 1.0 |
| iOS | 12+ |
| Android | not yet |
npm install @cetapod/react-native-smb react-native-nitro-modules
cd ios && pod installimport { SMB, type SmbCredentials } from '@cetapod/react-native-smb';
const smb = SMB();
const creds: SmbCredentials = { username: 'user', password: 'pass' };
await smb.connect('smb://192.168.1.100/Media', creds).result();
const entries = await smb.listDirectory('/', false).result();
const task = smb.downloadFile('/video.mp4', '/local/video.mp4');
task.subscribe((snap) => console.log(snap.progress));
await task.result();URL: smb://[<domain;][<user>@]<host>[:<port>]/<share>/<path>
| Task model | Subscribe, fire-and-forget, transfer tray, errors |
| API reference | Methods, types, hooks, utilities |
| Connection pool | Slots, chunk pipeline, multichannel |
| Example app | Running the Expo demo |
npm run exampleSee example/README.md.
LGPL-2.1 — same family as libsmb2. See LICENSE.