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

Is this plugin compatible with nativescript 8.2.3? #30

Open
r0nneberg opened this issue Apr 11, 2022 · 1 comment
Open

Is this plugin compatible with nativescript 8.2.3? #30

r0nneberg opened this issue Apr 11, 2022 · 1 comment

Comments

@r0nneberg
Copy link

No description provided.

@subjekt-iv
Copy link

subjekt-iv commented Apr 26, 2023

hey! @r0nneberg
not working on my app, nativescript-vue running in ns 8.5.1.

you can achieve the same goal with this js function:

copyToClipboard() {
if (isIOS) {
try {
const pasteboard = UIPasteboard.generalPasteboard;
pasteboard.setValueForPasteboardType(
this.text,
'public.utf8-plain-text'
);
console.log(this.text);
} catch (ex) {
console.log('Error in clipboard.setText: ' + ex);
}
} else {
const clipboardManager = Utils.ad
.getApplicationContext()
.getSystemService(android.content.Context.CLIPBOARD_SERVICE);
const clip = android.content.ClipData.newPlainText('text', this.text);
clipboardManager.setPrimaryClip(clip);
alert(this.text);
}
},

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