[Box createFolderWithName:] を使用して、folder_id を取得できます。しかし、folder_id を使用してその子を取得しようとすると、機能しません。これが私のコードです:
[Box createFolderWithName:@"My APP" parentFolderID:[Box rootFolderID] share:NO callbacks:^(id<BoxOperationCallbacks>on){
on.userInfo (^(NSDictionary* result) {
// do something with the return value (typically stored with key @"results") of the operation
NSNumber *appFolderId = [result objectForKey:@"folder_id"];
BoxFolder *appFolder = [Box folderWithID:appFolderId];
[appFolder updateWithCallbacks:^(id<BoxOperationCallbacks>on){
on.after(^(BoxCallbackResponse response) {
if (response == BoxCallbackResponseSuccessful) {
NSLog(@"Folder updated. Children count is: %d", [appFolder.children count]);
// Send a notification, call a delegate, use KVO use locally or whatever to use the children.
}
else {
NSLog(@"Folder not updated.");
}
});
}];
});
}];
children は常に nil です。[Box rootFolder] でも試してみましたが、同じ結果でした。
誰でも私を助けることができますか?ありがとう。