hyperoslo / ImagePicker

:camera: Reinventing the way ImagePicker works.
Other
4.87k stars 677 forks source link

View Controller crashes and the message appears in output that the view service is terminated #411

Closed azizparande closed 4 years ago

azizparande commented 6 years ago

Repro:

IOS version 11.3.1 swift 9.3 I compiled and installed the app which includes the picker

The picker is presented from a controller which it self is a navigation controller.

Picker launches correct and i am able to send the image.

But when i try to dimiss the picker by calling picker.dismiss it crashes the view controller where this is hosted in.

The message which i get in my output window is

[Default] MPMediaControlsRemoteViewController Dismissing because view service terminated

the way i am calling the dismiss is

func doneButtonDidPress(_ imagePicker: ImagePickerController, images: [UIImage]) { images.forEach({ (imageToUpload) in //Upload images to server imagePicker.dismiss(animated: true, completion: nil) }) }

func cancelButtonDidPress(_ imagePicker: ImagePickerController) { imagePicker.dismiss(animated: false, completion: nil) }

richardtop commented 6 years ago

Hi @azizparande you gotta be from the future using Swift 9.3.

Have you tried to dismiss the enclosing NavigationController? This should help.

azizparande commented 6 years ago

Soorry i mean XCode

On Mon, Apr 30, 2018 at 2:59 PM, Richard Topchii notifications@github.com wrote:

Hi @azizparande https://github.com/azizparande you gotta be from the future using Swift 9.3.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hyperoslo/ImagePicker/issues/411#issuecomment-385541505, or mute the thread https://github.com/notifications/unsubscribe-auth/AlDY0AjNEk976heHzDNIS9FiIFvjQD0aks5tt4kpgaJpZM4TsRqR .

-- Mohammad Aziz Parande