@hanwha-ss1/plugin 0.7.0-beta.2 → 0.7.1
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/HanwhaSs1Plugin.podspec +4 -1
- package/android/src/main/java/com/plugin/download/FileDownload.java +142 -0
- package/android/src/main/java/com/plugin/linker/LinkerPlugin.java +55 -1
- package/dist/esm/definitions.d.ts +23 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +12 -0
- package/dist/esm/web.js +9 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +9 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +9 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Download/DownloadPlugin.swift +72 -27
- package/ios/Plugin/Keyboard/KeyboardMenu.swift +128 -0
- package/ios/Plugin/Keyboard/KeyboardMenuPlugin.swift +50 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/Contents.json +6 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/collabo-link.imageset/Contents.json +21 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/collabo-link.imageset/icon-collabo-link.svg +12 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/file.imageset/Contents.json +21 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/file.imageset/icon-file.svg +3 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/img.imageset/Contents.json +21 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/img.imageset/icon-img.svg +3 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/todo.imageset/Contents.json +21 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/todo.imageset/icon-todo.svg +4 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/url-link.imageset/Contents.json +21 -0
- package/ios/Plugin/Keyboard/menu-icons.xcassets/url-link.imageset/icon-url-link.svg +3 -0
- package/ios/Plugin/Plugin.m +3 -0
- package/ios/Plugin/Plugin.swift +35 -5
- package/package.json +1 -1
package/HanwhaSs1Plugin.podspec
CHANGED
|
@@ -10,7 +10,10 @@ 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/Plugin/**/*.{swift,h,m,c,cc,mm,cpp,xib,
|
|
13
|
+
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp,xib,png}'
|
|
14
|
+
s.resource_bundles = {
|
|
15
|
+
'KeyboardMenuIcon' => ['ios/Plugin/Keyboard/*.xcassets']
|
|
16
|
+
}
|
|
14
17
|
s.ios.deployment_target = '12.0'
|
|
15
18
|
s.dependency 'Capacitor'
|
|
16
19
|
s.swift_version = '5.1'
|
|
@@ -12,9 +12,27 @@ import java.io.File;
|
|
|
12
12
|
import java.io.FileOutputStream;
|
|
13
13
|
import java.io.IOException;
|
|
14
14
|
import java.io.OutputStream;
|
|
15
|
+
import java.io.RandomAccessFile;
|
|
15
16
|
import java.net.URLConnection;
|
|
17
|
+
import java.util.concurrent.ConcurrentHashMap;
|
|
16
18
|
|
|
17
19
|
public class FileDownload {
|
|
20
|
+
|
|
21
|
+
// 청크 다운로드를 위한 임시 파일 관리
|
|
22
|
+
private static final ConcurrentHashMap<String, ChunkDownloadInfo> chunkDownloads = new ConcurrentHashMap<>();
|
|
23
|
+
|
|
24
|
+
private static class ChunkDownloadInfo {
|
|
25
|
+
File tempFile;
|
|
26
|
+
int totalChunks;
|
|
27
|
+
int receivedChunks;
|
|
28
|
+
RandomAccessFile randomAccessFile;
|
|
29
|
+
|
|
30
|
+
ChunkDownloadInfo(File tempFile, int totalChunks) {
|
|
31
|
+
this.tempFile = tempFile;
|
|
32
|
+
this.totalChunks = totalChunks;
|
|
33
|
+
this.receivedChunks = 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
18
36
|
|
|
19
37
|
public String echo(String value) {
|
|
20
38
|
Log.i("Echo", value);
|
|
@@ -36,6 +54,79 @@ public class FileDownload {
|
|
|
36
54
|
}
|
|
37
55
|
}
|
|
38
56
|
|
|
57
|
+
public void downloadChunk(Activity activity, String fileName, String chunkData, int chunkIndex, int totalChunks, boolean isLastChunk, OnResult result) {
|
|
58
|
+
try {
|
|
59
|
+
// Base64 디코딩
|
|
60
|
+
byte[] decodedChunk = android.util.Base64.decode(chunkData, android.util.Base64.DEFAULT);
|
|
61
|
+
|
|
62
|
+
// 첫 번째 청크인 경우 임시 파일 생성
|
|
63
|
+
if (chunkIndex == 0) {
|
|
64
|
+
File tempDir = new File(activity.getCacheDir(), "chunk_downloads");
|
|
65
|
+
if (!tempDir.exists()) {
|
|
66
|
+
tempDir.mkdirs();
|
|
67
|
+
}
|
|
68
|
+
File tempFile = new File(tempDir, fileName + ".tmp");
|
|
69
|
+
|
|
70
|
+
ChunkDownloadInfo downloadInfo = new ChunkDownloadInfo(tempFile, totalChunks);
|
|
71
|
+
try {
|
|
72
|
+
downloadInfo.randomAccessFile = new RandomAccessFile(tempFile, "rw");
|
|
73
|
+
chunkDownloads.put(fileName, downloadInfo);
|
|
74
|
+
} catch (IOException e) {
|
|
75
|
+
if (result != null) {
|
|
76
|
+
result.onFail("임시 파일 생성 실패: " + e.getMessage());
|
|
77
|
+
}
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
ChunkDownloadInfo downloadInfo = chunkDownloads.get(fileName);
|
|
83
|
+
if (downloadInfo == null) {
|
|
84
|
+
if (result != null) {
|
|
85
|
+
result.onFail("청크 다운로드 정보를 찾을 수 없습니다.");
|
|
86
|
+
}
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// 청크 데이터를 파일에 쓰기
|
|
91
|
+
synchronized (downloadInfo) {
|
|
92
|
+
try {
|
|
93
|
+
downloadInfo.randomAccessFile.write(decodedChunk);
|
|
94
|
+
downloadInfo.receivedChunks++;
|
|
95
|
+
|
|
96
|
+
// 모든 청크를 받았거나 마지막 청크인 경우
|
|
97
|
+
if (isLastChunk || downloadInfo.receivedChunks >= downloadInfo.totalChunks) {
|
|
98
|
+
downloadInfo.randomAccessFile.close();
|
|
99
|
+
|
|
100
|
+
// 최종 파일로 이동
|
|
101
|
+
String finalPath = moveToFinalLocation(activity, downloadInfo.tempFile, fileName);
|
|
102
|
+
|
|
103
|
+
// 정리
|
|
104
|
+
chunkDownloads.remove(fileName);
|
|
105
|
+
downloadInfo.tempFile.delete();
|
|
106
|
+
|
|
107
|
+
if (result != null) {
|
|
108
|
+
result.onSuccess(finalPath);
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
// 중간 청크 완료
|
|
112
|
+
if (result != null) {
|
|
113
|
+
result.onSuccess("청크 " + chunkIndex + " 완료");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
} catch (IOException e) {
|
|
117
|
+
if (result != null) {
|
|
118
|
+
result.onFail("청크 쓰기 실패: " + e.getMessage());
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
} catch (Exception e) {
|
|
124
|
+
if (result != null) {
|
|
125
|
+
result.onFail("청크 다운로드 실패: " + e.getMessage());
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
39
130
|
|
|
40
131
|
private void fileDownload(Activity activity, String param, OnResult result){
|
|
41
132
|
|
|
@@ -127,4 +218,55 @@ public class FileDownload {
|
|
|
127
218
|
}
|
|
128
219
|
}
|
|
129
220
|
}
|
|
221
|
+
|
|
222
|
+
private String moveToFinalLocation(Activity activity, File tempFile, String fileName) throws IOException {
|
|
223
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
|
224
|
+
ContentValues values = new ContentValues();
|
|
225
|
+
String mimeType = URLConnection.guessContentTypeFromName(fileName);
|
|
226
|
+
|
|
227
|
+
Uri uri;
|
|
228
|
+
if (null != mimeType &&
|
|
229
|
+
(mimeType.contains("image") || mimeType.contains("video"))) {
|
|
230
|
+
uri = MediaStore.Downloads.EXTERNAL_CONTENT_URI;
|
|
231
|
+
} else {
|
|
232
|
+
uri = MediaStore.Downloads.EXTERNAL_CONTENT_URI;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
values.put(MediaStore.Downloads.DISPLAY_NAME, fileName);
|
|
236
|
+
values.put(MediaStore.Downloads.MIME_TYPE, mimeType != null ? mimeType : "application/octet-stream");
|
|
237
|
+
values.put(MediaStore.Downloads.RELATIVE_PATH, Environment.DIRECTORY_DOWNLOADS);
|
|
238
|
+
|
|
239
|
+
Uri insertedUri = activity.getContentResolver().insert(uri, values);
|
|
240
|
+
if (insertedUri != null) {
|
|
241
|
+
try (OutputStream out = activity.getContentResolver().openOutputStream(insertedUri);
|
|
242
|
+
java.io.FileInputStream in = new java.io.FileInputStream(tempFile)) {
|
|
243
|
+
|
|
244
|
+
byte[] buffer = new byte[8192];
|
|
245
|
+
int bytesRead;
|
|
246
|
+
while ((bytesRead = in.read(buffer)) != -1) {
|
|
247
|
+
out.write(buffer, 0, bytesRead);
|
|
248
|
+
}
|
|
249
|
+
out.flush();
|
|
250
|
+
}
|
|
251
|
+
return insertedUri.toString();
|
|
252
|
+
} else {
|
|
253
|
+
throw new IOException("파일 생성 실패");
|
|
254
|
+
}
|
|
255
|
+
} else {
|
|
256
|
+
File downloadDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
|
|
257
|
+
File finalFile = new File(downloadDir, fileName);
|
|
258
|
+
|
|
259
|
+
try (java.io.FileInputStream in = new java.io.FileInputStream(tempFile);
|
|
260
|
+
FileOutputStream out = new FileOutputStream(finalFile)) {
|
|
261
|
+
|
|
262
|
+
byte[] buffer = new byte[8192];
|
|
263
|
+
int bytesRead;
|
|
264
|
+
while ((bytesRead = in.read(buffer)) != -1) {
|
|
265
|
+
out.write(buffer, 0, bytesRead);
|
|
266
|
+
}
|
|
267
|
+
out.flush();
|
|
268
|
+
}
|
|
269
|
+
return finalFile.getAbsolutePath();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
130
272
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
package com.plugin.linker;
|
|
2
2
|
|
|
3
|
+
import android.os.Handler;
|
|
4
|
+
import android.os.Looper;
|
|
5
|
+
import android.os.Message;
|
|
6
|
+
|
|
3
7
|
import com.getcapacitor.JSObject;
|
|
4
8
|
import com.getcapacitor.Plugin;
|
|
5
9
|
import com.getcapacitor.PluginCall;
|
|
@@ -11,7 +15,6 @@ import com.plugin.download.FileDownload;
|
|
|
11
15
|
import com.plugin.openbrowser.OpenBrowser;
|
|
12
16
|
import com.plugin.opencamera.OpenCamera;
|
|
13
17
|
|
|
14
|
-
|
|
15
18
|
@CapacitorPlugin(name = "Plugin")
|
|
16
19
|
public class LinkerPlugin extends Plugin{
|
|
17
20
|
private Linker implementation = new Linker();
|
|
@@ -157,4 +160,55 @@ public class LinkerPlugin extends Plugin{
|
|
|
157
160
|
}
|
|
158
161
|
});
|
|
159
162
|
}
|
|
163
|
+
|
|
164
|
+
@PluginMethod
|
|
165
|
+
public void fileDownloadChunk(PluginCall call) {
|
|
166
|
+
String fileName = call.getString("fileName");
|
|
167
|
+
String chunkData = call.getString("chunkData");
|
|
168
|
+
Integer chunkIndex = call.getInt("chunkIndex");
|
|
169
|
+
Integer totalChunks = call.getInt("totalChunks");
|
|
170
|
+
Boolean isLastChunk = call.getBoolean("isLastChunk");
|
|
171
|
+
|
|
172
|
+
if(fileDownloadImplementation == null) {
|
|
173
|
+
fileDownloadImplementation = new FileDownload();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
fileDownloadImplementation.downloadChunk(getActivity(), fileName, chunkData,
|
|
177
|
+
chunkIndex != null ? chunkIndex : 0,
|
|
178
|
+
totalChunks != null ? totalChunks : 1,
|
|
179
|
+
isLastChunk != null ? isLastChunk : false,
|
|
180
|
+
new FileDownload.OnResult() {
|
|
181
|
+
@Override
|
|
182
|
+
public void onSuccess(String path) {
|
|
183
|
+
JSObject ret = new JSObject();
|
|
184
|
+
ret.put("result", true);
|
|
185
|
+
ret.put("message", "청크 다운로드 완료");
|
|
186
|
+
call.resolve(ret);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@Override
|
|
190
|
+
public void onFail(String message) {
|
|
191
|
+
JSObject ret = new JSObject();
|
|
192
|
+
ret.put("result", false);
|
|
193
|
+
ret.put("message", message);
|
|
194
|
+
call.resolve(ret);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
public void handleDocumentsViewer(String filePath) {
|
|
200
|
+
Handler handler = new Handler(Looper.getMainLooper()) {
|
|
201
|
+
@Override
|
|
202
|
+
public void handleMessage(Message msg) {
|
|
203
|
+
if(hasListeners("DocumentViewer")) {
|
|
204
|
+
JSObject data = new JSObject();
|
|
205
|
+
data.put("file", filePath);
|
|
206
|
+
notifyListeners("DocumentViewer", data);
|
|
207
|
+
} else {
|
|
208
|
+
sendEmptyMessageDelayed(-1, 200);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
handler.sendEmptyMessage(-1);
|
|
213
|
+
}
|
|
160
214
|
}
|
|
@@ -78,6 +78,24 @@ export interface Plugin {
|
|
|
78
78
|
}): Promise<{
|
|
79
79
|
value: string;
|
|
80
80
|
}>;
|
|
81
|
+
/**
|
|
82
|
+
* 파일 청크 다운로드
|
|
83
|
+
* @param options fileName : 파일명
|
|
84
|
+
* @param options chunkData : 청크 데이터 (base64)
|
|
85
|
+
* @param options chunkIndex : 청크 인덱스
|
|
86
|
+
* @param options totalChunks : 전체 청크 수
|
|
87
|
+
* @param options isLastChunk : 마지막 청크 여부
|
|
88
|
+
*/
|
|
89
|
+
fileDownloadChunk(options: {
|
|
90
|
+
fileName: string;
|
|
91
|
+
chunkData: string;
|
|
92
|
+
chunkIndex: number;
|
|
93
|
+
totalChunks: number;
|
|
94
|
+
isLastChunk: boolean;
|
|
95
|
+
}): Promise<{
|
|
96
|
+
result: boolean;
|
|
97
|
+
message: string;
|
|
98
|
+
}>;
|
|
81
99
|
/**
|
|
82
100
|
* iOS 캡쳐 방지
|
|
83
101
|
* @see default false
|
|
@@ -87,4 +105,9 @@ export interface Plugin {
|
|
|
87
105
|
}): Promise<{
|
|
88
106
|
value: string;
|
|
89
107
|
}>;
|
|
108
|
+
/**
|
|
109
|
+
* iOS 키보드 메뉴 바
|
|
110
|
+
*/
|
|
111
|
+
addKeyboardMenu(): any;
|
|
112
|
+
removeKeyboardMenu(): any;
|
|
90
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface Plugin {\n /**\n * 앱 실행\n * @param options package : 패키지명\n */\n executeApp(options: {\n package: string;\n }): Promise<{ value: string }>;\n\n /**\n * 연락처 저장\n * @param options name : 성명\n * @param options phone : 전화번호\n * @param options email : 이메일\n * @param options dept : 소속\n * @param options ext : 내선번호\n */\n addContact(options: {\n name: string;\n phone: string;\n email: string;\n dept: string;\n ext: string;\n }): Promise<{ value: string }>;\n\n /**\n * TouchID, FaceID\n */\n auth(): Promise<{ value: string }>;\n\n /**\n * 시스템에 설정된 지역이 서울인지 확인\n */\n checkSeoulTimeZone(): Promise<{ value: string }>;\n\n timezone(): Promise<{ value: string }>;\n\n /**\n *\n * @param options url : \"웹 페이지 주소\"\n * @param options ext : false(내부 웹뷰), true(외부 브라우저)\n */\n open(options: { url: string; ext: boolean; isCloseBtn?: boolean; clear?: boolean }): Promise<{ value: string }>;\n\n /**\n * EdgeSwipe 허용\n * @see default false\n */\n edgeSwipe(options: {on: boolean}): Promise<{ value: string }>;\n\n\n /**\n * 카메라앱 열기\n * @see default false\n */\n openCamera(): Promise<{ value: string }>;\n\n\n /**\n * 파일 다운로드\n * @see default false\n */\n fileDownload(options: {file: string; }): Promise<{ value: string }>;\n\n /**\n * iOS 캡쳐 방지\n * @see default false\n */\n doDisabledCapture(options: {disabled: boolean; }): Promise<{ value: string }>;\n
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface Plugin {\n /**\n * 앱 실행\n * @param options package : 패키지명\n */\n executeApp(options: {\n package: string;\n }): Promise<{ value: string }>;\n\n /**\n * 연락처 저장\n * @param options name : 성명\n * @param options phone : 전화번호\n * @param options email : 이메일\n * @param options dept : 소속\n * @param options ext : 내선번호\n */\n addContact(options: {\n name: string;\n phone: string;\n email: string;\n dept: string;\n ext: string;\n }): Promise<{ value: string }>;\n\n /**\n * TouchID, FaceID\n */\n auth(): Promise<{ value: string }>;\n\n /**\n * 시스템에 설정된 지역이 서울인지 확인\n */\n checkSeoulTimeZone(): Promise<{ value: string }>;\n\n timezone(): Promise<{ value: string }>;\n\n /**\n *\n * @param options url : \"웹 페이지 주소\"\n * @param options ext : false(내부 웹뷰), true(외부 브라우저)\n */\n open(options: { url: string; ext: boolean; isCloseBtn?: boolean; clear?: boolean }): Promise<{ value: string }>;\n\n /**\n * EdgeSwipe 허용\n * @see default false\n */\n edgeSwipe(options: {on: boolean}): Promise<{ value: string }>;\n\n\n /**\n * 카메라앱 열기\n * @see default false\n */\n openCamera(): Promise<{ value: string }>;\n\n\n /**\n * 파일 다운로드\n * @see default false\n */\n fileDownload(options: {file: string; }): Promise<{ value: string }>;\n\n /**\n * 파일 청크 다운로드\n * @param options fileName : 파일명\n * @param options chunkData : 청크 데이터 (base64)\n * @param options chunkIndex : 청크 인덱스\n * @param options totalChunks : 전체 청크 수\n * @param options isLastChunk : 마지막 청크 여부\n */\n fileDownloadChunk(options: {\n fileName: string;\n chunkData: string;\n chunkIndex: number;\n totalChunks: number;\n isLastChunk: boolean;\n }): Promise<{ result: boolean; message: string }>;\n\n /**\n * iOS 캡쳐 방지\n * @see default false\n */\n doDisabledCapture(options: {disabled: boolean; }): Promise<{ value: string }>;\n /**\n * iOS 키보드 메뉴 바\n */\n addKeyboardMenu():any;\n removeKeyboardMenu():any;\n}"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type { Plugin } from './definitions';
|
|
|
3
3
|
export declare class PluginWeb extends WebPlugin implements Plugin {
|
|
4
4
|
executeApp(): Promise<any>;
|
|
5
5
|
addContact(): Promise<any>;
|
|
6
|
+
addKeyboardMenu(): any;
|
|
7
|
+
removeKeyboardMenu(): any;
|
|
6
8
|
auth(): Promise<any>;
|
|
7
9
|
checkSeoulTimeZone(): Promise<any>;
|
|
8
10
|
timezone(): Promise<any>;
|
|
@@ -19,6 +21,16 @@ export declare class PluginWeb extends WebPlugin implements Plugin {
|
|
|
19
21
|
fileDownload(_options: {
|
|
20
22
|
file: string;
|
|
21
23
|
}): Promise<any>;
|
|
24
|
+
fileDownloadChunk(_options: {
|
|
25
|
+
fileName: string;
|
|
26
|
+
chunkData: string;
|
|
27
|
+
chunkIndex: number;
|
|
28
|
+
totalChunks: number;
|
|
29
|
+
isLastChunk: boolean;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
result: boolean;
|
|
32
|
+
message: string;
|
|
33
|
+
}>;
|
|
22
34
|
doDisabledCapture(_options: {
|
|
23
35
|
disabled: boolean;
|
|
24
36
|
}): Promise<any>;
|
package/dist/esm/web.js
CHANGED
|
@@ -7,6 +7,12 @@ export class PluginWeb extends WebPlugin {
|
|
|
7
7
|
async addContact() {
|
|
8
8
|
return { results: {} };
|
|
9
9
|
}
|
|
10
|
+
addKeyboardMenu() {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
removeKeyboardMenu() {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
10
16
|
async auth() {
|
|
11
17
|
return { results: {} };
|
|
12
18
|
}
|
|
@@ -31,6 +37,9 @@ export class PluginWeb extends WebPlugin {
|
|
|
31
37
|
async fileDownload(_options) {
|
|
32
38
|
return { results: {} };
|
|
33
39
|
}
|
|
40
|
+
async fileDownloadChunk(_options) {
|
|
41
|
+
return { result: true, message: '웹에서는 청크 다운로드가 지원되지 않습니다.' };
|
|
42
|
+
}
|
|
34
43
|
async doDisabledCapture(_options) {
|
|
35
44
|
if (Capacitor.getPlatform() !== 'ios') {
|
|
36
45
|
return Promise.reject('doDisabledCapture is only supported on iOS.');
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAGrD,MAAM,OAAO,SAAU,SAAQ,SAAS;IAEtC,KAAK,CAAC,UAAU;QACd,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,UAAU;QACd,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,IAAI;QACR,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAA8E;QACvF,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,QAAyB;QACvC,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACrC,OAAO,OAAO,CAAC,MAAM,CAAC,qCAAqC,CAAC,CAAC;SAC9D;QACD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,UAAU;QACd,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAAyB;QAC1C,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,QAA8B;QACpD,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACrC,OAAO,OAAO,CAAC,MAAM,CAAC,6CAA6C,CAAC,CAAC;SACtE;QACD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {Capacitor, WebPlugin} from '@capacitor/core';\nimport type {Plugin} from './definitions';\n\nexport class PluginWeb extends WebPlugin implements Plugin {\n\n async executeApp(): Promise<any> {\n return { results: {} };\n }\n\n async addContact(): Promise<any> {\n return { results: {} };\n }\n\n async auth(): Promise<any> {\n return { results: {} };\n }\n\n async checkSeoulTimeZone(): Promise<any> {\n return { results: {} };\n }\n\n async timezone(): Promise<any> {\n return { results: {} };\n }\n\n async open(_options: { url: string, ext: boolean, isCloseBtn?: boolean; clear?: boolean }): Promise<any> {\n return { results: {} };\n }\n\n async edgeSwipe(_options: { on: boolean }): Promise<any> {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('edgeSwipe is only supported on iOS.');\n }\n return { results: {} };\n }\n\n async openCamera(): Promise<any> {\n return { results: {} };\n }\n\n async fileDownload(_options: { file: string}): Promise<any> {\n return { results: {} };\n }\n\n async doDisabledCapture(_options: { disabled: boolean}): Promise<any> {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('doDisabledCapture is only supported on iOS.');\n }\n return { results: {} };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAC,SAAS,EAAE,SAAS,E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EAAE,KAAK,KAAK,EAAE;YACrC,OAAO,OAAO,CAAC,MAAM,CAAC,6CAA6C,CAAC,CAAC;SACtE;QACD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {Capacitor, WebPlugin} from '@capacitor/core';\nimport type {Plugin} from './definitions';\n\nexport class PluginWeb extends WebPlugin implements Plugin {\n\n async executeApp(): Promise<any> {\n return { results: {} };\n }\n\n async addContact(): Promise<any> {\n return { results: {} };\n }\n addKeyboardMenu():any {\n return;\n }\n removeKeyboardMenu():any {\n return;\n }\n\n async auth(): Promise<any> {\n return { results: {} };\n }\n\n async checkSeoulTimeZone(): Promise<any> {\n return { results: {} };\n }\n\n async timezone(): Promise<any> {\n return { results: {} };\n }\n\n async open(_options: { url: string, ext: boolean, isCloseBtn?: boolean; clear?: boolean }): Promise<any> {\n return { results: {} };\n }\n\n async edgeSwipe(_options: { on: boolean }): Promise<any> {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('edgeSwipe is only supported on iOS.');\n }\n return { results: {} };\n }\n\n async openCamera(): Promise<any> {\n return { results: {} };\n }\n\n async fileDownload(_options: { file: string}): Promise<any> {\n return { results: {} };\n }\n\n async fileDownloadChunk(_options: {\n fileName: string;\n chunkData: string;\n chunkIndex: number;\n totalChunks: number;\n isLastChunk: boolean;\n }): Promise<{ result: boolean; message: string }> {\n return { result: true, message: '웹에서는 청크 다운로드가 지원되지 않습니다.' };\n }\n\n async doDisabledCapture(_options: { disabled: boolean}): Promise<any> {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('doDisabledCapture is only supported on iOS.');\n }\n return { results: {} };\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -16,6 +16,12 @@ class PluginWeb extends core.WebPlugin {
|
|
|
16
16
|
async addContact() {
|
|
17
17
|
return { results: {} };
|
|
18
18
|
}
|
|
19
|
+
addKeyboardMenu() {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
removeKeyboardMenu() {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
19
25
|
async auth() {
|
|
20
26
|
return { results: {} };
|
|
21
27
|
}
|
|
@@ -40,6 +46,9 @@ class PluginWeb extends core.WebPlugin {
|
|
|
40
46
|
async fileDownload(_options) {
|
|
41
47
|
return { results: {} };
|
|
42
48
|
}
|
|
49
|
+
async fileDownloadChunk(_options) {
|
|
50
|
+
return { result: true, message: '웹에서는 청크 다운로드가 지원되지 않습니다.' };
|
|
51
|
+
}
|
|
43
52
|
async doDisabledCapture(_options) {
|
|
44
53
|
if (core.Capacitor.getPlatform() !== 'ios') {
|
|
45
54
|
return Promise.reject('doDisabledCapture is only supported on iOS.');
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HanwhaPlugin = registerPlugin('Plugin', {\n web: () => import('./web').then(m => new m.PluginWeb()),\n});\nexport * from './definitions';\nexport { HanwhaPlugin };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { Capacitor, WebPlugin } from '@capacitor/core';\nexport class PluginWeb extends WebPlugin {\n async executeApp() {\n return { results: {} };\n }\n async addContact() {\n return { results: {} };\n }\n async auth() {\n return { results: {} };\n }\n async checkSeoulTimeZone() {\n return { results: {} };\n }\n async timezone() {\n return { results: {} };\n }\n async open(_options) {\n return { results: {} };\n }\n async edgeSwipe(_options) {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('edgeSwipe is only supported on iOS.');\n }\n return { results: {} };\n }\n async openCamera() {\n return { results: {} };\n }\n async fileDownload(_options) {\n return { results: {} };\n }\n async doDisabledCapture(_options) {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('doDisabledCapture is only supported on iOS.');\n }\n return { results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/B,KAAK;AACL,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;AACjC,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,MAAM,iBAAiB,CAAC,QAAQ,EAAE;AACtC,QAAQ,IAAIA,cAAS,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;AAC/C,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,6CAA6C,CAAC,CAAC;AACjF,SAAS;AACT,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HanwhaPlugin = registerPlugin('Plugin', {\n web: () => import('./web').then(m => new m.PluginWeb()),\n});\nexport * from './definitions';\nexport { HanwhaPlugin };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { Capacitor, WebPlugin } from '@capacitor/core';\nexport class PluginWeb extends WebPlugin {\n async executeApp() {\n return { results: {} };\n }\n async addContact() {\n return { results: {} };\n }\n addKeyboardMenu() {\n return;\n }\n removeKeyboardMenu() {\n return;\n }\n async auth() {\n return { results: {} };\n }\n async checkSeoulTimeZone() {\n return { results: {} };\n }\n async timezone() {\n return { results: {} };\n }\n async open(_options) {\n return { results: {} };\n }\n async edgeSwipe(_options) {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('edgeSwipe is only supported on iOS.');\n }\n return { results: {} };\n }\n async openCamera() {\n return { results: {} };\n }\n async fileDownload(_options) {\n return { results: {} };\n }\n async fileDownloadChunk(_options) {\n return { result: true, message: '웹에서는 청크 다운로드가 지원되지 않습니다.' };\n }\n async doDisabledCapture(_options) {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('doDisabledCapture is only supported on iOS.');\n }\n return { results: {} };\n }\n}\n//# sourceMapp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L,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;AACjC,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,MAAM,iBAAiB,CAAC,QAAQ,EAAE;AACtC,QAAQ,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;AACrE,KAAK;AACL,IAAI,MAAM,iBAAiB,CAAC,QAAQ,EAAE;AACtC,QAAQ,IAAIA,cAAS,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;AAC/C,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,6CAA6C,CAAC,CAAC;AACjF,SAAS;AACT,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAC/B,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -13,6 +13,12 @@ var capacitorContact = (function (exports, core) {
|
|
|
13
13
|
async addContact() {
|
|
14
14
|
return { results: {} };
|
|
15
15
|
}
|
|
16
|
+
addKeyboardMenu() {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
removeKeyboardMenu() {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
16
22
|
async auth() {
|
|
17
23
|
return { results: {} };
|
|
18
24
|
}
|
|
@@ -37,6 +43,9 @@ var capacitorContact = (function (exports, core) {
|
|
|
37
43
|
async fileDownload(_options) {
|
|
38
44
|
return { results: {} };
|
|
39
45
|
}
|
|
46
|
+
async fileDownloadChunk(_options) {
|
|
47
|
+
return { result: true, message: '웹에서는 청크 다운로드가 지원되지 않습니다.' };
|
|
48
|
+
}
|
|
40
49
|
async doDisabledCapture(_options) {
|
|
41
50
|
if (core.Capacitor.getPlatform() !== 'ios') {
|
|
42
51
|
return Promise.reject('doDisabledCapture is only supported on iOS.');
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst HanwhaPlugin = registerPlugin('Plugin', {\n web: () => import('./web').then(m => new m.PluginWeb()),\n});\nexport * from './definitions';\nexport { HanwhaPlugin };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { Capacitor, WebPlugin } from '@capacitor/core';\nexport class PluginWeb extends WebPlugin {\n async executeApp() {\n return { results: {} };\n }\n async addContact() {\n return { results: {} };\n }\n async auth() {\n return { results: {} };\n }\n async checkSeoulTimeZone() {\n return { results: {} };\n }\n async timezone() {\n return { results: {} };\n }\n async open(_options) {\n return { results: {} };\n }\n async edgeSwipe(_options) {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('edgeSwipe is only supported on iOS.');\n }\n return { results: {} };\n }\n async openCamera() {\n return { results: {} };\n }\n async fileDownload(_options) {\n return { results: {} };\n }\n async doDisabledCapture(_options) {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('doDisabledCapture is only supported on iOS.');\n }\n return { results: {} };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","Capacitor"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,QAAQ,EAAE;IAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3D,CAAC;;ICHD;IAEO,MAAM,SAAS,SAASC,cAAS,CAAC;IACzC,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IACL,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IAC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st HanwhaPlugin = registerPlugin('Plugin', {\n web: () => import('./web').then(m => new m.PluginWeb()),\n});\nexport * from './definitions';\nexport { HanwhaPlugin };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { Capacitor, WebPlugin } from '@capacitor/core';\nexport class PluginWeb extends WebPlugin {\n async executeApp() {\n return { results: {} };\n }\n async addContact() {\n return { results: {} };\n }\n addKeyboardMenu() {\n return;\n }\n removeKeyboardMenu() {\n return;\n }\n async auth() {\n return { results: {} };\n }\n async checkSeoulTimeZone() {\n return { results: {} };\n }\n async timezone() {\n return { results: {} };\n }\n async open(_options) {\n return { results: {} };\n }\n async edgeSwipe(_options) {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('edgeSwipe is only supported on iOS.');\n }\n return { results: {} };\n }\n async openCamera() {\n return { results: {} };\n }\n async fileDownload(_options) {\n return { results: {} };\n }\n async fileDownloadChunk(_options) {\n return { result: true, message: '웹에서는 청크 다운로드가 지원되지 않습니다.' };\n }\n async doDisabledCapture(_options) {\n if (Capacitor.getPlatform() !== 'ios') {\n return Promise.reject('doDisabledCapture is only supported on iOS.');\n }\n return { results: {} };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","Capacitor"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,QAAQ,EAAE;IAC9C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3D,CAAC;;ICHD;IAEO,MAAM,SAAS,SAASC,cAAS,CAAC;IACzC,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IACL,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IACL,IAAI,eAAe,GAAG;I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CAAC,6CAA6C,CAAC,CAAC;IACjF,SAAS;IACT,QAAQ,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC/B,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,49 +4,94 @@ import Capacitor
|
|
|
4
4
|
|
|
5
5
|
public class DownloadPlugin: CAPPlugin {
|
|
6
6
|
|
|
7
|
-
@objc public func doDownload(_ call: CAPPluginCall,
|
|
7
|
+
@objc public func doDownload(_ call: CAPPluginCall, _ bridge: CAPBridgeProtocol) {
|
|
8
8
|
let body = call.getString("file") ?? ""
|
|
9
|
-
|
|
10
9
|
let aSplit = body.components(separatedBy: ";")
|
|
11
|
-
|
|
10
|
+
|
|
12
11
|
if aSplit.count > 2 {
|
|
13
12
|
let fileName = aSplit[0]
|
|
14
13
|
let sData1 = "\(aSplit[1])\(aSplit[2])"
|
|
15
14
|
let aData2 = sData1.components(separatedBy: ",")
|
|
16
15
|
|
|
17
16
|
if aData2.count > 1 {
|
|
18
|
-
let sData = aData2[1]
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
let sData = aData2[1] // Base64 본문만 추출
|
|
18
|
+
|
|
19
|
+
// 저장 경로
|
|
20
|
+
let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
|
|
21
|
+
let documentsDirectory = paths[0]
|
|
22
|
+
let filePath = documentsDirectory.appendingPathComponent(fileName)
|
|
23
|
+
|
|
24
|
+
DispatchQueue.global(qos: .userInitiated).async {
|
|
25
|
+
let success = self.decodeBase64ToFile(base64: sData, fileURL: filePath)
|
|
24
26
|
|
|
25
|
-
DispatchQueue.global(qos: .userInitiated).async {
|
|
26
|
-
do {
|
|
27
|
-
try data.write(to: filePath)
|
|
28
|
-
DispatchQueue.main.async {
|
|
29
|
-
call.resolve([
|
|
30
|
-
"result": true,
|
|
31
|
-
])
|
|
32
|
-
}
|
|
33
|
-
} catch {
|
|
34
|
-
DispatchQueue.main.async {
|
|
35
|
-
call.resolve([
|
|
36
|
-
"result": false,
|
|
37
|
-
])
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
} else {
|
|
42
27
|
DispatchQueue.main.async {
|
|
43
28
|
call.resolve([
|
|
44
|
-
"result":
|
|
29
|
+
"result": success
|
|
45
30
|
])
|
|
46
31
|
}
|
|
47
32
|
}
|
|
48
33
|
}
|
|
49
34
|
}
|
|
50
35
|
}
|
|
36
|
+
|
|
37
|
+
/// 대용량 Base64 문자열을 스트리밍 방식으로 파일로 변환
|
|
38
|
+
private func decodeBase64ToFile(base64: String, fileURL: URL) -> Bool {
|
|
39
|
+
guard let inputData = base64.data(using: .utf8) else {
|
|
40
|
+
return false
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let inputStream = InputStream(data: inputData)
|
|
44
|
+
inputStream.open()
|
|
45
|
+
|
|
46
|
+
guard let outputStream = OutputStream(url: fileURL, append: false) else {
|
|
47
|
+
return false
|
|
48
|
+
}
|
|
49
|
+
outputStream.open()
|
|
50
|
+
|
|
51
|
+
let bufferSize = 1024 * 64 // 64KB 단위 처리
|
|
52
|
+
let buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: bufferSize)
|
|
53
|
+
|
|
54
|
+
var base64Buffer = Data()
|
|
55
|
+
var success = true
|
|
56
|
+
|
|
57
|
+
while inputStream.hasBytesAvailable {
|
|
58
|
+
let read = inputStream.read(buffer, maxLength: bufferSize)
|
|
59
|
+
if read > 0 {
|
|
60
|
+
base64Buffer.append(buffer, count: read)
|
|
61
|
+
|
|
62
|
+
// Base64는 4의 배수 단위로 끊어서 처리 가능
|
|
63
|
+
let validLength = (base64Buffer.count / 4) * 4
|
|
64
|
+
if validLength > 0 {
|
|
65
|
+
let chunk = base64Buffer.prefix(validLength)
|
|
66
|
+
base64Buffer.removeFirst(validLength)
|
|
67
|
+
|
|
68
|
+
if let decoded = Data(base64Encoded: chunk, options: .ignoreUnknownCharacters) {
|
|
69
|
+
decoded.withUnsafeBytes {
|
|
70
|
+
_ = outputStream.write($0.bindMemory(to: UInt8.self).baseAddress!, maxLength: decoded.count)
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
success = false
|
|
74
|
+
break
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
break
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// 남은 데이터 처리
|
|
83
|
+
if base64Buffer.count > 0,
|
|
84
|
+
let decoded = Data(base64Encoded: base64Buffer, options: .ignoreUnknownCharacters) {
|
|
85
|
+
decoded.withUnsafeBytes {
|
|
86
|
+
_ = outputStream.write($0.bindMemory(to: UInt8.self).baseAddress!, maxLength: decoded.count)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
buffer.deallocate()
|
|
91
|
+
inputStream.close()
|
|
92
|
+
outputStream.close()
|
|
93
|
+
|
|
94
|
+
return success
|
|
95
|
+
}
|
|
51
96
|
}
|
|
52
97
|
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import UIKit
|
|
4
|
+
import Foundation
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
protocol KeyboardMenuDelegate: AnyObject {
|
|
8
|
+
func menuTapped(_ sender: UIButton)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class KeyboardMenu: UIStackView {
|
|
12
|
+
// MARK: - Properties
|
|
13
|
+
var delegate: KeyboardMenuDelegate?
|
|
14
|
+
private var bottomConstraint: NSLayoutConstraint?
|
|
15
|
+
|
|
16
|
+
// MARK: - Initializer
|
|
17
|
+
override init(frame: CGRect) {
|
|
18
|
+
super.init(frame: frame)
|
|
19
|
+
self.setup()
|
|
20
|
+
self.setupKeyboardObservers()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
required init(coder: NSCoder) {
|
|
24
|
+
super.init(coder: coder)
|
|
25
|
+
self.setup()
|
|
26
|
+
self.setupKeyboardObservers()
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
override func didMoveToSuperview() {
|
|
30
|
+
super.didMoveToSuperview()
|
|
31
|
+
if let superview = self.superview {
|
|
32
|
+
self.bottomConstraint = self.bottomAnchor.constraint(equalTo: superview.bottomAnchor)
|
|
33
|
+
self.bottomConstraint?.isActive = true
|
|
34
|
+
self.widthAnchor.constraint(equalTo: self.superview!.widthAnchor).isActive = true
|
|
35
|
+
self.createAddButton();
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//create add button
|
|
40
|
+
func createAddButton() {
|
|
41
|
+
let imgArray = ["todo","img","file","collabo-link","url-link"];
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
for i in 0..<imgArray.count{
|
|
45
|
+
let addButton = UIButton()
|
|
46
|
+
// svg 이미지에서 file 이미지 가져와서 사용
|
|
47
|
+
|
|
48
|
+
let podBundle = Bundle(for: KeyboardMenu.self)
|
|
49
|
+
|
|
50
|
+
if let resourceBundleURL = podBundle.url(forResource: "KeyboardMenuIcon", withExtension: "bundle"),
|
|
51
|
+
let resourceBundle = Bundle(url: resourceBundleURL) {
|
|
52
|
+
let image = UIImage(named: imgArray[i], in: resourceBundle, compatibleWith: nil)
|
|
53
|
+
addButton.setImage(image, for: .normal);
|
|
54
|
+
addButton.accessibilityHint = imgArray[i];
|
|
55
|
+
addButton.backgroundColor = .white
|
|
56
|
+
addButton.addTarget(self, action: #selector(menuTapped(_:)), for: .touchUpInside)
|
|
57
|
+
self.addArrangedSubview(addButton)
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// MARK: - Setup
|
|
65
|
+
private func setup() {
|
|
66
|
+
self.axis = .horizontal
|
|
67
|
+
self.distribution = .fillEqually
|
|
68
|
+
self.spacing = 0
|
|
69
|
+
self.translatesAutoresizingMaskIntoConstraints = false
|
|
70
|
+
self.heightAnchor.constraint(equalToConstant: 66).isActive = true
|
|
71
|
+
|
|
72
|
+
// Add shadow
|
|
73
|
+
self.layer.shadowColor = UIColor.black.cgColor
|
|
74
|
+
self.layer.shadowOpacity = 0.16
|
|
75
|
+
self.layer.shadowOffset = CGSize(width: 0, height: 0)
|
|
76
|
+
self.layer.shadowRadius = 16 // 1rem = 16px
|
|
77
|
+
self.layer.masksToBounds = false
|
|
78
|
+
|
|
79
|
+
// keyboardMenu.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
|
|
80
|
+
// keyboardMenu.heightAnchor.constraint(equalToConstant: 50).isActive = true
|
|
81
|
+
//
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
self.isHidden = true;
|
|
85
|
+
// width constraint 100%
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private func setupKeyboardObservers() {
|
|
89
|
+
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
|
|
90
|
+
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@objc private func keyboardWillShow(_ notification: Notification) {
|
|
94
|
+
self.isHidden = false;
|
|
95
|
+
if let userInfo = notification.userInfo,
|
|
96
|
+
let keyboardFrame = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect,
|
|
97
|
+
let superview = self.superview {
|
|
98
|
+
let keyboardHeight = keyboardFrame.height
|
|
99
|
+
self.bottomConstraint?.constant = -keyboardHeight
|
|
100
|
+
UIView.animate(withDuration: 0.3) {
|
|
101
|
+
superview.layoutIfNeeded()
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@objc private func keyboardWillHide(_ notification: Notification) {
|
|
107
|
+
self.isHidden = true;
|
|
108
|
+
// self.removeFromSuperview();
|
|
109
|
+
|
|
110
|
+
//remove from superview
|
|
111
|
+
self.bottomConstraint?.constant = 0
|
|
112
|
+
UIView.animate(withDuration: 0.3) {
|
|
113
|
+
self.superview?.layoutIfNeeded()
|
|
114
|
+
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@IBAction func menuTapped(_ sender: UIButton) {
|
|
119
|
+
// print("menuTapped", sender.accessibilityHint!);
|
|
120
|
+
self.delegate?.menuTapped(sender)
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
deinit {
|
|
125
|
+
NotificationCenter.default.removeObserver(self)
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
import Capacitor
|
|
6
|
+
import Contacts
|
|
7
|
+
/**
|
|
8
|
+
* Please read the Capacitor iOS Plugin Development Guide
|
|
9
|
+
* here: https://capacitorjs.com/docs/plugins/ios
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
public class KeyboardMenuPlugin: CAPPlugin, KeyboardMenuDelegate {
|
|
13
|
+
func menuTapped(_ sender: UIButton) {
|
|
14
|
+
let name = sender.accessibilityHint!;
|
|
15
|
+
|
|
16
|
+
if let _listener = self.listener {
|
|
17
|
+
_listener.notifyListeners("keyboardMenuTapped", data: ["name":name]);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
private static var keyboardMenu: KeyboardMenu?
|
|
22
|
+
private var listener: CAPPlugin?
|
|
23
|
+
// implement remove keyboardmenu view
|
|
24
|
+
@objc func remove(_ call: CAPPluginCall) {
|
|
25
|
+
|
|
26
|
+
DispatchQueue.main.async {
|
|
27
|
+
if let menu = KeyboardMenuPlugin.keyboardMenu {
|
|
28
|
+
menu.removeFromSuperview()
|
|
29
|
+
KeyboardMenuPlugin.keyboardMenu = nil
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@objc func add(_ call: CAPPluginCall, _bridge: CAPBridgeProtocol, listener: CAPPlugin) {
|
|
37
|
+
self.listener = listener;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
DispatchQueue.main.async {
|
|
41
|
+
KeyboardMenuPlugin.keyboardMenu = KeyboardMenu(frame: CGRectZero)
|
|
42
|
+
KeyboardMenuPlugin.keyboardMenu?.delegate = self;
|
|
43
|
+
|
|
44
|
+
// add keyboard menu main view
|
|
45
|
+
_bridge.viewController!.view.addSubview(KeyboardMenuPlugin.keyboardMenu!)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"images" : [
|
|
3
|
+
{
|
|
4
|
+
"idiom" : "universal",
|
|
5
|
+
"scale" : "1x"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"idiom" : "universal",
|
|
9
|
+
"scale" : "2x"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"filename" : "icon-collabo-link.svg",
|
|
13
|
+
"idiom" : "universal",
|
|
14
|
+
"scale" : "3x"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"info" : {
|
|
18
|
+
"author" : "xcode",
|
|
19
|
+
"version" : 1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#vadub7xtna)" stroke="#AAA" stroke-width="1.6" stroke-linejoin="round">
|
|
3
|
+
<path d="M3.61 6.286A9.988 9.988 0 0 1 11.819 2c3.398 0 6.4 1.695 8.208 4.286l.364-2.857M20.39 17.714A9.989 9.989 0 0 1 12.182 22a9.988 9.988 0 0 1-8.207-4.286l-.364 2.857" stroke-linecap="round"/>
|
|
4
|
+
<path d="m6.105 9.856 5.714-4.286 5.714 4.286-5.714 4.286-5.714-4.286z"/>
|
|
5
|
+
<path d="m4.675 12.715 7.143 5.714 7.143-5.714" stroke-linecap="round"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="vadub7xtna">
|
|
9
|
+
<path fill="#fff" d="M0 0h24v24H0z"/>
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"images" : [
|
|
3
|
+
{
|
|
4
|
+
"idiom" : "universal",
|
|
5
|
+
"scale" : "1x"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"idiom" : "universal",
|
|
9
|
+
"scale" : "2x"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"filename" : "icon-file.svg",
|
|
13
|
+
"idiom" : "universal",
|
|
14
|
+
"scale" : "3x"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"info" : {
|
|
18
|
+
"author" : "xcode",
|
|
19
|
+
"version" : 1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M19.118 10.65V7.32c0-1.512 0-2.268-.289-2.846a2.674 2.674 0 0 0-1.157-1.18C17.106 3 16.365 3 14.882 3H9.235c-1.482 0-2.223 0-2.79.294a2.674 2.674 0 0 0-1.156 1.18C5 5.052 5 5.808 5 7.32v9.36c0 1.512 0 2.268.289 2.846.253.508.658.92 1.156 1.18.567.294 1.308.294 2.79.294h2.824m5.294-.9v-5.4m-2.647 2.7H20" stroke="#AAA" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"images" : [
|
|
3
|
+
{
|
|
4
|
+
"idiom" : "universal",
|
|
5
|
+
"scale" : "1x"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"idiom" : "universal",
|
|
9
|
+
"scale" : "2x"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"filename" : "icon-img.svg",
|
|
13
|
+
"idiom" : "universal",
|
|
14
|
+
"scale" : "3x"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"info" : {
|
|
18
|
+
"author" : "xcode",
|
|
19
|
+
"version" : 1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12 3.5H7.3c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2.5 5.78 2.5 6.62 2.5 8.3v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311c.642.327 1.482.327 3.162.327h9.2c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122c.102-.381.102-.846.102-1.776m-2-9v-6m-3 3h6M10 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm4.49 3.418-8.459 7.69c-.476.433-.714.649-.735.836a.5.5 0 0 0 .167.431c.142.125.463.125 1.106.125h9.387c1.44 0 2.159 0 2.724-.242a3 3 0 0 0 1.578-1.578c.242-.565.242-1.285.242-2.724 0-.484 0-.726-.053-.952a2.001 2.001 0 0 0-.374-.778c-.143-.182-.332-.333-.71-.636l-2.797-2.237c-.379-.303-.568-.454-.776-.508a1 1 0 0 0-.557.018c-.205.066-.384.23-.743.555z" stroke="#AAA" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"images" : [
|
|
3
|
+
{
|
|
4
|
+
"idiom" : "universal",
|
|
5
|
+
"scale" : "1x"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"idiom" : "universal",
|
|
9
|
+
"scale" : "2x"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"filename" : "icon-todo.svg",
|
|
13
|
+
"idiom" : "universal",
|
|
14
|
+
"scale" : "3x"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"info" : {
|
|
18
|
+
"author" : "xcode",
|
|
19
|
+
"version" : 1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M22.5 4 10.715 14.5l-2.358-2.327-1.178-1.164" stroke="#AAA" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2c1.422 0 2.775.297 4 .832" stroke="#AAA" stroke-width="1.6" stroke-linecap="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"images" : [
|
|
3
|
+
{
|
|
4
|
+
"idiom" : "universal",
|
|
5
|
+
"scale" : "1x"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"idiom" : "universal",
|
|
9
|
+
"scale" : "2x"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"filename" : "icon-url-link.svg",
|
|
13
|
+
"idiom" : "universal",
|
|
14
|
+
"scale" : "3x"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"info" : {
|
|
18
|
+
"author" : "xcode",
|
|
19
|
+
"version" : 1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="m12.688 18.197-1.377 1.377a4.869 4.869 0 0 1-6.885-6.886l1.377-1.377m12.394 1.377 1.377-1.377a4.869 4.869 0 0 0-6.886-6.885l-1.377 1.377m-2.72 9.605 6.817-6.816" stroke="#AAA" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
</svg>
|
package/ios/Plugin/Plugin.m
CHANGED
|
@@ -13,4 +13,7 @@ CAP_PLUGIN(Plugin, "Plugin",
|
|
|
13
13
|
CAP_PLUGIN_METHOD(edgeSwipe, CAPPluginReturnPromise);
|
|
14
14
|
CAP_PLUGIN_METHOD(fileDownload, CAPPluginReturnPromise);
|
|
15
15
|
CAP_PLUGIN_METHOD(doDisabledCapture, CAPPluginReturnPromise);
|
|
16
|
+
CAP_PLUGIN_METHOD(addKeyboardMenu, CAPPluginReturnPromise);
|
|
17
|
+
CAP_PLUGIN_METHOD(removeKeyboardMenu, CAPPluginReturnPromise);
|
|
18
|
+
CAP_PLUGIN_METHOD(executeApp, CAPPluginReturnPromise);
|
|
16
19
|
)
|
package/ios/Plugin/Plugin.swift
CHANGED
|
@@ -16,6 +16,20 @@ public class Plugin: CAPPlugin {
|
|
|
16
16
|
override public func load() {
|
|
17
17
|
// 문서뷰어 요청 이벤트
|
|
18
18
|
NotificationCenter.default.addObserver(self, selector: #selector(handleDocumentViewRequest(_:)), name: .documentViewRequest, object: nil)
|
|
19
|
+
|
|
20
|
+
// keyboard event
|
|
21
|
+
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboard(_:)), name: UIResponder.keyboardDidShowNotification, object: nil)
|
|
22
|
+
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboard(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
|
|
23
|
+
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboard(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
|
|
24
|
+
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboard(_:)), name: UIResponder.keyboardDidHideNotification, object: nil)
|
|
25
|
+
}
|
|
26
|
+
@objc func handleKeyboard(_ notification: Notification) {
|
|
27
|
+
|
|
28
|
+
//calc keyboard height
|
|
29
|
+
let userInfo = notification.userInfo!
|
|
30
|
+
let keyboardSize = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue.size
|
|
31
|
+
// data 매개변수에 keyboardsize를 전달
|
|
32
|
+
self.notifyListeners(notification.name.rawValue, data: ["size": keyboardSize.height])
|
|
19
33
|
}
|
|
20
34
|
|
|
21
35
|
@objc func handleDocumentViewRequest(_ notification: Notification) {
|
|
@@ -32,15 +46,31 @@ public class Plugin: CAPPlugin {
|
|
|
32
46
|
안드로이드에서만 사용
|
|
33
47
|
*/
|
|
34
48
|
@objc func executeApp(_ call: CAPPluginCall) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if let url = URL(string: call.getString("package") ?? "") {
|
|
52
|
+
DispatchQueue.main.async {
|
|
53
|
+
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
39
58
|
}
|
|
40
59
|
|
|
41
60
|
@objc func auth(_ call: CAPPluginCall) {
|
|
42
61
|
AuthPlugin().auth(call)
|
|
43
62
|
}
|
|
63
|
+
@objc func addKeyboardMenu(_ call: CAPPluginCall) {
|
|
64
|
+
|
|
65
|
+
KeyboardMenuPlugin().add(call, _bridge: self.bridge!, listener: self)
|
|
66
|
+
}
|
|
67
|
+
@objc func removeKeyboardMenu(_ call: CAPPluginCall) {
|
|
68
|
+
|
|
69
|
+
KeyboardMenuPlugin().remove(call)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
44
74
|
|
|
45
75
|
@objc func addContact(_ call: CAPPluginCall) {
|
|
46
76
|
ContactPlugin().addContact(call)
|
|
@@ -64,7 +94,7 @@ public class Plugin: CAPPlugin {
|
|
|
64
94
|
}
|
|
65
95
|
|
|
66
96
|
@objc func fileDownload(_ call: CAPPluginCall) {
|
|
67
|
-
DownloadPlugin().doDownload(call,
|
|
97
|
+
DownloadPlugin().doDownload(call, self.bridge!)
|
|
68
98
|
}
|
|
69
99
|
|
|
70
100
|
@objc func doDisabledCapture(_ call: CAPPluginCall) {
|