Request loading in a UIWebView is asynchronous. That explains why the request begins to load but never finishes. If you want to make sure that a certain URL is called or loaded, you will have to somehow keep the applicationWillTerminate:
method from exiting. If you don't need to really load the request in a web view, you could do use [NSURLConnection sendSynchronousRequest:returningResponse:error:]
instead.
Also, a kind of hacky way to do it might be this:
[_webview stringByEvaluatingJavaScriptFromString:@"window.location.href=\"http://example.com/logout\""];
stringByEvaluatingJavaScriptFromString:
is a blocking, synchronous method. I haven't tried, however, if it would really only return once the request is fully loaded. It might already return just after setting the location.