whyceewhite / CarLess

Logging commuting trips completed using transit or pedestrian modes of transportation.
0 stars 0 forks source link

Vehicle web service is failing after the Xcode / Swift upgrade #22

Closed whyceewhite closed 9 years ago

whyceewhite commented 9 years ago

It appears as if the epa vehicle look up web service requests are failing after the Xcode / Swift upgrade. The main error is App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

Part of the stack trace is as follows:

2015-09-21 10:12:28.486 CarLess[6585:387962] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
Response url = nil. 
Error = Optional(Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." 
UserInfo={NSUnderlyingError=0x7ff0d924f9d0 {Error Domain=kCFErrorDomainCFNetwork 
Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." 
UserInfo={NSErrorFailingURLStringKey=http://www.fueleconomy.gov/ws/rest/vehicle/menu/year, 
NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., 
NSErrorFailingURLKey=http://www.fueleconomy.gov/ws/rest/vehicle/menu/year}}, 
NSErrorFailingURLStringKey=http://www.fueleconomy.gov/ws/rest/vehicle/menu/year, 
NSErrorFailingURLKey=http://www.fueleconomy.gov/ws/rest/vehicle/menu/year, 
NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.}). 
Data = nil
whyceewhite commented 9 years ago

This was occurring as a result of an update to the App Transport Security. See this technote for more information: https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/