@capawesome/capacitor-screenshot 8.0.1 → 8.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/Package.swift +1 -5
  2. package/README.md +57 -5
  3. package/package.json +13 -10
package/Package.swift CHANGED
@@ -19,10 +19,6 @@ let package = Package(
19
19
  .product(name: "Capacitor", package: "capacitor-swift-pm"),
20
20
  .product(name: "Cordova", package: "capacitor-swift-pm")
21
21
  ],
22
- path: "ios/Plugin"),
23
- .testTarget(
24
- name: "ScreenshotPluginTests",
25
- dependencies: ["ScreenshotPlugin"],
26
- path: "ios/PluginTests")
22
+ path: "ios/Plugin")
27
23
  ]
28
24
  )
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @capawesome/capacitor-screenshot
1
+ # Capacitor Screenshot Plugin
2
2
 
3
3
  Capacitor plugin for taking screenshots.
4
4
 
@@ -10,19 +10,24 @@ Capacitor plugin for taking screenshots.
10
10
 
11
11
  ## Features
12
12
 
13
- We are proud to offer one of the most complete and feature-rich Capacitor plugins for capturing screenshots. Here are some of the key features:
13
+ The Capacitor Screenshot plugin is one of the most capable screen capture solutions for Capacitor apps. Here are some of the key features:
14
14
 
15
15
  - 🖥️ **Cross-platform**: Supports Android, iOS, and Web.
16
16
  - 📸 **Easy screenshots**: Simple one-method API for taking screenshots.
17
17
  - 🌐 **Web support**: Uses html2canvas for web platform screenshot capture.
18
18
  - 📱 **Native capture**: High-quality native screenshot capture on mobile.
19
+ - 🤝 **Compatibility**: Works alongside the [File Opener](https://capawesome.io/docs/sdks/capacitor/file-opener/), [Photo Editor](https://capawesome.io/docs/sdks/capacitor/photo-editor/) and [Privacy Screen](https://capawesome.io/docs/sdks/capacitor/privacy-screen/) plugins.
19
20
  - 🔁 **Up-to-date**: Always supports the latest Capacitor version.
20
21
 
21
22
  Missing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!
22
23
 
23
- ## Newsletter
24
+ ## Use Cases
24
25
 
25
- 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/).
26
+ The Screenshot plugin is typically used whenever an app needs to capture its own screen, for example:
27
+
28
+ - **Bug reporting and feedback**: Attach a screenshot of the current screen to bug reports or feedback forms.
29
+ - **Sharing app content**: Capture achievements, results, or other screens so users can share them.
30
+ - **Support tickets**: Capture the current state of the app to help your support team reproduce issues.
26
31
 
27
32
  ## Compatibility
28
33
 
@@ -32,7 +37,20 @@ Stay up to date with the latest news and updates about the Capawesome, Capacitor
32
37
 
33
38
  ## Installation
34
39
 
35
- Install the plugin:
40
+ You can use our **AI-Assisted Setup** to install the plugin.
41
+ Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:
42
+
43
+ ```bash
44
+ npx skills add capawesome-team/skills --skill capacitor-plugins
45
+ ```
46
+
47
+ Then use the following prompt:
48
+
49
+ ```
50
+ Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-screenshot` plugin in my project.
51
+ ```
52
+
53
+ If you prefer **Manual Setup**, install the plugin by running the following commands:
36
54
 
37
55
  ```bash
38
56
  npm install @capawesome/capacitor-screenshot
@@ -47,6 +65,12 @@ npm i html2canvas
47
65
 
48
66
  ## Usage
49
67
 
