Questions tagged [initwithcontentsofurl]
23 questions
0
votes
1 answer
iOS - initWithContentsOfURL downloading old version of file
My app downloads text files from a server in order to determine the content of the files. There's one problem, I am changing the files on the server, editing their content, but when the app downloads them the files have no changed. Loading the files…

Marcel Marino
- 962
- 3
- 17
- 34
0
votes
1 answer
Use NSAppleScript creates and calls AppleScript app in the Objective C have different result with the same code?
Firstly, I have been created an AppleScript app with the below code(File name: UnloadTest.scpt):
-- Set user name and password
set UserName to "MyAccount"
set MyPASSWORD to "MyPassword"
-- unload FTDIUSBSerialDriver
do shell script "sudo kextunload…

Raymond Liao
- 1,799
- 3
- 20
- 32
0
votes
1 answer
Using initWithContentsOfURL to display message, but having trouble?
I am trying to get an IUAlertview to display with a custom message pulled from a website upon loading the app. I have control of the website, so the idea is if I want to change the message, I can just change the website. This morning I asked about…

jake9115
- 3,964
- 12
- 49
- 78
0
votes
2 answers
initWithContentsOfURL what is the encoding?
Hi I saved a URL that has a path to a directory where I will be storing information, Now I want to retrieve the information but I don't know how to receive the items, I am trying to use initWithContentsOfURL but I dont know what the encoding would…

Terrel Gibson
- 481
- 1
- 6
- 21
0
votes
2 answers
IOS: Using stringWithContentsOfURL when network is unavailable
In this code poll from within my app for a reachable network
("http://soxxx9.cafe24.com/event.php")
NSString * szURL =[NSString stringWithFormat:@"http://soxxx9.cafe24.com/event.php"];
NSURL *url = [NSURL URLWithString:[szURL…

SeoTaiJi
- 141
- 1
- 9
-1
votes
5 answers
initWithContentsOfURL suddenly gives a "deprecated" error
I just opened my project in the new XCode 4.2 for the first time and I'm suddenly getting a whole slew of these warnings: 'initWithContentsOfURL:' is deprecated
Here's the code - anyone know what needs to be fixed here? (it was working perfectly…

sirab333
- 3,662
- 8
- 41
- 54
-1
votes
1 answer
NSData returns <>
I am converting url data into UIImage. This is my code.
NSURL *url = [NSURL URLWithString:strImgURL];
NSData *data = [NSData dataWithContentsOfURL:url options:NSDataReadingUncached error:&error];
NSLog(@"Image Error-------%@",[error…

user1960169
- 3,533
- 12
- 39
- 61
-1
votes
1 answer
Swift - contentsOfURL returns 'nil' with specific site, but it works on browser
This code works with other URL's, but not with this one. It always returns nil with "contentsOfURL". Why?
var url = NSURL(string: "http://www.bsnpr.com/api/standing.asp?serie=1&liga=1&y=2015")
var err: NSError?
var data = NSData(contentsOfURL: url!,…

Aerofan
- 119
- 2
- 5