constantadvancement / Inventory-Manager

Constant Advancement inventory management system.
0 stars 0 forks source link

Image Picker Search Bar #3

Open rmackin97 opened 3 years ago

rmackin97 commented 3 years ago

The image picker search bar crashes the image picker (the majority of the time, but not always) when clicked. If clicked and the image picker does not crash then the user is able to search for an image in their photo library, however upon selecting it the image picker (has in my experience) always crashed. Fix this :)

Note, this issue is not present on the macOS simulator but only when ran via my phone. Also, the image picker does NOT crash if used without interacting with the search bar.

Error log outputs

2021-02-23 08:54:37.135994-0500 InventoryManager[41914:15095677] [lifecycle] [u F047931D-011E-4583-9F0E-02DCC4355DFB:m (null)] [com.apple.mobileslideshow.photo-picker(1.0)] Connection to plugin invalidated while in use.

2021-02-23 08:54:37.136228-0500 InventoryManager[41914:15080647] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}

2021-02-23 08:54:37.136272-0500 InventoryManager[41914:15080647] [Generic] -[PUPhotoPickerHostViewController viewServiceDidTerminateWithError:] Error Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}

rmackin97 commented 3 years ago

I've changed the backing UIKitView from UIImagePicker to PhotoPicker. The below outlines tradeoffs between the two.

UIImagePicker

Pros:

Cons:

PhotoPicker

Pros:

Cons:

I believe that the PhotoPicker implementation is the best choice given the pros and cons listed above. It is not a perfect solution but feels to be a step up from the previous best solution.

Cropping images appears to be off the table for the PhotoPicker. The non-functional search bar however is still a mystery, perhaps testing this feature on another device would be insightful.