[SOLVED] Anyone got Filepicker working with Cordova


#1

Hi,

I am us https://atmospherejs.com/natestrauser/filepicker-plus and have Filepicker working in a browser (desktop/mobile). In the Cordova app, I get some issues around opening/closing the inAppbrowser.

I am using Meteor and have created apps for iOS and Android. The app seems to run fine on a mobile browser on iOS. I was just testing the this out via the Cordova app and I can open the initial window.

I see this in the logs:
2015-10-18 08:22:19.311 Buzzy[5010:1555163] Setting the WebView’s frame to {{0, 0}, {414, 692}}
2015-10-18 08:22:19.312 Buzzy[5010:1555163] Setting the WebView’s frame to {{0, 0}, {414, 736}}

I then select a file:

If I choose “Photo Library”, it takes me back to my app and I see the following on the Xcode log:

2015-10-18 08:26:33.653 Buzzy[5010:1555163] Passed in type public.item doesn’t conform to either public.content or public.data. If you are exporting a new type, please ensure that it conforms to an appropriate parent type.
2015-10-18 08:26:33.703 Buzzy[5010:1555163] the behavior of the UICollectionViewFlowLayout is not defined because:
2015-10-18 08:26:33.703 Buzzy[5010:1555163] the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
2015-10-18 08:26:33.703 Buzzy[5010:1555163] The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x7ffc758ba3e0>, and it is attached to <UICollectionView: 0x7ffc74ca5200; frame = (0 44; 10 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7ffc758bb4e0>; animations = { bounds.origin=<CASpringAnimation: 0x7ffc7160dca0>; bounds.size=<CASpringAnimation: 0x7ffc7160dd90>; position=<CASpringAnimation: 0x7ffc716a5240>; }; layer = <CALayer: 0x7ffc713d2610>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x7ffc758ba3e0>.
2015-10-18 08:26:33.703 Buzzy[5010:1555163] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
2015-10-18 08:26:58.952 Buzzy[5010:1555163] Warning: Attempt to present <UIImagePickerController: 0x7ffc71b72000> on <CDVInAppBrowserNavigationController: 0x7ffc71c7a200> whose view is not in the window hierarchy!

Any help appreciated.


#2

Looks like if you add {container: ‘modal’} it’ll work similar to this https://developers.filepicker.com/docs/support/issues/126