编程方式在我们的网址,搜索歌曲,这是来自itunes的该链接的代码API
NSString *method=[NSString stringWithFormat:@"http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?term=shakira's+waka+waka&entity=musicVideo"];
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:[NSURL URLWithString:method]];
[request setHTTPMethod:@"GET"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
artist=[[NSMutableArray alloc]init];
url=[[NSMutableArray alloc]init];
album=[[NSMutableArray alloc]init];
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
你的意思iTunes商店或你自己的iTunes资料库?你在PC上还是在Mac上? – mouviciel 2009-04-20 11:58:46
谢谢Mouviciel,我修改了关于商店的问题。该应用程序是一个Web应用程序,所以Mac和PC都需要工作。 – 2009-04-20 12:09:41