iOS到Parse.com - SaveInBackground对象ID为空

时间:2014-12-01 23:15:33

标签: ios parse-platform

在使用SaveInBackgroundWithBlock到Parse.com时,我很难找到为什么我得到一个空值。我确定我遗漏了一些东西,尝试了if(!error)和if(succeeded)同样的结果,即创建了对象但是eventID(objectID)为null ...有什么建议吗?

提前致谢!

[event saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
                    if (!error) {
                        [CommonHelper hideBusyView];
                        EventObj *obj = [[EventObj alloc] init];
                        obj.eventID = event.objectId;
                        obj.eventName = strNameEvent;
                        obj.eventDateTime = self.dateEvent;
                        obj.eventAddress  = strAddress;


                        NSLog(@"EventID: %@",self.eventObj.eventID);

                        PreviewInvite *invitepreview =[[PreviewInvite alloc] init];
                        invitepreview.eventObj = self.eventObj;

                        [self.navigationController pushViewController:invitepreview animated:YES];
                    }
                    else
                    {
                        NSString *errorString = [error userInfo][@"error"];
                        [CommonHelper showAlert:errorString];
                        [CommonHelper hideBusyView];

                    }
                }]

0 个答案:

没有答案