我只是尝试将我的 xcode 项目与 box 帐户集成,以便按照“ https://github.com/box/box-ios-sdk ”中的步骤创建一个新文件夹。
最初通过链接“ http://developers.box.com/authentication-in-your-ios-app/ ”完成了身份验证过程。
构建成功并获得盒子帐户身份验证过程并获得创建新文件夹所需的名称。然后我经历了以下
Error- {Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'}
创建新文件夹的代码:
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Create Folder";
[self.textView becomeFirstResponder];
}
- (IBAction)gotobutton:(id)sender {
[Box createFolderWithName:self.textView.text parentFolderID:[BoxID numberWithInt:0] share:NO callbacks:^(id<BoxOperationCallbacks> on)
{
on.after(^(BoxCallbackResponse response)
{
if (response == BoxCallbackResponseSuccessful)
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Success"
message:@"Folder created." delegate:nil cancelButtonTitle:@"OK"
otherButtonTitles:nil] ;
[alertView show];
}
else
{
[BoxErrorHandler presentErrorAlertViewForResponse:response];
}
});
}];
}
如何摆脱错误,有没有人遇到过这种情况?请帮忙!!!