[iPhone] NSURLConnection cant find host
Hi all,
I'm having a major problem with my application when using anything other than a wifi connection.
I'm just trying to grab the contents of an XML document at a given URL, this works for the best part on wifi.
For some reason it would appear that the following code cant locate the host or occasionally just times out when using Edge/3G but NOT wifi.
The same issues were happening when I just used [NSData dataWithContentsOfURL:url];
Any help is appreciated!
- (NSXMLParser *)read:(NSString *)urlString
NSURL *url = [NSURL URLWithString:urlString];
//NSData *data = [NSData dataWithContentsOfURL:url];
NSMutableURLRequest *theRequest=[NSMutableURLRequest
requestWithURL:url
cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
//[theRequest setHTTPMethod:@"GET"];
[theRequest setMainDocumentURL: url];
[theRequest setTimeoutInterval:30.0];
NSError *myError = nil;
NSURLResponse *serverResponse;
NSData *data;
data = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&serverResponse error:&myError];
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:data];
return parser;
I've seen similar problems with NSImage and NSXMLParser with chuncked HTTP responses. Instead I've has to proxy the requests through another server that did not chunk the response, or use NSURLConnection objects and manually concatenate the responses with didReceiveData. If there is an easy workaround for this, please share!
Similar Messages
-
my iphone 4 cant find wifi. i have reseted wifi and iphone, but it still isnt working! it just stopped yesterday. please help!
You could try syncing the contacts with yahoo or google contacts, then sync them to the iPhone. Or, export the contacts and then import them into one of the aforementioned servicse, or iCloud, then sync to the phone.
-
Iphone 5 cant finde Cellolar network
iphone 5 cant finde Cellolar network and cant connect to wirlles network
all of that after restor and befor actuli
i try to activet it but i cant whit out network place help mebut is recognize wifi
-
When i sync my iphone i cant find my photos anywhere on my computer? help:
i have a notebook pc windows vista and when i sync my iphone it tells me my photos are being synced but i cant find them anywhere on my computer! ive been looking for the past 2 weeks.. its taking me hours and i jus dont know where they are! its driving me insane, i wanna print photos
Syncing goes from your computer to your device, not the other way around. If you want to copy photos off your iPhone then it's not done via iTunes. Photos taken with the iPhone or saved from emails/websites etc : http://support.apple.com/kb/HT4083 . If you want to copy off photos that were originally synced from your computer then you will need an app such as Simple Transfer (which has a free 'lite' version called Simple Photo & Video Transfer)
-
Iphone 4 cant find printer HELP!!! PLEASE!!!
Hello..I have a cannon pixma MP560 printer and I print just fine from my laptop but my iphone 4 doesnt find the printer. I am up to date on my software on the phone and know that the printer is one on the list that should print with the iphone. Any suggestion? I cant figure this out.
Many thanks
VictoriaAccording to this support document, there are NO canon printers that support Airprint:
http://support.apple.com/kb/HT4356 -
My iphone 5 cant find my wifi network please help me
hello i
my iphone5 cant find my wifi network any more.please help methere is nobody to help me ?
really i'm so tierd ..if someone knows about this prb please let me know -
I download new songs where can i sync my iphone i cant find it in the new itunes
i download a new songs to the itunes and i want to sync them to my iphone and i can find the sync batton in the itunes, where is it ??
Hi lahavholin,
When the iPhone is selected in iTunes, the Sync button should be located at the bottom right of the screen, directly to the right of the bar showing the space used on the device. Though the image is dark, you can see it in the screen image of the following document under the "USB syncing" section:
iOS: Syncing with iTunes
http://support.apple.com/kb/ht1386
Cheers,
- Brenden -
Hi all. I have read the tutorial to on Wifi-sync and gone through everystep making sure that this could work. I tried everything i was suppossed to do with my iPhone 3gs and it worked perfectly and now is syncing over wifi with ease. Yet when i plug my mom's iphone 4s into the laptop (lion 10.7) and check sync over wifi and click apply and then plug it in still over the same wifi, it doesnt show up in itunes under devices and can never find the macbook from the phone. What shoud i try next? thanks!
hey krispyking22 are you still looking for a solution ?
-
I have an iphone and ipad
I have lost my ipad,tried to track it by find my iphone but it couldnt find my ipad on the devices so any idea?What To Do If Your iDevice or Computer Is Lost Or Stolen
If your Mac, iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should do in advance - before you lose it or it's stolen - and some things to do after the fact. Here are some suggestions:
Reporting a lost or stolen Apple product
What-To-Do-When-Iphone-Is-Stolen
Lost or Stolen iPhone? Here’s What to do.
6 Ways to Track and Recover Your Lost/Stolen iPhone
Find My iPhone
It pays to be proactive by following the advice on using Find My Phone before you lose your device:
Find My iPhone
Setup your iDevice on MobileMe
OS X Lion- About Find My Mac
How To Set Up Free Find Your iPhone (Even on Unsupported Devices)
Third-party solutions for computers:
VUWER 1.5.4
Sneaky ******* 0.2.0
Undercover 4.7
LoJack for Laptops Premium Mac
STEM 2.1 -
Hi there , i am a new on iphone , i cant find a face time in my iphone5 ( black 16 GB ) also i have been advised to go to contact and i will find the buttom of face time under the contact details , but i dont. i need your help on that as i need this service to contact my son in USA. Regards, Fathi
If you bought the iphone in the Middle East, then it likely does not have facetime, as many governments in the region do not allow it.
-
iPhone 5
Serial number: C3*******TWF
Good Afternoon, Apple ! I lost my iphone 4 months ago and cant find it, my friends help me to check it by using iclouds and find my phone programmes, but no result. For now i'm without phone and really very disappointed. I hope u will help me to find my phone , thank u for your understanding ...
<Edited By Host>These are user-only forums. You are not speaking to Apple here. Apple will not find your phone. After four months you should buy a new one.
What To Do If Your iDevice Is Lost Or Stolen
iPhone, iPod Touch, and iPad
If you activated Find My Phone before it was lost or stolen, you can track it only if it is connected to the Internet by Wi-Fi or cellular. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
1. Reporting a lost or stolen Apple product
2. Find my lost iPod Touch
3. AT&T. Sprint, and Verizon can block stolen phones/tablets
4. What-To-Do-When-Iphone-Is-Stolen
5. iCloud- Use Lost Mode
6. What to do if your iOS device is lost or stolen
7. 6 Ways to Track and Recover Your Lost/Stolen iPhone
8. Find My iPhone
9. Report Stolen iPad | Stolen Lost Found Online
It pays to be proactive by following the advice on using Find My Phone before you lose your device:
1. Find My iPhone
2. Setup your iDevice on iCloud
3. OS X Lion/Mountain Lion- About Find My Mac
4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices) -
serial number:C3*******TWG
iphone 5
32 GB
iOS 8.1.2
AND THE IPHONE ITS FOUNDET A NBD CANT FIND THE LAST OWNER ,WHAT A WILL DO WITH THIS PHONE, THE LAST OWNERHAVE PHONE NUM,BER IN THE APLE ID,BUT NOW THE PHONE NUMBER DONT EXSISTING...HELP HELP
<Edited By Host>Make a Genius Bar appointment at your nearest Apple Store and do an out-of-warranty replacement for $229 USD.
-
Iphone cant find hp 210a airprint
iphone cant find any printer airprint., have a hp aio wifi b210a, it is on the same network and i have no problems printing from my imac on wifi,??????
what to do.???Hi Andrew.
Thank u for u´r help.
i can say yes to 1-4, and i´ve decided to by af timecapsule, then i think my problems will be solved.?? :-)
Can u help me with this:
I want to upgrade my osx, but i don´t know if i can upgrade to LION from my OSX.
i´ve got 10.5.8 - Imac, 2,4GHz Intel Core 2 Duo - 2 GB 667 MHz DDR2 SDRAM..
If i cant´t upgrade to LION, then what do i do first.??
Hope to hear from u soon. -
Hi! My My mom bought me an iPhone 5 and I have a problem with my facetime. I cant find it! Cant find it in settings and restrictions. I remember when she gave me this I see facetime in settings and after a couple of days its gone! She bought this in Bahrain both my iPhone and her iPad Mini. And I'm just wondering why she has facetime and why mine is missing? Please help! My iMessage is perfectly working. I lived in the Philippines
Are you trying to use the phone in Bahrain with a supported carrier there? I suspect not. If you try to use this phone outside of Bahrain, you won't have FaceTime. This is done to prevent folks from simply crossing the border to purchase iPhones in Bahrain...FaceTime is banned in Saudi Arabia & the UAE. Sorry, but you'll only have FaceTime on that phone while using it in Bahrain on a supported carrier's network there.
-
HT4623 how do i sync my iphone with new itunes? I cant find the sync button
how do i sync my iphone with new itunes? I cant find the sync button
The same way you would sync with any other version of iTunes.
Connect the device.
Select the device.
Select Sync.
In the new version of iTunes, the sidebar is disabled by default. With a device connected, it will be listed in the upper right hand corner.
If you want the side bar back, type Cntrl + S.
Maybe you are looking for
-
How to run a report from a form?
i created a report from reports 6i. now i want to design an interface in oracle forms and want to call all information from report according to paramaters which i designed in oracle forms. i found some information that i can do that using Procedure R
-
hi experts,, can u pls give me replacement of this FM's 'SAPWL_STATREC_READ_FILE' 'RS_TREE_MODIFY_NODE' thanks n regards, rekha.
-
ACE: Can't allocate resource class due to resource in use
When I try to enter the member [resource_class] command under the context config mode I get... Error: resources in use Any idea how I get around this? Note: I am trying to do this so that I can configure stickiness in my context and I get Error: stic
-
Help! Need to generate barcode on document
Okay so this seems simple in theory, but difficult in execution. My goal is to print 100 copies of the same image, but each copy has a slightly different barcode for tracking purposes. 100001, 100002, 100003, etc. I've spent some time Googling withou
-
Why I still can't transfer PDF doc to Excel or Word formats after I had purchased annual subscription as instructed? I had paid via Apple Store, with my iphone5s!