Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json user error #5

Open
zengxianshu opened this issue Jul 6, 2020 · 0 comments
Open

json user error #5

zengxianshu opened this issue Jul 6, 2020 · 0 comments

Comments

@zengxianshu
Copy link

zengxianshu commented Jul 6, 2020

file RunTrace.m

-(void)checkUpdate
{
NSString *urlStr = [NSString stringWithFormat:@"https://api.github.com/repos/sx1989827/RunTrace/tags"];
NSString *newStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSURL *url = [NSURL URLWithString:newStr];
NSURLRequest *requst = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:10];
[NSURLConnection sendAsynchronousRequest:requst queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
if(connectionError!=nil)
{
return;
}
NSArray *arr = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
version=[arr[0][@"name"] floatValue];
}];
}

po arr

{
"documentation_url" = "https://developer.github.com/v3/#rate-limiting";
message = "API rate limit exceeded for 106.50.192.98. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)";
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant