使用SecItemCopyMatching时,我得到了-34018。我没有找到任何文档这个错误代码的含义。也许有人可以帮助我。提前谢谢。
答案 0 :(得分:0)
试试这个
NSString *NSStringFromOSStatus(OSStatus errCode)
{
if (errCode == noErr)
return @"noErr";
char message[5] = {0};
*(UInt32*) message = CFSwapInt32HostToBig(errCode);
return [NSString stringWithCString:message encoding:NSASCIIStringEncoding];
}
答案 1 :(得分:0)
许多(全部?)安全框架错误代码在SecBase.h
中定义,errSecMissingEntitlement = -34018, /* A required entitlement isn't present. */
是一个头文件,是安全框架的一部分。您也可以在Apple's open-source Security framework。
错误代码-34018因此被定义:
app.get("/start/:origin/:destination", function ( reqt, resp ) {
var origin = reqt.params.origin
var destination = reqt.params.destination
var url = 'http://localhost:5000/maps/' + origin + '/' + destination
var rate;
var overallDis;
var aRoadDis;
var data;
http.get(url, res => {
res.setEncoding('utf8')
res.on('data', function(body){
data = JSON.parse(body)
overallDis = data["distance"]
aRoadDis = data["ARoads"]
})
})
var driver;
http.get("http://localhost:4000/lowestRate/", res => {
res.setEncoding('utf8')
res.on('data', function(body){
driver = JSON.parse(body)
rate = driver.rate
console.log(rate)
})
})
var totalPrice = 0
http.get("http://localhost:6000/surge/:" + rate + "/:" + overallDis + "/:" + aRoadDis, res => {
// console.log(overallDis)
// console.log(aRoadDis)
// console.log(rate)
res.setEncoding('utf8')
res.on('data', function(body){
console.log(body)
totalPrice += parseInt(body)
})
console.log(totalPrice)
})
})