1

I'm a little bit baffled by this one - I have been developing an app on my iPhone 4 and I just got an iPhone 5...I am now using the iPhone 5 to develop (for obvious reasons). When I was developing on my iPhone 4 all of my NSURLSession code worked correctly and could access/do whatever over the network (I have both my phone and my computer connected to my home WiFi network - the obvious way to test an app). However, now that I am trying to make it work on my iPhone 5 - I am running into this networking error:

Response:(null) Error Domain=NSURLErrorDomain Code=-1001 "The operation couldn’t be completed. (NSURLErrorDomain error -1001.)" UserInfo=0x1700675c0 {NSErrorFailingURLStringKey=http://192.168.1.10/spiritmap/accessy/smackit/insertdataours.php, NSUnderlyingError=0x174244290 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1001.)", NSErrorFailingURLKey=http://192.168.1.10/spiritmap/accessy/smackit/insertdataours.php}

I have checked my apache logs and I am not getting any errors in there, nor am I getting errors in my mysql logs - but I still get the above error. I have verified that both my phone and computer are on the same network...I am using my computer as a "server" to test the app. I really don't think any of my code is relevant here as it was all working before I updated to iOS 8.1.2 on my "new-to-me" iPhone 5. Any suggestions for how to debug or what might be going wrong? If it's a server side problem, I am just using php with mysql - and as I said - it was all working before when I was testing on iOS 7.x. Any help would be greatly appreciated. Could this be a bug with the new iOS?

UPDATE

I filed a bug with apple - I am also going to try downgrading from Xcode 6.1.1 to Xcode 6.1 - and then if need be - I would try downgrading to Xcode 6 because I know it worked with that one...I also never had any problems with Xcode 5 - so if all is fails I'll try that.

UPDATE

I am updating xcode to beta version as well as my iphone to ios 8.2 beta - hopefully the resolution to this problem has already been included in the beta version.

ewizard
  • 2,801
  • 4
  • 52
  • 110
  • Also, check your version of AFNetworking if you are using it http://stackoverflow.com/questions/25708289/domain-nsurlerrordomain-code-1001-the-operation-couldn-t-be-completed-nsurle – Paulw11 Jan 21 '15 at 03:34
  • @Paulw11 - it stalls - i am not using afnetworking but i can incorporate it if u think it would help fix this problem... – ewizard Jan 21 '15 at 03:36
  • @Paulw11 right now im just using NSURLSession – ewizard Jan 21 '15 at 03:36
  • @Paulw11 it has to have something to do with the update...so if afnetworking solves the problem i guess ill have to incorporate it? – ewizard Jan 21 '15 at 03:37
  • Well, if it stalls in Safari then you may have an issue with your Apache version? – Paulw11 Jan 21 '15 at 03:38
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69267/discussion-between-paulw11-and-ewizard). – Paulw11 Jan 21 '15 at 03:38
  • @Paulw11 apache was working fine...and no errors in error log – ewizard Jan 21 '15 at 03:39
  • @Paulw11 i have read about afnetworking...and i think that might be a good suggestion to go that way....i think i read somebody solved a similar ios8 problem by updating there afnetworking package (which im not using yet) – ewizard Jan 21 '15 at 03:40
  • There is this comment from the answer I linked to " ok, for me it was error related to NSURLSessionConfiguration. In iOS7 HTTPMaximumConnectionsPerHost = 0 means unlimited or default (don't remember). Now, on iOS8 it's really zero. So task cannot run with this" Are you setting that property? – Paulw11 Jan 21 '15 at 03:41
  • @Paulw11 i filed a bug with apple 19544262 – ewizard Jan 21 '15 at 05:05
  • Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackoverflow.com/rooms/69306/discussion-on-question-by-ewizard-nsurlerrordomain-error-1001). – Taryn Jan 21 '15 at 14:15
  • @ewizard : How did you solve this. Even I have same issue. – Ankita Shah Aug 25 '15 at 05:26
  • @AnkitaShah my problem was happening because there was an apple bug in that version of the code. It got fixed with the next iOS release. Sorry I couldn't be more helpful. – ewizard Aug 25 '15 at 13:57

0 Answers0