I want to upload an NSString
to a text file (.txt) on an ftp server.
I use the following code:
- (IBAction)Blau:(id)sender {
BlauS = @"1";
NSURL *BlauURL= [NSURL URLWithString:@"ftp://username:password@myftpserverurl/blau.txt"];
NSError *error;
BOOL proof=[BlauS writeToURL:BlauURL atomically:NO encoding:NSUTF8StringEncoding error:&Error];
if (!proof) {
NSLog(@"Error!: %@", [error localizedFailureReason]);
}
}
My log shows me the following error:
The specified URL type isn’t supported.
What's wrong? How can I fix this problem?