@independo/capacitor-voice-recorder 8.0.0-dev.2 → 8.0.0-dev.3
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.
- package/IndependoCapacitorVoiceRecorder.podspec +1 -1
- package/Package.swift +28 -0
- package/README.md +11 -0
- package/ios/{Plugin → Sources/VoiceRecorder}/VoiceRecorder.swift +13 -1
- package/package.json +85 -84
- package/ios/Plugin/Info.plist +0 -24
- package/ios/Plugin/VoiceRecorderPlugin.h +0 -10
- package/ios/Plugin/VoiceRecorderPlugin.m +0 -15
- /package/ios/{Plugin → Sources/VoiceRecorder}/CurrentRecordingStatus.swift +0 -0
- /package/ios/{Plugin → Sources/VoiceRecorder}/CustomMediaRecorder.swift +0 -0
- /package/ios/{Plugin → Sources/VoiceRecorder}/Messages.swift +0 -0
- /package/ios/{Plugin → Sources/VoiceRecorder}/RecordData.swift +0 -0
- /package/ios/{Plugin → Sources/VoiceRecorder}/RecordOptions.swift +0 -0
- /package/ios/{Plugin → Sources/VoiceRecorder}/ResponseGenerator.swift +0 -0
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.homepage = package['repository']['url']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
-
s.source_files = 'ios/
|
|
13
|
+
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
14
|
s.ios.deployment_target = '15.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
16
|
s.swift_version = '5.9'
|
package/Package.swift
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// swift-tools-version: 5.9
|
|
2
|
+
import PackageDescription
|
|
3
|
+
|
|
4
|
+
let package = Package(
|
|
5
|
+
name: "IndependoCapacitorVoiceRecorder",
|
|
6
|
+
platforms: [.iOS(.v15)],
|
|
7
|
+
products: [
|
|
8
|
+
.library(
|
|
9
|
+
name: "IndependoCapacitorVoiceRecorder",
|
|
10
|
+
targets: ["VoiceRecorder"])
|
|
11
|
+
],
|
|
12
|
+
dependencies: [
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0")
|
|
14
|
+
],
|
|
15
|
+
targets: [
|
|
16
|
+
.target(
|
|
17
|
+
name: "VoiceRecorder",
|
|
18
|
+
dependencies: [
|
|
19
|
+
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
20
|
+
.product(name: "Cordova", package: "capacitor-swift-pm")
|
|
21
|
+
],
|
|
22
|
+
path: "ios/Sources/VoiceRecorder"),
|
|
23
|
+
.testTarget(
|
|
24
|
+
name: "VoiceRecorderTests",
|
|
25
|
+
dependencies: ["VoiceRecorder"],
|
|
26
|
+
path: "ios/Tests/VoiceRecorderTests")
|
|
27
|
+
]
|
|
28
|
+
)
|
package/README.md
CHANGED
|
@@ -22,7 +22,18 @@ npx cap sync
|
|
|
22
22
|
|
|
23
23
|
## Requirements
|
|
24
24
|
|
|
25
|
+
- Capacitor 8+
|
|
26
|
+
- iOS 15+
|
|
27
|
+
- Android minSdk 24+
|
|
25
28
|
- Android builds require Java 21 (recommended). `npm run verify:android` requires a Java version supported by the bundled Gradle wrapper (currently Java 21–24, with Java 21 recommended).
|
|
29
|
+
|
|
30
|
+
## iOS Package Manager Support
|
|
31
|
+
|
|
32
|
+
This plugin supports both CocoaPods and Swift Package Manager (SPM) on iOS.
|
|
33
|
+
|
|
34
|
+
- CocoaPods (default Capacitor iOS template): `npx cap sync ios`
|
|
35
|
+
- Swift Package Manager (SPM): migrate/create your iOS app to use SPM, then run `npx cap sync ios`
|
|
36
|
+
|
|
26
37
|
## Configuration
|
|
27
38
|
|
|
28
39
|
### Using with Android
|
|
@@ -3,7 +3,19 @@ import AVFoundation
|
|
|
3
3
|
import Capacitor
|
|
4
4
|
|
|
5
5
|
@objc(VoiceRecorder)
|
|
6
|
-
public class VoiceRecorder: CAPPlugin {
|
|
6
|
+
public class VoiceRecorder: CAPPlugin, CAPBridgedPlugin {
|
|
7
|
+
public let identifier = "VoiceRecorder"
|
|
8
|
+
public let jsName = "VoiceRecorder"
|
|
9
|
+
public let pluginMethods: [CAPPluginMethod] = [
|
|
10
|
+
CAPPluginMethod(name: "canDeviceVoiceRecord", returnType: CAPPluginReturnPromise),
|
|
11
|
+
CAPPluginMethod(name: "requestAudioRecordingPermission", returnType: CAPPluginReturnPromise),
|
|
12
|
+
CAPPluginMethod(name: "hasAudioRecordingPermission", returnType: CAPPluginReturnPromise),
|
|
13
|
+
CAPPluginMethod(name: "startRecording", returnType: CAPPluginReturnPromise),
|
|
14
|
+
CAPPluginMethod(name: "stopRecording", returnType: CAPPluginReturnPromise),
|
|
15
|
+
CAPPluginMethod(name: "pauseRecording", returnType: CAPPluginReturnPromise),
|
|
16
|
+
CAPPluginMethod(name: "resumeRecording", returnType: CAPPluginReturnPromise),
|
|
17
|
+
CAPPluginMethod(name: "getCurrentStatus", returnType: CAPPluginReturnPromise),
|
|
18
|
+
]
|
|
7
19
|
|
|
8
20
|
private var customMediaRecorder: CustomMediaRecorder? = nil
|
|
9
21
|
|
package/package.json
CHANGED
|
@@ -1,41 +1,84 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
2
|
+
"capacitor": {
|
|
3
|
+
"ios": {
|
|
4
|
+
"src": "ios"
|
|
5
|
+
},
|
|
6
|
+
"android": {
|
|
7
|
+
"src": "android"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"prettier": "@ionic/prettier-config",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/independo-gmbh/capacitor-voice-recorder.git"
|
|
14
|
+
},
|
|
4
15
|
"description": "Capacitor plugin for voice recording",
|
|
16
|
+
"version": "8.0.0-dev.3",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@capacitor/android": "^8.0.0",
|
|
19
|
+
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
20
|
+
"@capacitor/core": "^8.0.0",
|
|
21
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
22
|
+
"jest": "^30.2.0",
|
|
23
|
+
"rollup": "^4.53.5",
|
|
24
|
+
"eslint": "^8.57.0",
|
|
25
|
+
"@capacitor/ios": "^8.0.0",
|
|
26
|
+
"@semantic-release/git": "^10.0.1",
|
|
27
|
+
"@ionic/swiftlint-config": "^2.0.0",
|
|
28
|
+
"swiftlint": "^2.0.0",
|
|
29
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
30
|
+
"typescript": "^5.9.3",
|
|
31
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
32
|
+
"@types/node": "^25.0.3",
|
|
33
|
+
"@saithodev/semantic-release-backmerge": "^4.0.1",
|
|
34
|
+
"@capacitor/docgen": "^0.3.1",
|
|
35
|
+
"semantic-release": "^25.0.2",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
37
|
+
"@types/jest": "^30.0.0",
|
|
38
|
+
"@ionic/prettier-config": "^4.0.0",
|
|
39
|
+
"@ionic/eslint-config": "^0.4.0",
|
|
40
|
+
"ts-jest": "^29.4.6"
|
|
41
|
+
},
|
|
5
42
|
"main": "dist/plugin.cjs.js",
|
|
6
|
-
"module": "dist/esm/index.js",
|
|
7
|
-
"types": "dist/esm/index.d.ts",
|
|
8
|
-
"unpkg": "dist/plugin.js",
|
|
9
43
|
"files": [
|
|
10
44
|
"android/src/main/",
|
|
11
45
|
"android/build.gradle",
|
|
12
46
|
"dist/",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"contributors": [
|
|
17
|
-
{
|
|
18
|
-
"name": "Avihu Harush",
|
|
19
|
-
"email": "tchvu3@gmail.com"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "Independo GmbH",
|
|
23
|
-
"email": "admin@independo.app"
|
|
24
|
-
}
|
|
47
|
+
"IndependoCapacitorVoiceRecorder.podspec",
|
|
48
|
+
"ios/Sources",
|
|
49
|
+
"Package.swift"
|
|
25
50
|
],
|
|
26
51
|
"author": "Independo GmbH",
|
|
27
|
-
"
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "https://github.com/independo-gmbh/capacitor-voice-recorder.git"
|
|
31
|
-
},
|
|
52
|
+
"types": "dist/esm/index.d.ts",
|
|
32
53
|
"bugs": {
|
|
33
54
|
"url": "https://github.com/independo-gmbh/capacitor-voice-recorder/issues"
|
|
34
55
|
},
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
56
|
+
"scripts": {
|
|
57
|
+
"upgrade": "npx npm-check-updates -u",
|
|
58
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
59
|
+
"lint": "npm run eslint",
|
|
60
|
+
"prepublishOnly": "npm run build",
|
|
61
|
+
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
62
|
+
"verify:android": "node scripts/verify-android.js",
|
|
63
|
+
"watch": "tsc --watch",
|
|
64
|
+
"test": "jest",
|
|
65
|
+
"eslint": "eslint . --ext ts",
|
|
66
|
+
"verify:ios": "xcodebuild -scheme IndependoCapacitorVoiceRecorder -destination generic/platform=iOS",
|
|
67
|
+
"clean": "rm -rf dist",
|
|
68
|
+
"verify:web": "npm run build",
|
|
69
|
+
"swiftlint": "node-swiftlint",
|
|
70
|
+
"docgen": "docgen --api VoiceRecorderPlugin --output-readme README.md --output-json dist/docs.json",
|
|
71
|
+
"fmt": "npm run eslint -- --fix"
|
|
38
72
|
},
|
|
73
|
+
"eslintConfig": {
|
|
74
|
+
"extends": "@ionic/eslint-config/recommended"
|
|
75
|
+
},
|
|
76
|
+
"name": "@independo/capacitor-voice-recorder",
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"capacitor-blob-writer": "^1.1.19"
|
|
79
|
+
},
|
|
80
|
+
"swiftlint": "@ionic/swiftlint-config",
|
|
81
|
+
"license": "MIT",
|
|
39
82
|
"keywords": [
|
|
40
83
|
"capacitor",
|
|
41
84
|
"plugin",
|
|
@@ -47,66 +90,24 @@
|
|
|
47
90
|
"ios",
|
|
48
91
|
"android"
|
|
49
92
|
],
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"verify:android": "node scripts/verify-android.js",
|
|
54
|
-
"verify:web": "npm run build",
|
|
55
|
-
"lint": "npm run eslint",
|
|
56
|
-
"fmt": "npm run eslint -- --fix",
|
|
57
|
-
"eslint": "eslint . --ext ts",
|
|
58
|
-
"swiftlint": "node-swiftlint",
|
|
59
|
-
"test": "jest",
|
|
60
|
-
"docgen": "docgen --api VoiceRecorderPlugin --output-readme README.md --output-json dist/docs.json",
|
|
61
|
-
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
62
|
-
"clean": "rm -rf dist",
|
|
63
|
-
"watch": "tsc --watch",
|
|
64
|
-
"prepublishOnly": "npm run build",
|
|
65
|
-
"upgrade": "npx npm-check-updates -u"
|
|
66
|
-
},
|
|
67
|
-
"dependencies": {
|
|
68
|
-
"capacitor-blob-writer": "^1.1.19"
|
|
69
|
-
},
|
|
70
|
-
"devDependencies": {
|
|
71
|
-
"@capacitor/android": "^8.0.0",
|
|
72
|
-
"@capacitor/core": "^8.0.0",
|
|
73
|
-
"@capacitor/docgen": "^0.3.1",
|
|
74
|
-
"@capacitor/ios": "^8.0.0",
|
|
75
|
-
"@ionic/eslint-config": "^0.4.0",
|
|
76
|
-
"@ionic/prettier-config": "^4.0.0",
|
|
77
|
-
"@ionic/swiftlint-config": "^2.0.0",
|
|
78
|
-
"@saithodev/semantic-release-backmerge": "^4.0.1",
|
|
79
|
-
"@semantic-release/changelog": "^6.0.3",
|
|
80
|
-
"@semantic-release/git": "^10.0.1",
|
|
81
|
-
"@types/jest": "^30.0.0",
|
|
82
|
-
"@types/node": "^25.0.3",
|
|
83
|
-
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
84
|
-
"@typescript-eslint/parser": "^5.62.0",
|
|
85
|
-
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
86
|
-
"eslint": "^8.57.0",
|
|
87
|
-
"jest": "^30.2.0",
|
|
88
|
-
"jest-environment-jsdom": "^30.2.0",
|
|
89
|
-
"rollup": "^4.53.5",
|
|
90
|
-
"semantic-release": "^25.0.2",
|
|
91
|
-
"swiftlint": "^2.0.0",
|
|
92
|
-
"ts-jest": "^29.4.6",
|
|
93
|
-
"typescript": "^5.9.3"
|
|
94
|
-
},
|
|
95
|
-
"peerDependencies": {
|
|
96
|
-
"@capacitor/core": ">=8.0.0",
|
|
97
|
-
"@capacitor/filesystem": ">=8.0.0"
|
|
98
|
-
},
|
|
99
|
-
"prettier": "@ionic/prettier-config",
|
|
100
|
-
"swiftlint": "@ionic/swiftlint-config",
|
|
101
|
-
"eslintConfig": {
|
|
102
|
-
"extends": "@ionic/eslint-config/recommended"
|
|
93
|
+
"publishConfig": {
|
|
94
|
+
"provenance": true,
|
|
95
|
+
"access": "public"
|
|
103
96
|
},
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
"unpkg": "dist/plugin.js",
|
|
98
|
+
"contributors": [
|
|
99
|
+
{
|
|
100
|
+
"email": "tchvu3@gmail.com",
|
|
101
|
+
"name": "Avihu Harush"
|
|
107
102
|
},
|
|
108
|
-
|
|
109
|
-
"
|
|
103
|
+
{
|
|
104
|
+
"email": "admin@independo.app",
|
|
105
|
+
"name": "Independo GmbH"
|
|
110
106
|
}
|
|
111
|
-
|
|
107
|
+
],
|
|
108
|
+
"peerDependencies": {
|
|
109
|
+
"@capacitor/filesystem": ">=8.0.0",
|
|
110
|
+
"@capacitor/core": ">=8.0.0"
|
|
111
|
+
},
|
|
112
|
+
"module": "dist/esm/index.js"
|
|
112
113
|
}
|
package/ios/Plugin/Info.plist
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
-
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
7
|
-
<key>CFBundleExecutable</key>
|
|
8
|
-
<string>$(EXECUTABLE_NAME)</string>
|
|
9
|
-
<key>CFBundleIdentifier</key>
|
|
10
|
-
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
11
|
-
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
-
<string>6.0</string>
|
|
13
|
-
<key>CFBundleName</key>
|
|
14
|
-
<string>$(PRODUCT_NAME)</string>
|
|
15
|
-
<key>CFBundlePackageType</key>
|
|
16
|
-
<string>FMWK</string>
|
|
17
|
-
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>1.0</string>
|
|
19
|
-
<key>CFBundleVersion</key>
|
|
20
|
-
<string>$(CURRENT_PROJECT_VERSION)</string>
|
|
21
|
-
<key>NSPrincipalClass</key>
|
|
22
|
-
<string></string>
|
|
23
|
-
</dict>
|
|
24
|
-
</plist>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
|
|
3
|
-
//! Project version number for Plugin.
|
|
4
|
-
FOUNDATION_EXPORT double PluginVersionNumber;
|
|
5
|
-
|
|
6
|
-
//! Project version string for Plugin.
|
|
7
|
-
FOUNDATION_EXPORT const unsigned char PluginVersionString[];
|
|
8
|
-
|
|
9
|
-
// In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
|
|
10
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
#import <Capacitor/Capacitor.h>
|
|
3
|
-
|
|
4
|
-
// Define the plugin using the CAP_PLUGIN Macro, and
|
|
5
|
-
// each method the plugin supports using the CAP_PLUGIN_METHOD macro.
|
|
6
|
-
CAP_PLUGIN(VoiceRecorder, "VoiceRecorder",
|
|
7
|
-
CAP_PLUGIN_METHOD(canDeviceVoiceRecord, CAPPluginReturnPromise);
|
|
8
|
-
CAP_PLUGIN_METHOD(requestAudioRecordingPermission, CAPPluginReturnPromise);
|
|
9
|
-
CAP_PLUGIN_METHOD(hasAudioRecordingPermission, CAPPluginReturnPromise);
|
|
10
|
-
CAP_PLUGIN_METHOD(startRecording, CAPPluginReturnPromise);
|
|
11
|
-
CAP_PLUGIN_METHOD(stopRecording, CAPPluginReturnPromise);
|
|
12
|
-
CAP_PLUGIN_METHOD(pauseRecording, CAPPluginReturnPromise);
|
|
13
|
-
CAP_PLUGIN_METHOD(resumeRecording, CAPPluginReturnPromise);
|
|
14
|
-
CAP_PLUGIN_METHOD(getCurrentStatus, CAPPluginReturnPromise);
|
|
15
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|