0
我想使用这个网址在我的应用程序,这样,当用户提供正确的信息,他将能够登录:URL与Objective-C的特殊字符
NSData *data = [NSData dataWithContentsOfURL: [NSURL URLWithString:[NSString stringWithFormat:@"https://www.example.come/login/CheckEligibility?json={'username'%%3A'%@'%%2C'password'%%3A'%@'}", username.text,passowrd.text]]];
出于某种原因我得到的例外:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
当我在浏览器中测试的URL,它工作正常,并给我我想要的数据。
它的工作,我拼错的东西。非常感谢! – Timmy