Skip to content

Commit

Permalink
Merge branch 'release/6.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
moberwasserlechner committed Jul 25, 2024
2 parents 3416dbc + c9f36f4 commit 19314f5
Show file tree
Hide file tree
Showing 8 changed files with 944 additions and 4,642 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [6.0.0] - 2024-07-25

### Breaking
- Capacitor 6.x is new minimum peer dependency. [#53](https://github.com/moberwasserlechner/capacitor-filesharer/issues/53)

## [5.0.0] - 2023-09-04

### Breaking
Expand Down Expand Up @@ -69,7 +74,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Share files using the native share dialog on Android and iOS
- Download files on the Web

[Unreleased]: https://github.com/moberwasserlechner/capacitor-filesharer/compare/5.0.0...main
[Unreleased]: https://github.com/moberwasserlechner/capacitor-filesharer/compare/6.0.0...main
[6.0.0]: https://github.com/moberwasserlechner/capacitor-filesharer/compare/5.0.0...6.0.0
[5.0.0]: https://github.com/moberwasserlechner/capacitor-filesharer/compare/4.0.1...5.0.0
[4.0.1]: https://github.com/moberwasserlechner/capacitor-filesharer/compare/4.0.0...4.0.1
[4.0.0]: https://github.com/moberwasserlechner/capacitor-filesharer/compare/3.0.0...4.0.0
Expand Down
85 changes: 24 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,41 @@
# Capacitor File Sharing plugin

<a href="https://github.com/moberwasserlechner/capacitor-filesharer/actions?query=workflow%3ACI"><img src="https://img.shields.io/github/actions/workflow/status/moberwasserlechner/capacitor-filesharer/ci.yml?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/@byteowls/capacitor-filesharer"><img src="https://img.shields.io/npm/dw/@byteowls/capacitor-filesharer?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/@byteowls/capacitor-filesharer"><img src="https://img.shields.io/npm/v/@byteowls/capacitor-filesharer?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/@byteowls/capacitor-filesharer"><img src="https://img.shields.io/npm/l/@byteowls/capacitor-filesharer?style=flat-square" /></a>

<p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p>
<h3 align="center">File Sharing</h3>
<p align="center"><strong><code>@byteowls/capacitor-filesharer</code></strong></p>
<p align="center">
Capacitor File Sharing plugin
</p>

<p align="center">
<img src="https://img.shields.io/maintenance/yes/2024?style=flat-square" />
<a href="https://github.com/moberwasserlechner/capacitor-filesharer/actions?query=workflow%3ACI"><img src="https://img.shields.io/github/actions/workflow/status/moberwasserlechner/capacitor-filesharer/ci.yml?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/@byteowls/capacitor-filesharer"><img src="https://img.shields.io/npm/l/@byteowls/capacitor-filesharer?style=flat-square" /></a>
<br>
<a href="https://www.npmjs.com/package/@byteowls/capacitor-filesharer"><img src="https://img.shields.io/npm/dw/@byteowls/capacitor-filesharer?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/@byteowls/capacitor-filesharer"><img src="https://img.shields.io/npm/v/@byteowls/capacitor-filesharer?style=flat-square" /></a>
</p>

## Introduction

Capacitor plugin to share files on Android and iOS using the native share dialog and on Web using the FileSaver lib.
## Installation

For Capacitor v5
```bash
npm i @byteowls/capacitor-filesharer
npx cap sync
```

For Capacitor v4
```bash
npm i @byteowls/capacitor-filesharer@4
npx cap sync
```

For Capacitor v3
```bash
npm i @byteowls/capacitor-filesharer@3
npx cap sync
```

For further details on what has changed see the [CHANGELOG](https://github.com/moberwasserlechner/capacitor-filesharer/blob/main/CHANGELOG.md).

## Versions

| Plugin | For Capacitor | Docs | Notes |
|--------|---------------|-------------------------------------------------------------------------------------------|--------------------------------|
| 5.x | 5.x.x | [README](./README.md) | Breaking changes see Changelog. |
| 4.x | 4.x.x | [README](https://github.com/moberwasserlechner/capacitor-filesharer/blob/4.0.0/README.md) | Breaking changes see Changelog. |
| 3.x | 3.x.x | [README](https://github.com/moberwasserlechner/capacitor-filesharer/blob/3.0.0/README.md) | Breaking changes see Changelog. XCode 12.0 needs this version |
| 2.x | 2.x.x | [README](https://github.com/moberwasserlechner/capacitor-filesharer/blob/2.0.0/README.md) | Breaking changes see Changelog. XCode 11.4 needs this version |
| 1.x | 1.x.x | [README](https://github.com/moberwasserlechner/capacitor-filesharer/blob/1.0.0/README.md) | |

## Maintainers

| Maintainer | GitHub | Social |
| -----------| -------| -------|
| Michael Oberwasserlechner | [moberwasserlechner](https://github.com/moberwasserlechner) | |

Actively maintained: YES
| Plugin | For Capacitor | Docs | Notes |
|--------|---------------|-------------------------------------------------------------------------------------------|---------------------------------------------------------------|
| 6.x | 6.x.x | [README](./README.md) | Breaking changes see Changelog. |
| 5.x | 5.x.x | [README](https://github.com/moberwasserlechner/capacitor-filesharer/blob/5.0.0/README.md) | Breaking changes see Changelog. |
| 4.x | 4.x.x | [README](https://github.com/moberwasserlechner/capacitor-filesharer/blob/4.0.0/README.md) | Breaking changes see Changelog. |

## Configuration

Starting with version 3.0.0, the plugin is registered automatically on all platforms.

### Use it

```typescript
import {
FileSharer
Expand Down Expand Up @@ -85,17 +70,8 @@ export class SignupComponent {
* ERR_PARAM_DATA_INVALID ... Base64 data is invalid. See [this comment](https://github.com/moberwasserlechner/capacitor-filesharer/issues/5#issuecomment-502070959) for a possible error.
* ERR_FILE_CACHING_FAILED ... Caching the file in temp directory on the device failed.

## Platform: Web/PWA

### Register plugin
On Web/PWA the plugin is registered **automatically** by Capacitor.

## Platform: Android

Prerequisite: [Capacitor Android Docs](https://capacitor.ionicframework.com/docs/android/configuration)

### Configure

Add `outState.clear()` to your `MainActivity`. This fixes `android.os.TransactionTooLargeException` when sharing larger files.

```java
Expand All @@ -114,19 +90,6 @@ public class MainActivity extends BridgeActivity {
}
```

### Register plugin
On Android the plugin is registered **automatically** by Capacitor.

## Platform: iOS
Prerequisite: [Capacitor iOS Docs](https://capacitor.ionicframework.com/docs/ios/configuration)

### Register plugin
On iOS the plugin is registered **automatically** by Capacitor.

## Platform: Electron

- No timeline.

## Contribute

See [Contribution Guidelines](https://github.com/moberwasserlechner/capacitor-filesharer/blob/main/.github/CONTRIBUTING.md).
Expand Down
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.10.0'
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.12.0'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
junit5Version = project.hasProperty('junit5Version') ? rootProject.ext.junit5Version : '5.7.2'
Expand All @@ -13,18 +13,18 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.0'
classpath 'com.android.tools.build:gradle:8.2.1'
}
}

apply plugin: 'com.android.library'

android {
namespace "com.byteowls.capacitor.filesharer"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
versionCode 4
versionName "4.0.0"
// 1) Make sure to use the AndroidJUnitRunner, or a subclass of it. This requires a dependency on androidx.test:runner, too!
Expand Down
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
Loading

0 comments on commit 19314f5

Please sign in to comment.