Merhaba Https Request uygulamasını Swift'de yapmak istiyorum. Şu anda ip adresi üzerinden yerel sunucuya erişiyorum. Yerel Sunucu, sertifikaya erişerek şu anda böyle bir şekilde yapmak istemiyorum.Swift: Sunucu SSL Sertifikası Kullanarak Https Talebi Nasıl Yapılır?
Alamofire.request(.GET, https://ipaddress//, parameters: [param], headers: headers)
.responseJSON { response in
print(response.request) // original URL request
print(response.response) // URL response
print(response.data) // server data
print(response.result) // result of response serialization
if let JSON = response.result.value {
print("JSON: \(JSON)")
}
}
Ben böyle verdik ama im hala
gibi hata alıyorum istekte için ve plist plist<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>192.168.2.223:1021(my local ip)</key>
<dict>
Include to allow subdomains-->
<key>NSIncludesSubdomains</key>
<true/>
<!--Include to allow insecure HTTP requests-->
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<!--Include to specify minimum TLS version-->
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>
yukarıdaki kod kullanmış
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
IP adreslerini ATS plist değerlerinde kullanamazsınız. –
Çözüm aldınız mı? –