IOS - CredStore - executeQuery - Ошибка копирования соответствующих кредитов - PullRequest
0 голосов
/ 11 июля 2019

Я получаю сообщение об ошибке ниже, когда пытаюсь вызвать собственный API, который у меня есть, я использую alamofire

let API_URL = "https://localhost:5001/api"

func registerNewUser(parameters: Parameters) {

        let urlString = API_URL + "/register/PostTest"
        let url = URL.init(string: urlString)

        print("URL: \(url!)")

        Alamofire.request(url!, method: .post, parameters: parameters, encoding: JSONEncoding.default, headers: nil).debugLog().responseJSON{ //--> point of failure
            response in
            if response.result.isSuccess {
                print("Success! the request to the API is successful")

                let userJson : JSON = JSON(response.result.value!)

                print(userJson)

            } else {
                print("Error \(response.result.error!)")
            }
        }
    }


info.plist file
<key>NSAppTransportSecurity</key>
        <dict>
            <key>NSExceptionDomains</key>
            <dict>
                <key>https://localhost</key>
                <dict>
                    <!--Include to allow subdomains-->
                    <key>NSIncludesSubdomains</key>
                    <true/>
                    <!--Include to allow HTTP requests-->
                    <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                    <true/>
                    <!--Include to specify minimum TLS version-->
                    <key>NSTemporaryExceptionMinimumTLSVersion</key>
                    <string>TLSv1.1</string>
                </dict>
            </dict>
        </dict>

Ошибка:

CredStore - executeQuery- Ошибка копирования соответствующих кредитов.Ошибка = -25300, запрос = {класс = inet;"m_Limit" = "m_LimitAll";ptcl = htps;"r_Attributes" = 1;sdmn = localhost;srvr = localhost;sync = syna;}

...