【发布时间】:2016-01-02 17:42:33
【问题描述】:
我想在 iOS 应用程序中获取 Unity 广告的统计信息。 Unity为此提供了一个API,但是他们声明
“统计服务器总是需要签名的 URL 并且不会工作 如果在没有有效签名的情况下访问。"
什么是签名 URL,我应该如何访问服务器?正常的 NSURLRequest 不起作用,我收到错误消息:
{"error":"Authentication error","responseCode":500,"status":"error"}
这是我正在使用的代码(以这种方式发出请求适用于其他 api,但不适用于统一广告)
- (IBAction)Button:(id)sender {
// Create the request.
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://gameads-admin.applifier.com/stats/acquisition-api?apikey=979c4e733ccd85a1eaef74e28f9dc1742d5fa5a2b3518fe10825aa13caf18185"]];
// Create url connection and fire request
NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];
}
【问题讨论】: