Skip to content

Commit

Permalink
Merge pull request #53 from capacitor-community/chore/release-1.0.6
Browse files Browse the repository at this point in the history
chore: release 1.0.6
  • Loading branch information
ryaa authored Apr 11, 2024
2 parents e5d97ab + 8baf08b commit 72a71dc
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.12.0
20.11.1
42 changes: 31 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,42 @@

All notable changes to this project will be documented in this file.

## [v1.0.5](https://github.com/capacitor-community/file-opener/compare/v1.0.5...v1.0.6) (2024-04-11)

### Chores

- Removed `prepare` script from `package.json` ([#50](https://github.com/capacitor-community/file-opener/pull/50)), ([e5d97ab](https://github.com/capacitor-community/file-opener/commit/e5d97ab83635fd321ffea6865ae21f5d98c4199d)), closes [#48](https://github.com/capacitor-community/file-opener/issues/48)
- Bumped node version to 20.11.1
- Added **Usage** section to `README.md`

## [v1.0.5](https://github.com/capacitor-community/file-opener/compare/v1.0.4...v1.0.5) (2023-05-07)
### Chores
* Capacitor 5 support ([#35](https://github.com/capacitor-community/file-opener/pull/35)), ([06d1c76](https://github.com/capacitor-community/file-opener/commit/06d1c76a31a488a7d4b018d198a5827060359506)), closes [#36](https://github.com/capacitor-community/file-opener/issues/36) and [#37](https://github.com/capacitor-community/file-opener/issues/37)

### Chores

- Capacitor 5 support ([#35](https://github.com/capacitor-community/file-opener/pull/35)), ([06d1c76](https://github.com/capacitor-community/file-opener/commit/06d1c76a31a488a7d4b018d198a5827060359506)), closes [#36](https://github.com/capacitor-community/file-opener/issues/36) and [#37](https://github.com/capacitor-community/file-opener/issues/37)

## [v1.0.4](https://github.com/capacitor-community/file-opener/compare/v1.0.3...v1.0.4) (2022-12-22)
### Chores
* Support Node 14 ([#24](https://github.com/capacitor-community/file-opener/pull/24)) and ([#25](https://github.com/capacitor-community/file-opener/pull/25)), ([33b0d93](https://github.com/capacitor-community/file-opener/commit/33b0d931e515aa2f2901b277fd5d529f8f14bd55)), closes [#23](https://github.com/capacitor-community/file-opener/issues/23)

### Chores

- Support Node 14 ([#24](https://github.com/capacitor-community/file-opener/pull/24)) and ([#25](https://github.com/capacitor-community/file-opener/pull/25)), ([33b0d93](https://github.com/capacitor-community/file-opener/commit/33b0d931e515aa2f2901b277fd5d529f8f14bd55)), closes [#23](https://github.com/capacitor-community/file-opener/issues/23)

## [v1.0.3](https://github.com/capacitor-community/file-opener/compare/v1.0.2...v1.0.3) (2022-11-01)
### Bug Fixes
* ShareSheet do not open on iPad when openWithDefault: false ([#15](https://github.com/capacitor-community/file-opener/pull/15)), ([b07ca8e](https://github.com/capacitor-community/file-opener/commit/b07ca8ebf390c2307d9794279c04405cf96a5d29)), closes [#13](https://github.com/capacitor-community/file-opener/issues/13)
* Installation/build issue with 1.0.2 ([#19](https://github.com/capacitor-community/file-opener/pull/19)), ([#16](https://github.com/capacitor-community/file-opener/pull/16)) ([c387bb9](https://github.com/capacitor-community/file-opener/commit/c387bb95f1c3e0821d9bb9b2ea43782ebbff75c6)), ([36c3ab9](https://github.com/capacitor-community/file-opener/commit/36c3ab9c3f0edca41e9b016164c310f2a2d0b594)), closes [#18](https://github.com/capacitor-community/file-opener/issues/18), [#14](https://github.com/capacitor-community/file-opener/issues/14)

### Bug Fixes

- ShareSheet do not open on iPad when openWithDefault: false ([#15](https://github.com/capacitor-community/file-opener/pull/15)), ([b07ca8e](https://github.com/capacitor-community/file-opener/commit/b07ca8ebf390c2307d9794279c04405cf96a5d29)), closes [#13](https://github.com/capacitor-community/file-opener/issues/13)
- Installation/build issue with 1.0.2 ([#19](https://github.com/capacitor-community/file-opener/pull/19)), ([#16](https://github.com/capacitor-community/file-opener/pull/16)) ([c387bb9](https://github.com/capacitor-community/file-opener/commit/c387bb95f1c3e0821d9bb9b2ea43782ebbff75c6)), ([36c3ab9](https://github.com/capacitor-community/file-opener/commit/36c3ab9c3f0edca41e9b016164c310f2a2d0b594)), closes [#18](https://github.com/capacitor-community/file-opener/issues/18), [#14](https://github.com/capacitor-community/file-opener/issues/14)

## [v1.0.2](https://github.com/capacitor-community/file-opener/compare/v1.0.1...v1.0.2) (2022-10-26)
* relaxed node and npm version requirements ([#10](https://github.com/capacitor-community/file-opener/pull/10)), ([#7](https://github.com/capacitor-community/file-opener/pull/7)), ([da8ef0c](https://github.com/capacitor-community/file-opener/commit/da8ef0c8143dc1dd61d12b20252755b0ff38dc6d)), ([1be93e6](https://github.com/capacitor-community/file-opener/commit/1be93e655ff50d3287d62436442c912caf97506a)), closes ([#6](https://github.com/capacitor-community/file-opener/issues/6))
* upgraded dependencies to the latest versions

- relaxed node and npm version requirements ([#10](https://github.com/capacitor-community/file-opener/pull/10)), ([#7](https://github.com/capacitor-community/file-opener/pull/7)), ([da8ef0c](https://github.com/capacitor-community/file-opener/commit/da8ef0c8143dc1dd61d12b20252755b0ff38dc6d)), ([1be93e6](https://github.com/capacitor-community/file-opener/commit/1be93e655ff50d3287d62436442c912caf97506a)), closes ([#6](https://github.com/capacitor-community/file-opener/issues/6))
- upgraded dependencies to the latest versions

## 1.0.1
* enabled support for iOS platform and minor improvements for Android platform related to error handling

- enabled support for iOS platform and minor improvements for Android platform related to error handling

## 1.0.0
* initial release

- initial release
43 changes: 32 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@

## Maintainers

| Maintainer | GitHub | Active |
| ---------- | ------------------------------------- | ------ |
| ryaa | [ryaa](https://github.com/ryaa) | yes |

| Maintainer | GitHub | Active |
| ---------- | ------------------------------- | ------ |
| ryaa | [ryaa](https://github.com/ryaa) | yes |

## About

Expand All @@ -47,6 +46,23 @@ npm install @capacitor-community/file-opener
npx cap sync
```

## Usage

```typescript
import { FileOpener } from '@capacitor-community/file-opener';

try {
const fileOpenerOptions: FileOpenerOptions = {
filePath: 'file:///path/to/file',
contentType: 'application/pdf',
openWithDefault: true,
};
await FileOpener.open(fileOpenerOptions);
} catch (e) {
console.log('Error opening file', e);
}
```

## API

<docgen-index>
Expand Down Expand Up @@ -93,15 +109,16 @@ file open method options
</docgen-api>

### List of Error Codes and Meanings

When an error is thrown, one of the following codes (as a string value) will be used.

| Code | Description |
|-----:|:---------------------------------|
| '1' | `INTERNAL_ERROR` |
| '2' | `INVALID_ARGUMENT` |
' '8' | `FILE_NOT_SUPPORTED` |
| '9' | `FILE_NOT_FOUND` |
| '10' | `UNKNOWN` |
| Code | Description |
| ----: | :------------------- |
| '1' | `INTERNAL_ERROR` |
| '2' | `INVALID_ARGUMENT` |
| ' '8' | `FILE_NOT_SUPPORTED` |
| '9' | `FILE_NOT_FOUND` |
| '10' | `UNKNOWN` |

### Android

Expand All @@ -115,9 +132,13 @@ If you app needs to open files in the external directories, then within your `An

</manifest>
```

### iOS

You'll need to set ios/App/Podfile to version 13 or higher (for more details please [see](https://capacitorjs.com/docs/ios#ios-support))

```
platform :ios '13.0'
```

then `npx cap sync ios`
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor-community/file-opener",
"version": "1.0.5",
"version": "1.0.6",
"description": "Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri.",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down

0 comments on commit 72a71dc

Please sign in to comment.