68
+ The following example shows how to take a screenshot of the current screen.
69
+
70
+ ### Take a screenshot
71
+
72
+ Take a screenshot of the current screen. The result contains the file path of the screenshot on Android and iOS, or a data URI on the Web:
73
+
50
74
  ```ts
51
75
  import { Screenshot } from '@capawesome/capacitor-screenshot';
52
76
 
@@ -94,6 +118,34 @@ Take a screenshot.
94
118
 
95
119
  </docgen-api>
96
120
 
121
+ ## FAQ
122
+
123
+ ### What does the take method return on each platform?
124
+
125
+ On Android and iOS, the `take()` method returns the file path of the captured screenshot. On the Web, it returns a data URI instead, since the screenshot is rendered with `html2canvas` in the browser.
126
+
127
+ ### Why do I need to install html2canvas?
128
+
129
+ The `html2canvas` package is only required if you use the plugin on the Web platform, where it is used to render the screenshot. On Android and iOS, the screenshot is captured natively and `html2canvas` is not needed. See the [Installation](#installation) section for details.
130
+
131
+ ### Can I prevent screenshots of my app?
132
+
133
+ No, this plugin only takes screenshots. If you want to block screenshots, hide sensitive app content in the app switcher, or detect when a screenshot is taken, use the [Privacy Screen](https://capawesome.io/docs/sdks/capacitor/privacy-screen/) plugin instead.
134
+
135
+ ### Can I use this plugin with Ionic, React, Vue or Angular?
136
+
137
+ 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.
138
+
139
+ ## Related Plugins
140
+
141
+ - [File Opener](https://capawesome.io/docs/sdks/capacitor/file-opener/): Open a file with the default application.
142
+ - [Photo Editor](https://capawesome.io/docs/sdks/capacitor/photo-editor/): Let the user edit a photo, for example a captured screenshot.
143
+ - [Privacy Screen](https://capawesome.io/docs/sdks/capacitor/privacy-screen/): Hide sensitive app content in the app switcher, block screenshots, and detect when a screenshot is taken.
144
+
145
+ ## Newsletter
146
+
147
+ 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/).
148
+
97
149
  ## Changelog
98
150
 
99
151
  See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/screenshot/CHANGELOG.md).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capawesome/capacitor-screenshot",
3
- "version": "8.0.1",
4
- "description": "Capacitor plugin for taking screenshots.",
3
+ "version": "8.0.2",
4
+ "description": "Capacitor plugin for taking screenshots on Android, iOS, and Web.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/esm/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "url": "https://opencollective.com/capawesome"
34
34
  }
35
35
  ],
36
- "homepage": "https://capawesome.io/plugins/screenshot/",
36
+ "homepage": "https://capawesome.io/docs/sdks/capacitor/screenshot/",
37
37
  "keywords": [
38
38
  "capacitor",
39
39
  "plugin",
@@ -41,7 +41,13 @@
41
41
  "ionic",
42
42
  "android",
43
43
  "ios",
44
- "screenshot"
44
+ "screenshot",
45
+ "capacitor-plugin",
46
+ "screen capture",
47
+ "take screenshot",
48
+ "capture screen",
49
+ "save screenshot",
50
+ "screenshot api"
45
51
  ],
46
52
  "scripts": {
47
53
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
@@ -63,18 +69,16 @@
63
69
  },
64
70
  "devDependencies": {
65
71
  "@capacitor/android": "8.0.0",
66
- "@capacitor/cli": "8.0.0",
72
+ "@capacitor/cli": "8.4.2",
67
73
  "@capacitor/core": "8.0.0",
68
74
  "@capacitor/docgen": "0.3.1",
69
75
  "@capacitor/ios": "8.0.0",
70
76
  "@ionic/eslint-config": "0.4.0",
71
- "@ionic/swiftlint-config": "2.0.0",
72
77
  "eslint": "8.57.0",
73
78
  "html2canvas": "1.4.1",
74
- "prettier": "3.4.2",
75
- "prettier-plugin-java": "2.6.7",
79
+ "prettier-plugin-java": "2.9.7",
76
80
  "rimraf": "6.1.2",
77
- "rollup": "4.53.3",
81
+ "rollup": "4.62.3",
78
82
  "swiftlint": "2.0.0",
79
83
  "typescript": "5.9.3"
80
84
  },
@@ -82,7 +86,6 @@
82
86
  "@capacitor/core": ">=8.0.0",
83
87
  "html2canvas": "^1.4.1"
84
88
  },
85
- "swiftlint": "@ionic/swiftlint-config",
86
89
  "eslintConfig": {
87
90
  "extends": "@ionic/eslint-config/recommended"
88
91
  },