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

方法一:添加项目依赖,找不到头文件 #17

Open
wuzhou opened this issue Oct 3, 2013 · 7 comments
Open

方法一:添加项目依赖,找不到头文件 #17

wuzhou opened this issue Oct 3, 2013 · 7 comments

Comments

@wuzhou
Copy link

wuzhou commented Oct 3, 2013

按照方法一:添加项目依赖,找不到头文件。
开发环境:Xcode 5

@KittenYang
Copy link

我也是找不到头文件。

@wuzhou
Copy link
Author

wuzhou commented Jan 26, 2015

这个我一直没解决,而且这个库不支持64位,很有必要新写一个了

@gpr321
Copy link

gpr321 commented Jan 30, 2015

不支持64位,郁闷哦

@KittenYang
Copy link

求适配64位啊!

@gpr321
Copy link

gpr321 commented Feb 3, 2015

有一种方法,该部署配置,bulid setting -> architecture -> $(ARCHS_STANDARD_32_BIT) 这样就能解决,不过这里只能改为32位,不是长久之计,顺便弱弱问一句,豆瓣提供音乐 搜索 和 下载 的接口吗?我找了很久好像没发现

@wuzhou
Copy link
Author

wuzhou commented Feb 4, 2015

没有, 不过可以通过 http 请求 hack。具体方法可以参考这个个豆瓣 fm 的库:https://github.com/taizilongxu/douban.fm

@KittenYang
Copy link

最后我自己用ASIHTTPRequest实现了Auth。

- (ASIFormDataRequest *)formRequest {
    NSURL *URL = [NSURL URLWithString:kDBTokenUrl];
    ASIFormDataRequest *req = [ASIFormDataRequest requestWithURL:URL];
    [req setRequestMethod:@"POST"];
    [req setValidatesSecureCertificate:NO];
    [req setAllowCompressedResponse:YES]; // YES is the default
    [req setTimeOutSeconds:30];//超时时间30s

    [req setPostValue:kDBAppKey forKey:@"client_id"];
    [req setPostValue:kDBSecret forKey:@"client_secret"];
    [req setPostValue:kDBRedirectURL forKey:@"redirect_uri"];

    return req;
}
       ASIFormDataRequest *req = [self formRequest];
       req.delegate = self; 
        [req setPostValue:@"authorization_code" forKey:@"grant_type"];
        [req setPostValue:code forKey:@"code"];
        [req startAsynchronous];

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

3 participants