[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73665":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":32,"discoverSource":33},73665,"sdk-for-react-native","appwrite\u002Fsdk-for-react-native","appwrite","[READ ONLY] Official Appwrite React Native SDK 💙 ⚛︎","https:\u002F\u002Fappwrite.io",null,"TypeScript",4276,35,10,2,0,1,3,59.27,"BSD 3-Clause \"New\" or \"Revised\" License",false,"main",true,[7,25,26,27,28],"baas","javascript","react-native","typescript","2026-06-12 04:01:10","# Appwrite React Native SDK\n\n![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fappwrite\u002Fsdk-for-react-native.svg?style=flat-square)\n![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fapi%20version-1.9.2-blue.svg?style=flat-square)\n[![Build Status](https:\u002F\u002Fimg.shields.io\u002Ftravis\u002Fcom\u002Fappwrite\u002Fsdk-generator?style=flat-square)](https:\u002F\u002Ftravis-ci.com\u002Fappwrite\u002Fsdk-generator)\n[![Twitter Account](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Fappwrite?color=00acee&label=twitter&style=flat-square)](https:\u002F\u002Ftwitter.com\u002Fappwrite)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F564160730845151244?label=discord&style=flat-square)](https:\u002F\u002Fappwrite.io\u002Fdiscord)\n\n**This SDK is compatible with Appwrite server version 1.9.x. For older versions, please check [previous releases](https:\u002F\u002Fgithub.com\u002Fappwrite\u002Fsdk-for-react-native\u002Freleases).**\n\nAppwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the React Native SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https:\u002F\u002Fappwrite.io\u002Fdocs](https:\u002F\u002Fappwrite.io\u002Fdocs)\n\n![Appwrite](https:\u002F\u002Fgithub.com\u002Fappwrite\u002Fappwrite\u002Fraw\u002Fmain\u002Fpublic\u002Fimages\u002Fgithub.png)\n\n## Installation\n\nTo install\n\n```bash\nnpx expo install react-native-appwrite react-native-url-polyfill\n```\n\n\n## Getting Started\n\n### Add your Platform\n\nIf this is your first time using Appwrite, create an account and create your first project.\n\nThen, under **Add a platform**, add a **Android app** or a **Apple app**. You can skip optional steps.\n\n#### iOS steps\n\nAdd your app **name** and **Bundle ID**. You can find your **Bundle Identifier** in the **General** tab for your app's primary target in XCode. For Expo projects you can set or find it on **app.json** file at your project's root directory.\n\n#### Android steps\nAdd your app's **name** and **package name**, Your package name is generally the **applicationId** in your app-level **build.gradle** file. For Expo projects you can set or find it on **app.json** file at your project's root directory.\n\n## Setup\n\nOn `index.js` add import for `react-native-url-polyfill`\n\n```\nimport 'react-native-url-polyfill\u002Fauto'\n```\n\n> If you are building for iOS, don't forget to install pods\n> `cd ios && pod install && cd ..`\n\n### Init your SDK\n\nInitialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page.\n\n```js\nimport { Client } from 'react-native-appwrite';\n\u002F\u002F Init your React Native SDK\nconst client = new Client();\n\nclient\n    .setEndpoint('http:\u002F\u002Flocalhost\u002Fv1') \u002F\u002F Your Appwrite Endpoint\n    .setProject('455x34dfkj') \u002F\u002F Your project ID\n    .setPlatform('com.example.myappwriteapp') \u002F\u002F Your application ID or bundle ID.\n;\n```\n\n### Make Your First Request\n\nOnce your SDK object is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https:\u002F\u002Fappwrite.io\u002Fdocs) section.\n\n```js\nconst account = new Account(client);\n\n\u002F\u002F Register User\naccount.create(ID.unique(), 'me@example.com', 'password', 'Jane Doe')\n    .then(function (response) {\n        console.log(response);\n    }, function (error) {\n        console.log(error);\n    });\n\n```\n\n### Full Example\n\n```js\nimport { Client, Account } from 'react-native-appwrite';\n\u002F\u002F Init your React Native SDK\nconst client = new Client();\n\nclient\n    .setEndpoint('http:\u002F\u002Flocalhost\u002Fv1') \u002F\u002F Your Appwrite Endpoint\n    .setProject('455x34dfkj')\n    .setPlatform('com.example.myappwriteapp') \u002F\u002F YOUR application ID\n;\n\nconst account = new Account(client);\n\n\u002F\u002F Register User\naccount.create(ID.unique(), 'me@example.com', 'password', 'Jane Doe')\n    .then(function (response) {\n        console.log(response);\n    }, function (error) {\n        console.log(error);\n    });\n```\n\n### Type Safety with Models\n\nThe Appwrite React Native SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a generic type parameter that allows you to specify your custom model type for full type safety.\n\n**TypeScript:**\n```typescript\ninterface Book {\n    name: string;\n    author: string;\n    releaseYear?: string;\n    category?: string;\n    genre?: string[];\n    isCheckedOut: boolean;\n}\n\nconst databases = new Databases(client);\n\ntry {\n    const documents = await databases.listDocuments\u003CBook>(\n        'your-database-id',\n        'your-collection-id'\n    );\n    \n    documents.documents.forEach(book => {\n        console.log(`Book: ${book.name} by ${book.author}`); \u002F\u002F Now you have full type safety\n    });\n} catch (error) {\n    console.error('Appwrite error:', error);\n}\n```\n\n**JavaScript (with JSDoc for type hints):**\n```javascript\n\u002F**\n * @typedef {Object} Book\n * @property {string} name\n * @property {string} author\n * @property {string} [releaseYear]\n * @property {string} [category]\n * @property {string[]} [genre]\n * @property {boolean} isCheckedOut\n *\u002F\n\nconst databases = new Databases(client);\n\ntry {\n    \u002F** @type {Models.DocumentList\u003CBook>} *\u002F\n    const documents = await databases.listDocuments(\n        'your-database-id',\n        'your-collection-id'\n    );\n    \n    documents.documents.forEach(book => {\n        console.log(`Book: ${book.name} by ${book.author}`); \u002F\u002F Type hints available in IDE\n    });\n} catch (error) {\n    console.error('Appwrite error:', error);\n}\n```\n\n**Tip**: You can use the `appwrite types` command to automatically generate TypeScript interfaces based on your Appwrite database schema. Learn more about [type generation](https:\u002F\u002Fappwrite.io\u002Fdocs\u002Fproducts\u002Fdatabases\u002Ftype-generation).\n\n### Error Handling\n\nThe Appwrite React Native SDK raises an `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching the exception and present the `message` to the user or handle it yourself based on the provided error information. Below is an example.\n\n```javascript\ntry {\n    const user = await account.create(ID.unique(), \"email@example.com\", \"password\", \"Walter O'Brien\");\n    console.log('User created:', user);\n} catch (error) {\n    console.error('Appwrite error:', error.message);\n}\n```\n\n### Learn more\n\nYou can use the following resources to learn more and get help\n- 🚀 [Getting Started Tutorial](https:\u002F\u002Fappwrite.io\u002Fdocs\u002Fquick-starts\u002Freact-native)\n- 📜 [Appwrite Docs](https:\u002F\u002Fappwrite.io\u002Fdocs)\n- 💬 [Discord Community](https:\u002F\u002Fappwrite.io\u002Fdiscord)\n- 🚂 [Appwrite React Native Playground](https:\u002F\u002Fgithub.com\u002Fappwrite\u002Fplayground-for-react-native)\n\n\n## Contribution\n\nThis library is auto-generated by Appwrite custom [SDK Generator](https:\u002F\u002Fgithub.com\u002Fappwrite\u002Fsdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https:\u002F\u002Fgithub.com\u002Fappwrite\u002Fsdk-generator\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) before sending a pull-request.\n\n## License\n\nPlease see the [BSD-3-Clause license](https:\u002F\u002Fraw.githubusercontent.com\u002Fappwrite\u002Fappwrite\u002Fmaster\u002FLICENSE) file for more information.","Appwrite React Native SDK 是一个用于与 Appwrite 后端服务集成的官方库。它允许开发者通过简洁易用的 REST API 与 Appwrite 的后端功能进行交互，支持账户管理、数据库操作等功能，并且基于 TypeScript 开发，确保了类型安全。该 SDK 适用于需要快速构建跨平台移动应用的场景，尤其是那些希望简化后端开发工作量同时保持应用安全性与性能的项目。通过简单的配置步骤即可将您的 React Native 应用连接到 Appwrite 服务器上，开始使用其提供的各种后端服务。","2026-06-11 03:46:50","high_star"]