---
description: Capacitor plugin to access native asset files. It allows copying, listing, and reading files from the app bundle.
title: Capacitor Asset Manager Plugin for Android & iOS - Capawesome
image: https://capawesome.io/docs/assets/images/social/sdks/capacitor/asset-manager.png
---

<!doctype html> 

[Skip to content ](#capacitor-asset-manager-plugin) 

[🔐 Introducing the **Capacitor Vault** plugin — store secrets behind biometrics or a device passcode. ](/blog/announcing-the-capacitor-vault-plugin/) 

* [ SDKs ](/docs/sdks/)
* [ API ](#api)
* [ Enums ](#enums)
* [ FAQ ](#faq)
* [ Related Plugins ](#related-plugins)
* [ Newsletter ](#newsletter)
* [ Changelog ](#changelog)
* [ License ](#license)
* [ Audio Player ](/docs/sdks/capacitor/audio-player/)
* [ Audio Recorder ](/docs/sdks/capacitor/audio-recorder/)
* [ Audio Session ](/docs/sdks/capacitor/audio-session/)
* [ Background Task ](/docs/sdks/capacitor/background-task/)
* [ Badge ](/docs/sdks/capacitor/badge/)
* [ Barometer ](/docs/sdks/capacitor/barometer/)
* [ Battery ](/docs/sdks/capacitor/battery/)
* [ Biometrics ](/docs/sdks/capacitor/biometrics/)
* [ Bluetooth Low Energy ](/docs/sdks/capacitor/bluetooth-low-energy/)
* [ Clipboard ](/docs/sdks/capacitor/clipboard/)
* [ Cloudinary ](/docs/sdks/capacitor/cloudinary/)
* [ Compass ](/docs/sdks/capacitor/compass/)
* [ Contacts ](/docs/sdks/capacitor/contacts/)
* [ Datetime Picker ](/docs/sdks/capacitor/datetime-picker/)
* [ Device Info ](/docs/sdks/capacitor/device-info/)
* [ Dialog ](/docs/sdks/capacitor/dialog/)
* [ Exif ](/docs/sdks/capacitor/exif/)
* [ Facebook Sign-In ](/docs/sdks/capacitor/facebook-sign-in/)
* [ File Compressor ](/docs/sdks/capacitor/file-compressor/)
* [ File Opener ](/docs/sdks/capacitor/file-opener/)
* [ File Picker ](/docs/sdks/capacitor/file-picker/)
* [ Firebase ](/docs/sdks/capacitor/firebase/)
* [ Formbricks ](/docs/sdks/capacitor/formbricks/)
* [ Geocoder ](/docs/sdks/capacitor/geocoder/)
* [ Google Sign-In ](/docs/sdks/capacitor/google-sign-in/)
* [ Grafana Faro ](/docs/sdks/capacitor/grafana-faro/)
* [ Gyroscope ](/docs/sdks/capacitor/gyroscope/)
* [ Haptics ](/docs/sdks/capacitor/haptics/)
* [ Home Indicator ](/docs/sdks/capacitor/home-indicator/)
* [ In-App Browser ](/docs/sdks/capacitor/in-app-browser/)
* [ Install Referrer ](/docs/sdks/capacitor/install-referrer/)
* [ Keep Awake ](/docs/sdks/capacitor/keep-awake/)
* [ libSQL ](/docs/sdks/capacitor/libsql/)
* [ Light Sensor ](/docs/sdks/capacitor/light-sensor/)
* [ Live Update ](/docs/sdks/capacitor/live-update/)
* [ Localization ](/docs/sdks/capacitor/localization/)
* [ Mail Composer ](/docs/sdks/capacitor/mail-composer/)
* [ Managed Configurations ](/docs/sdks/capacitor/managed-configurations/)
* [ Maps Launcher ](/docs/sdks/capacitor/maps-launcher/)
* [ Media Session ](/docs/sdks/capacitor/media-session/)
* [ ML Kit ](/docs/sdks/capacitor/mlkit/)
* [ Navigation Bar ](/docs/sdks/capacitor/navigation-bar/)
* [ Network ](/docs/sdks/capacitor/network/)
* [ NFC ](/docs/sdks/capacitor/nfc/)
* [ Node.js ](/docs/sdks/capacitor/nodejs/)
* [ OAuth ](/docs/sdks/capacitor/oauth/)
* [ Passkeys ](/docs/sdks/capacitor/passkeys/)
* [ Password Autofill ](/docs/sdks/capacitor/password-autofill/)
* [ PDF Generator ](/docs/sdks/capacitor/pdf-generator/)
* [ PDF Viewer ](/docs/sdks/capacitor/pdf-viewer/)
* [ Pedometer ](/docs/sdks/capacitor/pedometer/)
* [ Permissions ](/docs/sdks/capacitor/permissions/)
* [ Phone Dialer ](/docs/sdks/capacitor/phone-dialer/)
* [ Photo Editor ](/docs/sdks/capacitor/photo-editor/)
* [ Photo Manipulator ](/docs/sdks/capacitor/photo-manipulator/)
* [ PixLive ](/docs/sdks/capacitor/pixlive/)
* [ PostHog ](/docs/sdks/capacitor/posthog/)
* [ Printer ](/docs/sdks/capacitor/printer/)
* [ Privacy Screen ](/docs/sdks/capacitor/privacy-screen/)
* [ Proximity Sensor ](/docs/sdks/capacitor/proximity-sensor/)
* [ Purchases ](/docs/sdks/capacitor/purchases/)
* [ RealtimeKit ](/docs/sdks/capacitor/realtimekit/)
* [ Root Detection ](/docs/sdks/capacitor/root-detection/)
* [ Screen Brightness ](/docs/sdks/capacitor/screen-brightness/)
* [ Screen Orientation ](/docs/sdks/capacitor/screen-orientation/)
* [ Screen Reader ](/docs/sdks/capacitor/screen-reader/)
* [ Screenshot ](/docs/sdks/capacitor/screenshot/)
* [ Secure Preferences ](/docs/sdks/capacitor/secure-preferences/)
* [ Settings Launcher ](/docs/sdks/capacitor/settings-launcher/)
* [ Shake ](/docs/sdks/capacitor/shake/)
* [ Silent Mode ](/docs/sdks/capacitor/silent-mode/)
* [ SIM ](/docs/sdks/capacitor/sim/)
* [ SMS Composer ](/docs/sdks/capacitor/sms-composer/)
* [ Speech Recognition ](/docs/sdks/capacitor/speech-recognition/)
* [ Speech Synthesis ](/docs/sdks/capacitor/speech-synthesis/)
* [ Share Target ](/docs/sdks/capacitor/share-target/)
* [ Square Mobile Payments ](/docs/sdks/capacitor/square-mobile-payments/)
* [ SQLite ](/docs/sdks/capacitor/sqlite/)
* [ Superwall ](/docs/sdks/capacitor/superwall/)
* [ System WebView ](/docs/sdks/capacitor/system-webview/)
* [ Text Interaction ](/docs/sdks/capacitor/text-interaction/)
* [ Text Zoom ](/docs/sdks/capacitor/text-zoom/)
* [ Thermal State ](/docs/sdks/capacitor/thermal-state/)
* [ Toast ](/docs/sdks/capacitor/toast/)
* [ Torch ](/docs/sdks/capacitor/torch/)
* [ Vault ](/docs/sdks/capacitor/vault/)
* [ Volume ](/docs/sdks/capacitor/volume/)
* [ Wallet ](/docs/sdks/capacitor/wallet/)
* [ Wifi ](/docs/sdks/capacitor/wifi/)
* [ Zip ](/docs/sdks/capacitor/zip/)
* [ Cordova ](/docs/sdks/cordova/)
* [ Cloud ](/docs/cloud/)
* [ Integrations ](/docs/cloud/live-updates/integrations/)
* Concepts
* Reference
* [ Troubleshooting ](/docs/cloud/live-updates/troubleshooting/)
* [ FAQ ](/docs/cloud/live-updates/faq/)
* [ Native Builds ](/docs/cloud/native-builds/)
* [ Set Up Environments ](/docs/cloud/native-builds/environments/)
* [ Overwrite Native Configurations ](/docs/cloud/native-builds/native-configurations/)
* [ Auto-Increment Build Numbers ](/docs/cloud/native-builds/auto-incrementing-build-numbers/)
* [ Configure the Web Build Script ](/docs/cloud/native-builds/web-build-script/)
* [ Build from a Monorepo ](/docs/cloud/native-builds/monorepo/)
* [ Use pnpm, Yarn, or bun ](/docs/cloud/native-builds/package-managers/)
* [ Install Private npm Packages ](/docs/cloud/native-builds/npm-private-registry/)
* [ Override the Java Version ](/docs/cloud/native-builds/override-java-version/)
* [ Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/custom-ios-provisioning-profiles/)
* [ Build without Git ](/docs/cloud/native-builds/build-without-git/)
* [ Access Git Behind a Firewall ](/docs/cloud/native-builds/firewall-access/)
* [ Integrations ](/docs/cloud/native-builds/integrations/)
* Reference
* [ Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [ FAQ ](/docs/cloud/native-builds/faq/)
* [ App Store Publishing ](/docs/cloud/app-store-publishing/)
* [ Submit a Build ](/docs/cloud/app-store-publishing/submit-a-build/)
* [ Submit Automatically After a Build ](/docs/cloud/app-store-publishing/submit-automatically/)
* [ Troubleshooting ](/docs/cloud/app-store-publishing/troubleshooting/)
* [ FAQ ](/docs/cloud/app-store-publishing/faq/)
* [ Automations ](/docs/cloud/automations/)
* [ Reference ](/docs/cloud/automations/reference/)
* [ Troubleshooting ](/docs/cloud/automations/troubleshooting/)
* [ FAQ ](/docs/cloud/automations/faq/)
* [ Assist ](/docs/cloud/assist/)
* [ CLI ](/docs/cloud/cli/)
* APIs and SDKs
* [ Webhooks ](/docs/cloud/webhooks/)
* [ Integrations ](/docs/cloud/integrations/)
* Account
* [ Organization ](/docs/cloud/organizations/)
* [ Two-Factor Enforcement ](/docs/cloud/organizations/two-factor-authentication/)
* [ Audit Logs ](/docs/cloud/organizations/audit-logs/)
* [ Billing ](/docs/cloud/organizations/billing/)
* [ License Keys ](/docs/cloud/license-keys/)
* [ AI ](/docs/ai/)
* [ Insiders ](/docs/insiders/)
* [ Billing & Plans ](/docs/insiders/billing-and-plans/)
* [ FAQ ](/docs/insiders/faq/)
* [ License ](https://capawesome.io/legal/eula/)
* [ Support ](/docs/support/)
* [ Contributing ](/docs/contributing/)
* Contributing code
* [ Code of Conduct ](/docs/contributing/code-of-conduct/)
* [ Questions ](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#creating-a-discussion)
* [ Blog ](/blog/)
* Categories

* [ API ](#api)
* [ Enums ](#enums)
* [ FAQ ](#faq)
* [ Related Plugins ](#related-plugins)
* [ Newsletter ](#newsletter)
* [ Changelog ](#changelog)
* [ License ](#license)

# Capacitor Asset Manager Plugin[¶](#capacitor-asset-manager-plugin "Permanent link")

Capacitor plugin to access native asset files.

[ ![Deliver Live Updates to your Capacitor app with Capawesome Cloud](../../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](https://cloud.capawesome.io/) 

## Features[¶](#features "Permanent link")

The Capacitor Asset Manager plugin is one of the most complete native asset access solutions for Capacitor apps. Here are some of the key features:

* 🖥️ **Cross-platform**: Supports Android and iOS.
* 📂 **Asset copying**: Copy files or directories from app bundle to data directory.
* 📄 **File listing**: List all files in asset directories.
* 📖 **File reading**: Read asset files with Base64 or UTF-8 encoding.
* 🔄 **Bundle access**: Direct access to native app bundle assets.
* 🗂️ **Directory operations**: Handle both individual files and entire directories.
* 📦 **Multiple encodings**: Support for Base64 and UTF-8 file reading.
* 🔁 **Up-to-date**: Always supports the latest Capacitor version.

Missing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!

## Use Cases[¶](#use-cases "Permanent link")

The Asset Manager plugin is typically used whenever an app ships files inside its native bundle that need to be accessed at runtime, for example:

* **Prepopulated data**: Copy bundled files such as databases or sample data from the app bundle to the app's data directory on first launch.
* **Configuration files**: Read bundled configuration files like `capacitor.config.json` using UTF-8 encoding.
* **Asset discovery**: List the files in an asset directory to process them dynamically.
* **Binary assets**: Read bundled binary files as Base64 encoded strings.

## Compatibility[¶](#compatibility "Permanent link")

| Plugin Version | Capacitor Version | Status         |
| -------------- | ----------------- | -------------- |
| 8.x.x          | \>=8.x.x          | Active support |

## Installation[¶](#installation "Permanent link")

You can use our **AI-Assisted Setup** to install the plugin. Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:

`[](#%5F%5Fcodelineno-0-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-1-1) Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-asset-manager` plugin in my project.
 ``

If you prefer **Manual Setup**, install the plugin by running the following commands:

`[](#%5F%5Fcodelineno-2-1)npm install @capawesome/capacitor-asset-manager
[](#%5F%5Fcodelineno-2-2)npx cap sync
`

## Configuration[¶](#configuration "Permanent link")

No configuration required for this plugin.

## Usage[¶](#usage "Permanent link")

The following examples show how to copy an asset to the data directory, list asset files, and read an asset file.

### Copy an asset to the data directory[¶](#copy-an-asset-to-the-data-directory "Permanent link")

Copy a file or directory from the app bundle to the app's data directory. You can generate the destination path using the `getUri(...)` method of the Capacitor Filesystem plugin. Only available on Android and iOS:

`[](#%5F%5Fcodelineno-3-1)import { AssetManager } from '@capawesome/capacitor-asset-manager';
[](#%5F%5Fcodelineno-3-2)import { Directory, Filesystem } from '@capacitor/filesystem';
[](#%5F%5Fcodelineno-3-3)
[](#%5F%5Fcodelineno-3-4)const copy = async () => {
[](#%5F%5Fcodelineno-3-5)  const { uri } = await Filesystem.getUri({
[](#%5F%5Fcodelineno-3-6)    directory: Directory.Cache,
[](#%5F%5Fcodelineno-3-7)    path: 'index.html'
[](#%5F%5Fcodelineno-3-8)  });
[](#%5F%5Fcodelineno-3-9)  await AssetManager.copy({
[](#%5F%5Fcodelineno-3-10)    from: 'public/index.html',
[](#%5F%5Fcodelineno-3-11)    to: uri
[](#%5F%5Fcodelineno-3-12)  });
[](#%5F%5Fcodelineno-3-13)};
`

### List asset files[¶](#list-asset-files "Permanent link")

List the files in an asset directory. If no path is specified, the root path is used. Only available on Android and iOS:

`[](#%5F%5Fcodelineno-4-1)import { AssetManager } from '@capawesome/capacitor-asset-manager';
[](#%5F%5Fcodelineno-4-2)
[](#%5F%5Fcodelineno-4-3)const list = async () => {
[](#%5F%5Fcodelineno-4-4)  await AssetManager.list({
[](#%5F%5Fcodelineno-4-5)    path: 'public'
[](#%5F%5Fcodelineno-4-6)  });
[](#%5F%5Fcodelineno-4-7)};
`

### Read an asset file[¶](#read-an-asset-file "Permanent link")

Read a file from the app bundle using Base64 (default) or UTF-8 encoding. Avoid reading large files this way, as it can cause out of memory issues; instead, copy them to the app's data directory using the `copy(...)` method and read them from there using the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch%5FAPI/Using%5FFetch). Only available on Android and iOS:

`[](#%5F%5Fcodelineno-5-1)import { AssetManager, Encoding } from '@capawesome/capacitor-asset-manager';
[](#%5F%5Fcodelineno-5-2)
[](#%5F%5Fcodelineno-5-3)const read = async () => {
[](#%5F%5Fcodelineno-5-4)  const { data } = await AssetManager.read({
[](#%5F%5Fcodelineno-5-5)    encoding: Encoding.Utf8,
[](#%5F%5Fcodelineno-5-6)    path: 'capacitor.config.json'
[](#%5F%5Fcodelineno-5-7)  });
[](#%5F%5Fcodelineno-5-8)  return JSON.parse(data);
[](#%5F%5Fcodelineno-5-9)};
`

## API[¶](#api "Permanent link")

* [copy(...)](#copy)
* [list(...)](#list)
* [read(...)](#read)
* [Interfaces](#interfaces)
* [Enums](#enums)

### copy(...)[¶](#copy "Permanent link")

`[](#%5F%5Fcodelineno-6-1)copy(options: CopyOptions) => Promise<void>
`

Copy a file or directory from the app bundle to the app's data directory.

Only available on Android and iOS.

| Param       | Type                        |
| ----------- | --------------------------- |
| **options** | [CopyOptions](#copyoptions) |

**Since:** 7.0.0

---

### list(...)[¶](#list "Permanent link")

`[](#%5F%5Fcodelineno-7-1)list(options?: ListOptions | undefined) => Promise<ListResult>
`

List files in a directory.

Only available on Android and iOS.

| Param       | Type                        |
| ----------- | --------------------------- |
| **options** | [ListOptions](#listoptions) |

**Returns:** `Promise<[ListResult](#listresult)>`

**Since:** 7.0.0

---

### read(...)[¶](#read "Permanent link")

`[](#%5F%5Fcodelineno-8-1)read(options: ReadOptions) => Promise<ReadResult>
`

Read a file from the app bundle.

**Attention**: Reading large files can cause out of memory (OOM) issues. It is therefore recommended to copy files to the app's data directory using the `copy` method and read them from there using the [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch%5FAPI/Using%5FFetch).

Only available on Android and iOS.

| Param       | Type                        |
| ----------- | --------------------------- |
| **options** | [ReadOptions](#readoptions) |

**Returns:** `Promise<[ReadResult](#readresult)>`

**Since:** 7.0.0

---

### Interfaces[¶](#interfaces "Permanent link")

#### CopyOptions[¶](#copyoptions "Permanent link")

| Prop     | Type   | Description                                                                                                                                                                          | Since |
| -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- |
| **from** | string | The source path to copy from.                                                                                                                                                        | 7.0.0 |
| **to**   | string | The destination path to copy to. **Tip**: Generate this path using the [getUri(...)](https://capacitorjs.com/docs/apis/filesystem#geturi) method of the Capacitor Filesystem plugin. | 7.0.0 |

#### ListResult[¶](#listresult "Permanent link")

| Prop      | Type       | Description                         | Since |
| --------- | ---------- | ----------------------------------- | ----- |
| **files** | string\[\] | The list of files in the directory. | 7.0.0 |

#### ListOptions[¶](#listoptions "Permanent link")

| Prop     | Type   | Description                                                                | Since |
| -------- | ------ | -------------------------------------------------------------------------- | ----- |
| **path** | string | The path to list files from. If not specified, the root path will be used. | 7.0.0 |

#### ReadResult[¶](#readresult "Permanent link")

| Prop     | Type   | Description              | Since |
| -------- | ------ | ------------------------ | ----- |
| **data** | string | The content of the file. | 7.0.0 |

#### ReadOptions[¶](#readoptions "Permanent link")

| Prop         | Type                  | Description                                | Default  | Since |
| ------------ | --------------------- | ------------------------------------------ | -------- | ----- |
| **encoding** | [Encoding](#encoding) | The encoding to use when reading the file. | 'base64' | 7.0.0 |
| **path**     | string                | The path to read the file from.            |          | 7.0.0 |

### Enums[¶](#enums "Permanent link")

#### Encoding[¶](#encoding "Permanent link")

| Members    | Value    | Since |
| ---------- | -------- | ----- |
| **Base64** | 'base64' | 7.0.0 |
| **Utf8**   | 'utf8'   | 7.0.0 |

## FAQ[¶](#faq "Permanent link")

### Which platforms are supported by this plugin?[¶](#which-platforms-are-supported-by-this-plugin "Permanent link")

The plugin provides access to files in the native app bundle and is therefore only available on Android and iOS. All plugin methods are marked as only available on Android and iOS in the [API](#api) section.

### Why does my app crash when reading large asset files?[¶](#why-does-my-app-crash-when-reading-large-asset-files "Permanent link")

Reading large files with the `read(...)` method can cause out of memory (OOM) issues because the entire file content is returned as a string. Instead, copy the file to the app's data directory using the `copy(...)` method and read it from there using the Fetch API, as described in the [usage example](#read-an-asset-file) above.

### How is this plugin different from the Capacitor Filesystem plugin?[¶](#how-is-this-plugin-different-from-the-capacitor-filesystem-plugin "Permanent link")

The Capacitor Filesystem plugin reads and writes files in the app's filesystem directories, but it cannot access the files bundled inside the native app. The Asset Manager plugin fills this gap by copying, listing, and reading native asset files. The two plugins work well together: for example, you can generate the destination path for the `copy(...)` method using the `getUri(...)` method of the Filesystem plugin.

### Which encodings are supported when reading a file?[¶](#which-encodings-are-supported-when-reading-a-file "Permanent link")

The `read(...)` method supports Base64 and UTF-8 encoding. If no encoding is specified, Base64 is used by default.

### Can I use this plugin with Ionic, React, Vue or Angular?[¶](#can-i-use-this-plugin-with-ionic-react-vue-or-angular "Permanent link")

Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.

## Related Plugins[¶](#related-plugins "Permanent link")

* [File Picker](https://capawesome.io/docs/sdks/capacitor/file-picker/): Select a file, directory, image, or video from the device's file system or gallery.
* [File Opener](https://capawesome.io/docs/sdks/capacitor/file-opener/): Open a file with the default application.
* [Zip](https://capawesome.io/docs/sdks/capacitor/zip/): Zip and unzip files and directories with support for encryption.

## Newsletter[¶](#newsletter "Permanent link")

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).

## Changelog[¶](#changelog "Permanent link")

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/asset-manager/CHANGELOG.md).

## License[¶](#license "Permanent link")

See [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/asset-manager/LICENSE).

July 8, 2026 

Back to top

```json
{"@context": "https://schema.org", "@graph": [{"@type": "TechArticle", "@id": "https://capawesome.io/docs/sdks/capacitor/asset-manager/#article", "headline": "Capacitor Asset Manager Plugin for Android & iOS", "name": "Capacitor Asset Manager Plugin for Android & iOS", "description": "Capacitor plugin to access native asset files. It allows copying, listing, and reading files from the app bundle.", "inLanguage": "en", "url": "https://capawesome.io/docs/sdks/capacitor/asset-manager/", "mainEntityOfPage": "https://capawesome.io/docs/sdks/capacitor/asset-manager/", "author": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "publisher": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "about": {"@id": "https://capawesome.io/docs/sdks/capacitor/asset-manager/#software"}}, {"@type": "SoftwareSourceCode", "@id": "https://capawesome.io/docs/sdks/capacitor/asset-manager/#software", "name": "Capacitor Asset Manager Plugin for Android & iOS", "description": "Capacitor plugin to access native asset files. It allows copying, listing, and reading files from the app bundle.", "url": "https://capawesome.io/docs/sdks/capacitor/asset-manager/", "programmingLanguage": "TypeScript", "runtimePlatform": "Capacitor", "codeRepository": "https://github.com/capawesome-team", "author": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "publisher": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}}]}
{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "Which platforms are supported by this plugin?", "acceptedAnswer": {"@type": "Answer", "text": "The plugin provides access to files in the native app bundle and is therefore only available on Android and iOS. All plugin methods are marked as only available on Android and iOS in the API section."}}, {"@type": "Question", "name": "Why does my app crash when reading large asset files?", "acceptedAnswer": {"@type": "Answer", "text": "Reading large files with the read(...) method can cause out of memory (OOM) issues because the entire file content is returned as a string. Instead, copy the file to the app's data directory using the copy(...) method and read it from there using the Fetch API, as described in the usage example above."}}, {"@type": "Question", "name": "How is this plugin different from the Capacitor Filesystem plugin?", "acceptedAnswer": {"@type": "Answer", "text": "The Capacitor Filesystem plugin reads and writes files in the app's filesystem directories, but it cannot access the files bundled inside the native app. The Asset Manager plugin fills this gap by copying, listing, and reading native asset files. The two plugins work well together: for example, you can generate the destination path for the copy(...) method using the getUri(...) method of the Filesystem plugin."}}, {"@type": "Question", "name": "Which encodings are supported when reading a file?", "acceptedAnswer": {"@type": "Answer", "text": "The read(...) method supports Base64 and UTF-8 encoding. If no encoding is specified, Base64 is used by default."}}, {"@type": "Question", "name": "Can I use this plugin with Ionic, React, Vue or Angular?", "acceptedAnswer": {"@type": "Answer", "text": "Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects."}}], "url": "https://capawesome.io/docs/sdks/capacitor/asset-manager/"}
```
