Closed

Description
Which platform(s) does your issue occur on?
- iOS 12.1
- Emulator : iPhone 7, iPhone X, iPhone XR - iOS 12.1
- Devices : iPhone 7 - iOS 12.1.4
Please, provide the following version numbers that your issue occurs with:
- CLI: 5.2
- Cross-platform modules: 5.2
- Runtime(s): 5.2 ( iOS ) (works fine on Android with 5.2)
- Plugin(s): nativescript-imagepicker is at ^6.1.0, everything else comes from tns create
- Built on : macOS Mojave 10.14.3 with XCode 10.1
Please, tell us how to recreate the issue in as much detail as possible.
- run
tns create
to generate a project. Generate a plain TypeScript project, with the Hello World template. The problem also occurs with Angular. - install the plugin with the simple
tns plugin add nativescript-imagepicker
- add the permission lines in the Info.plist file
<key>NSPhotoLibraryUsageDescription</key>
<string>Description text goes here</string>
- in the main-view-model.ts file, add the import line :
import * as imagepicker from "nativescript-imagepicker";
and replace the onTap() function with this :
onTap() {
let context = imagepicker.create({mode: "single"});
context
.authorize()
.then(function () {
return context.present();
})
.then(function (selection) {
console.log("selected image");
}).catch(function (e) {
console.log("caught : ", e);
});
}
- run the app with a simple
tns run ios
- tap the button to pop the imagepicker
- pick an image or hit the "cancel" button if possible.
Doing steps 6 and 7 repeatedly will break the feature and make the imagepicker stuck. You can no longer pick an image (tapping it does nothing) nor can you go back. The "cancel" button gives a visual feedback on being tapped but does nothing. The user is forced to close the app.
Nothing is displayed in the console.
Sometimes, "if you're lucky", it breaks on the first attempt. Sometimes, 2nd, 4th, 5th. Sometimes it works even after picking 20 images. In those cases, restart the app on the device or emulator.
Usually it breaks around the 4th.
This also occurs in "multiple" selection mode. Images can be selected but the "done" button gets stuck instead (like the "cancel" button).