在iphone中登录到网站

在iphone中登录到网站,iphone,Iphone,我做了这些步骤 1) 找到vonage的登录url 2) 单击sigin时,使用livehttpheader插件捕获传出的post请求数据 我找到的数据是 username=myusername&password=mypassword&redirectingURL=%2Fwebaccount%2Fdashboard%2Fchoose.htm&frontDoorLogin=&goToSelection=callforwarding&loginsubmit=Sign+In 在我得到数据后,我开始用

我做了这些步骤

1) 找到vonage的登录url

2) 单击sigin时,使用livehttpheader插件捕获传出的post请求数据

我找到的数据是

username=myusername&password=mypassword&redirectingURL=%2Fwebaccount%2Fdashboard%2Fchoose.htm&frontDoorLogin=&goToSelection=callforwarding&loginsubmit=Sign+In

在我得到数据后,我开始用xcode编码,我不知道最好的方法是什么,但我搜索了一些时间,然后我试着这样做

i am developing one app which will login to vonage website and do some functions like call froward etc . For that purpose first i am trying to login to vonage website  
但当我在模拟器中运行应用程序时,它崩溃了

我发布数据的方式是否正确?还有别的方法吗

在这个问题上有人能帮我吗

我正在使用AsittpRequest库

提前谢谢

问候


编辑:我的盲目错误我键入了setvalue而不是setpostvalue,这将解决此问题:)

查看标题为

此外,我通常使用自动释放来发出警报,不确定这是否是您的问题,但您可能也希望尝试这种更改

// using post value 
[request setPostValue:@"myuser" forKey:@"first_name"];
UIAlertView委托代码

    UIAlertView *alert= [[[UIAlertView alloc] initWithTitle:@"Hmm" message:@"http works" 
         delegate:self cancelButtonTitle:@"okay" otherButtonTitles:nil] autorelease];

   [alert show];

调试器中的错误是什么?我在调试器中尝试了在[request setValue:@”/webaccount/dashboard/choose.htm“forKey:@“redirectingURL”之后崩溃;看来我不能用这个方法发布,有什么想法吗?谢谢你的回复,先生,我做了那个教程中所说的,我删除了警告视图,但仍然是相同的错误。我的主要问题是我们在iphone中发布数据的方式(对不起,我是新的iphone编码)我怀疑问题在于你没有处理来自https网站的证书你能告诉我如何处理https(ssl或xx)证书吗?@appleDE这是我在编写phoneGap插件时使用的一些代码谢谢你的回复先生,我解决了我的问题,我是一个瞎子,我没有使用setPostvalu我使用了setvalue我以为我使用了,但idk,无论如何谢谢你的帮助先生:)
    UIAlertView *alert= [[[UIAlertView alloc] initWithTitle:@"Hmm" message:@"http works" 
         delegate:self cancelButtonTitle:@"okay" otherButtonTitles:nil] autorelease];

   [alert show];
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:
                                                     (NSInteger)buttonIndex {
       // do your thing
    }