프로그램/iphone

ios apiserver http오류 App Transport Security has blocked

mulderu 2015. 9. 22. 16:16

iOS9 이후 https로 api서버로 연결하지 않으면 아래와같은 에러가 올라 옵니다.


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.

이럴경우 아래와 info.plist xml 파일에 아래와 같이 exception domain을 추가 해서 에러를 피할수 있다.
ref : http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http

 
NSAppTransportSecurity
    
        NSExceptionDomains
        
            your-api-server-domain
            
                NSExceptionAllowsInsecureHTTPLoads
                
                NSExceptionMinimumTLSVersion
                TLSv1.1
                NSIncludesSubdomains