Trying to trigger php script, get EXC_BAD_ACCESS iPhone development

Posted by Brennan Kastner on Stack Overflow See other posts from Stack Overflow or by Brennan Kastner
Published on 2010-12-28T01:48:43Z Indexed on 2010/12/28 1:54 UTC
Read the original article Hit count: 231

Filed under:
|
|
|

This below is my code, when it gets to the end of the function, the debugger throws an EXC_BAD_ACCESS error and when I check the website's logs, the url was never visited. If anyone could help me fix this issue, it would be greatly appreciated:

-(IBAction)submitEmail:(id)sender
{
    NSString *urlStringRaw = [[NSString alloc] init];
    urlStringRaw = [NSString stringWithFormat:@"http://vedev.org/AnonMail/sendEmail.php?from=%@&to=%@&subject=%@&body=%@", from.text, to.text, subject.text, bodyContent.text];
    NSString *urlString = [urlStringRaw stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    [urlStringRaw release];
    NSURL * url = [NSURL URLWithString:urlString];
    [urlString release];
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    [url release];
    NSURLConnection *connection = [NSURLConnection connectionWithRequest:requestObj delegate:nil];
    [connection release];
    [requestObj release];   
}

© Stack Overflow or respective owner

Related posts about php

Related posts about iphone