johankson / flipper

Control library for Xamarin Forms
MIT License
13 stars 3 forks source link

Swiper Control not working on iOS #15

Closed mjohanss closed 8 years ago

mjohanss commented 8 years ago

When running Flipper.Sample on iPhone 5s/6/6s (simulator and physical) with iOS 9.0 swiper control does not work. No images are being loaded and when clicking the back button (upper left corner) after tried swiping non existing images the sample app crashes.

johankson commented 8 years ago

The error has been isolated to a network related issue. Working on a fix.

johankson commented 8 years ago

This is the issue unfortunately at the moment. iOS has changed a bit to a more secure state.

Workarounds 1) Use secure transport for the images, that is https://www.yourimage.com 2) Add the dictionary entry described below

(this text is copied from the internet). From iOS 9 We can not hit API directly. Apple had added Transport Security feature that improves the security of connections between an app and web services. This feature consists of default connection that conform to best practices for secure connections. Connections that do not follow the requirements will fail and give “The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.” error.

So, We have to add NSAppTransportSecurity dictionary in your .plist file and the NSAllowsArbitraryLoads key to YES under it to turn off transport security.

johankson commented 8 years ago

Updated the sample and added a safe guard exception that will be thrown if http is not allowed. Closing issue as resolved.