Category:
25 February 2010
XMLPerformance Test App Extended For 3rd Party Libraries
2 Comments
I'd love to hear your thoughts!
Good article that says don't overthink things - just focus on creating a product you would use. Apt for iOS devs: http://t.co/Nt6X7oBJ
Sign up to receive a monthly newsletter with my favorite iOS dev links - receive a free epic-length tutorial as a bonus!
Every week, we alternate between UIKit and Gaming tutorial votes. This week: UIKit!
Last week's winner: How to Create a Game like Cut The Rope!
Like the tutorials on this site? Please help support future tutorial development!
This site and the products and services offered on this site are not associated, affiliated, endorsed, or sponsored by Apple, nor have they been reviewed, tested, or certified by Apple. Similarly, Cocos2D is a registered trademark of Ricardo Quesada. This site and the products and services offered on this site are not associated, affiliated, endorsed, or sponsored by Ricardo Quesada. All trademarks property of their respective owners.
Twitter icon courtesy of Kevin Flahaut.
© 2010 Ray Wenderlich. All rights reserved.
Im using xml parsing post data in my iphone app.Im trying to implement login page.I used the following coding but eventhough im giving correct Email &Password,its not working.and my app has no errors..please please help me
- (NSString *) postData: (NSString *) postString{
NSLog(@”poststring:%@”,postString);
NSURL *url=[NSURL URLWithString:@"http://www.myappdemo.com/sharefolio/login.php"];
NSData *postData = [postString dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-length"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
//[request setValue:@"text/plain" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:postData];
/* when we user https, we need to allow any HTTPS cerificates, so add the one line code,to tell teh NSURLRequest to accept any https certificate, i’m not sure about the security aspects */
//[NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:[url host]];
NSError *error;
NSHTTPURLResponse *response;
NSData *urlData=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
NSString *data=[[NSString alloc]initWithData:urlData encoding:NSUTF8StringEncoding];
NSLog(@”%@”,data);
//parsing start
NSXMLParser *xmlParser=[[NSXMLParser alloc] initWithData:urlData];
//initialize delegate
StatusXMLParser *parser=[[StatusXMLParser alloc] initStatusXMLParser];
//set delegate
[xmlParser setDelegate:parser];
//start parsing file
BOOL success=[xmlParser parse];
if(success){
NSLog(@”user parsing No Errors”);
}
else{
NSLog(@”Error”);
}
NSString *status=appDelegate.status;
//NSLog(@”status:%@”,status);
[parser release];
[xmlParser release];
[data release];
return status;
}
Can u provide any samples for xml parsing through post data to create login page in my iphone application?