We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I'm writing an application in nativescript vue where I need to pick an image on iOS Photo Library. For that I wanted to use the imagepicker plugin.
Authorization is working and I can select the pictures, but unfortunately as result I got that the uri is undefined. Here after my code :
<template> <Page @loaded="onPageLoaded"> <ActionBar title="Select Image" /> <StackLayout> <Button text="Select Image" @tap="onSelectImageTap" /> <Image v-if="selectedImage" :src="selectedImage" stretch="aspectFill" /> </StackLayout> </Page> </template> <script> import * as ImagePicker from 'nativescript-imagepicker'; export default { data() { return { selectedImage: null, imagePicker: null // Initialize imagePicker property }; }, methods: { onPageLoaded() { this.imagePicker = ImagePicker.create({ mode: 'single' // or 'multiple' }); }, async onSelectImageTap() { try { if (!this.imagePicker) { console.error('ImagePicker is not initialized.'); return; } await this.imagePicker.authorize(); const selection = await this.imagePicker.present(); console.log('Selection:', selection.map(item => ({ uri: item.uri }))); if (selection && selection.length > 0 && selection[0].uri) { this.selectedImage = selection[0].uri; } else { console.error('No image selected or URI is undefined.'); } } catch (error) { console.error('Error selecting image:', error); } } } }; </script>
It seems that the same issue is happing also on the demo available under : https://www.npmjs.com/package/@nativescript/imagepicker#demo -> https://stackblitz.com/edit/nativescript-vue3-beta-krjk9k?file=app%2Fcomponents%2FHome.vue,app%2Fapp.css
Can you support me on this issue?
The text was updated successfully, but these errors were encountered:
Same issue here, did you ever find a solution?
Sorry, something went wrong.
I had the same issue and was able to fix it by installing JDK 17 (instead of JDK 11) that I had.
Here's some instructions, but instead of temurin11, install temurin17
choco install -y temurin17
https://docs.nativescript.org/setup/windows#installing-a-jdk
I had the same issue and was able to fix it by installing JDK 17 (instead of JDK 11) that I had. Here's some instructions, but instead of temurin11, install temurin17 choco install -y temurin17 https://docs.nativescript.org/setup/windows#installing-a-jdk
I have openjdk 17.0.12 2024-07-16 you must have fixed some other way, would you share code?
openjdk 17.0.12 2024-07-16
No branches or pull requests
Hello,
I'm writing an application in nativescript vue where I need to pick an image on iOS Photo Library.
For that I wanted to use the imagepicker plugin.
Authorization is working and I can select the pictures, but unfortunately as result I got that the uri is undefined.
Here after my code :
It seems that the same issue is happing also on the demo available under : https://www.npmjs.com/package/@nativescript/imagepicker#demo -> https://stackblitz.com/edit/nativescript-vue3-beta-krjk9k?file=app%2Fcomponents%2FHome.vue,app%2Fapp.css
Can you support me on this issue?
The text was updated successfully, but these errors were encountered: