couchbaselabs / ToDoLite-iOS

To-Do list sample app for Couchbase Lite, native iOS version
85 stars 41 forks source link

XCode 7 requires requires reduced NSAppTransportSecurity for http SG #53

Open ingenthr opened 8 years ago

ingenthr commented 8 years ago

As a demo app, I had to add the following to Info.plist to work against Sync Gateway without SSL on.

There may be a better way to handle this when building for development, but adding this worked for me after some searching.

@@ -66,5 +66,9 @@
                <string>UIInterfaceOrientationLandscapeLeft</string>
                <string>UIInterfaceOrientationLandscapeRight</string>
        </array>
+        <key>NSAppTransportSecurity</key>
+        <dict>
+                <key>NSAllowsArbitraryLoads</key><true/>
+        </dict>
 </dict>
 </plist>
snej commented 8 years ago

Yup, that's the easiest way to work around this. The real fix is to switch the server to HTTPS, though.

pasin commented 8 years ago

As our demo server is still using http:// and to make it easy for testing with local sync-gateway, I will make the change for now. I will keep the issue open.