Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run the code on iOS #34

Closed
divakarlasrinivas opened this issue Aug 19, 2021 · 2 comments
Closed

Unable to run the code on iOS #34

divakarlasrinivas opened this issue Aug 19, 2021 · 2 comments

Comments

@divakarlasrinivas
Copy link

I am unable to run the code in Angular/Cordova for iOS version 14.6 :
Below is the stack trace

Error: The old format of this exec call has been removed (deprecated since 2.1). Change to: cordova.exec(null, null, 'Service', 'action', [ arg1, arg2 ]);
iOSExec — ios-wkwebview-exec.js:103
execProxy — ios-wkwebview-exec.js:151
(anonymous function) — preview.js:16
(anonymous function) — common.js:48
(anonymous function) — common.js:8
ZoneAwarePromise — zone-evergreen.js:960
tryNativePromise — common.js:7
wrapPromise — common.js:31
previewBase64 — preview-file.service.ts:21
openAsImage — map-info-collection.component.ts:273
openMapInSelectedFormat — map-info-collection.component.ts:215
(anonymous function) — map-info-collection.component.ts:187
generatorResume
(anonymous function) — tslib.es6.js:76
ZoneAwarePromise — zone-evergreen.js:960
__awaiter — tslib.es6.js:72
listener — events.js:50
(anonymous function) — Target.js:114:84
(anonymous function) — Composite.js:76
(anonymous function) — PluggableMap.js:902
(anonymous function) — PluggableMap.js:1177
onInvokeTask — core.js:28564
runTask — zone-evergreen.js:167
invokeTask — zone-evergreen.js:480
timer — zone-evergreen.js:2552

@mostafa-mansour1
Copy link
Owner

mostafa-mansour1 commented Aug 19, 2021

the ionic native wrapper not updated
you have two options
1- use the direct plugin

(<any>window).PreviewAnyFile.previewBase64(
        win => console.log("open status",win),
        error => console.error("open failed", error),
        'JVBERi0xLjMKJcTl8uXr.....',{mimeType:'application/pdf'}
    );

2- Manually update the wrapper from the link
https://github.com/mostafa-mansour1/previewAnyFile/files/5912855/preview-any-file.zip
node_modules/@ionic-native/preview-any-file

@mostafa-mansour1
Copy link
Owner

the ionic team merged my change, you can safely use the latest ionic native to make it work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants