heyich bin ein kompletter Neueinsteiger bei Xcode und programmierung mit objective-c.jetzt arbeite ich gerade ein buch ab "Apps programmieren für Iphone und Ipad" von Rodewig und Wagner. Allerdings gibt es mir bei einem Tutorial den Error 256 obwohl in der Mentierungsdatei kein Fehler angezeigt wird. Könnt ihr mir bitte helfen?
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad{[super didLoad];}
-(void)didReceiveMemoryWarning{
[super didReceiveMemorywarning];
}
-(IBAction)go:(did)sender {
NSLog(@"[+] go:");
NSError *theError = nil;
NSURL *theURL = [NSURL URLWithString:@"http://www.rodewing.de/ip.php"];
NSString *theIP = [NSString stringWithContentsOfURL:theURL encoding:NSASCIIStringEncoding error:&theError];
if(theError == nil) {
NSLog(@"[+] OP: %@", theIP);
}
else {
NSLog(@"[+] Error: %@", [theError localizedDescription]);}[self.label setText:theIP];
}
@end
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad{[super didLoad];}
-(void)didReceiveMemoryWarning{
[super didReceiveMemorywarning];
}
-(IBAction)go:(did)sender {
NSLog(@"[+] go:");
NSError *theError = nil;
NSURL *theURL = [NSURL URLWithString:@"http://www.rodewing.de/ip.php"];
NSString *theIP = [NSString stringWithContentsOfURL:theURL encoding:NSASCIIStringEncoding error:&theError];
if(theError == nil) {
NSLog(@"[+] OP: %@", theIP);
}
else {
NSLog(@"[+] Error: %@", [theError localizedDescription]);}[self.label setText:theIP];
}
@end