From 33b49971f97fb760f9fea9a257f24579287ca6d4 Mon Sep 17 00:00:00 2001 From: Florian Ebeling Date: Mon, 29 Aug 2011 14:30:54 +0200 Subject: [PATCH] Use IP instead of local domain name (gave several people problems) --- AppController.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/AppController.m b/AppController.m index 74166c9..a08892e 100644 --- a/AppController.m +++ b/AppController.m @@ -32,13 +32,14 @@ -(IBAction)openDoor:(id)sender{ NSLog(@"Trying to open the Door"); // Setup a request - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://door/letmein"] - cachePolicy:NSURLRequestReloadIgnoringLocalCacheData - timeoutInterval:5.0]; + // TODO investigate and use local domain name again, http://door/... + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://192.168.2.5/letmein"] + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:5.0]; [request setHTTPMethod:@"GET"]; // Open the connection¬¬ - [[NSURLConnection alloc] initWithRequest:request delegate:self]; + [[NSURLConnection alloc] initWithRequest:request delegate:self]; } // Everything is fine