Objective c Kumulos API方法没有';行不通

Objective c Kumulos API方法没有';行不通,objective-c,database,xcode,kumulos,Objective C,Database,Xcode,Kumulos,我正在使用Kumulos向数据库提交信息。不幸的是,我无法让submit方法工作 此应用程序是用Xcode中的Objective-C编写的 我已将Kumulos.h、Kumulos.m、libKumulos.h和libKumulos\u iOS.0.7.4.a复制到我的项目中 在myviewDidLoad中,我有: k = [[Kumulos alloc]init]; [k setDelegate:self]; 然后在另一个线程中调用submit方法,方法如下: - (IBAction)sub

我正在使用Kumulos向数据库提交信息。不幸的是,我无法让submit方法工作

此应用程序是用Xcode中的Objective-C编写的

我已将Kumulos.hKumulos.mlibKumulos.hlibKumulos\u iOS.0.7.4.a复制到我的项目中

在my
viewDidLoad
中,我有:

k = [[Kumulos alloc]init];
[k setDelegate:self];
然后在另一个线程中调用submit方法,方法如下:

- (IBAction)submit:(UIButton *)sender 
{   
    [loader startAnimating];
    [NSThread detachNewThreadSelector:@selector(SubmittoDB) toTarget:self withObject:nil];
}
在另一个线程中调用此方法的:

-(void)SubmittoDB
{

    NSDate *date=[NSDate date];

    Transporter *T = [Transporter shared];

    [k submitToDbWithLatitude:[T getlat]
                 andLongitude:[T getlon]
                 andFirstName:[T getfirstname]
                  andLastName:[T getlastname]
              andEmailAddress:[T getemail]
               andPhoneNumber:[T getphone]
              andDateReported:date
                andPoleNumber:@"NULL"
                     andOther:othertext.text
                   andProblem:[T getproblem]];
}
T
对象只是一个保存信息的对象

以下是我的
didpletewithresult
didFailWithError
方法:

-(void) kumulosAPI:(Kumulos *)kumulos apiOperation:(KSAPIOperation *)operation submitToDbDidCompleteWithResult:(NSNumber *)newRecordID
{
    [self performSelectorOnMainThread:@selector(segue) withObject:nil waitUntilDone:false];
}


-(void) kumulosAPI:(kumulosProxy *)kumulos apiOperation:(KSAPIOperation *)operation didFailWithError:(NSString *)theError
{
     errormessage=theError;
     [self performSelectorOnMainThread:@selector(error) withObject:nil waitUntilDone:false];
}//failwitherror

更新 failure方法每次都执行,但是NSString“theError”总是为零,所以我不知道出了什么问题。如果我从kumulos网站上的kumulos仪表板运行此API方法,我可以成功地将数据提交到数据库

有人知道会发生什么吗?任何帮助都将不胜感激。也希望每个人都有一个美好的圣诞节(如果这是你的事情)


编辑
我稍早放置了一个断开标记,我发现
NSString错误
表示
变量不是CFString
,然后如果我采取另一个步骤,它会返回到
nil
。有没有办法找出它所指的变量?另外,为什么
错误
会变回
nil
?我希望能够打印出该错误消息。

我似乎遇到了类似的情况,只是没有为我返回任何内容,甚至没有返回到didFailWithError委托方法。我在kumulos.m文件中添加了一些日志记录。这也许对你有帮助,但我还没找到任何地方。在kumulos.m文件中查找submittedByLatitude方法,并添加
[newOp setDebugMode:YES]


当您运行项目时,它将提供一些更详细的结果。也许会有帮助。迈克

这最终成为我所在网络的一个问题。发生错误的原因是,为了模拟没有互联网的设备,我只需禁用wifi,重新启用wifi后,我没有重新提供用户名/密码以通过NTLM身份验证

errormessage
”声明为什么?“
error
”方法的代码是什么样子的?已更新为“segue”和“error”方法的代码。“errormessage”是NSSTRING类型的全局变量。您是否仍看到此问题?如果是这样的话,你能在库穆洛斯提出一个支持案例,我们将从那里着手。我不是,这最终是我所在网络的一个问题。此错误发生在NTLM身份验证失败时。如果我已连接到网络,或未连接(wifi已禁用,以太网已拔出),它将正常工作。只有在启用wifi且NTLM失败的情况下,才会出现问题。我今天早上回来,它工作正常。我不知道这是否与Kumulos的服务器有关,或者重启Xcode是否有什么作用。但我没有改变任何东西,现在它可以工作了。事实上,我可以确认罪魁祸首是我正在使用的无线网络。当我通过禁用所有东西来模拟没有互联网时,我没有意识到再次加入网络时必须重新输入信息。当正确连接到网络时,应用程序的行为符合要求。
-(void)segue
{
    [loader stopAnimating];
    [self performSegueWithIdentifier:@"uploaderdebrief" sender:self];
    }//segue

-(void)error
{
    [loader stopAnimating];
    UIAlertView *nope = [[UIAlertView alloc]initWithTitle:@"Error" 
                                                  message:errormessage
                                                 delegate:nil 
                                        cancelButtonTitle:@"OK" 
                                        otherButtonTitles:nil];
    [nope show];
}