简体   繁体   中英

ASIHTTPRequest - what broke in iOS 5?

I have been using ASIHTTPRequest to do a simple POST upload of a "Scores and Settings" xml file to my server on an iOS game. As of iOS 5, ASIHTTPRequest is having some issues, and as mentioned here the library has been abandoned.

My question: What actually broke in iOS 5? I have looked at the other options for doing HTTP connections and uploading and they look heavy-hitting and a bit difficult compared to the ASI lib. If possible, I'd like to fix it, but I can't seem to figure out why it's not working. I just get:

[STATUS] Request Failed.
[STATUS] Starting asynchronous request.

Weird that the "Failed" line prints first, eh?

I have tried the suggestions at iOS 5 : https ( ASIHTTPRequest) stop working as well.

I presume the server you're having a problem with is https?

The main change is explained here:

http://developer.apple.com/library/ios/#technotes/tn2287/_index.html#//apple_ref/doc/uid/DTS40011309

However you say you've already the solutions that would fix problems related to this.

There are some more suggestions here:

https://github.com/pokeb/asi-http-request/issues/273

In particular:

After opening a support incident with Apple and a lot of back and forth I finally resolved my issue with accessing certain https URLs on iOS5. It turns out that a change was made in the iOS 5 networking code which causes iOS to reject secure connections if the server uses a non-standard key length. The server I was talking to had a 2056 byte key, instead of the typical 2048 bytes. I was able to get the server admins to regenerate their key and now everything works fine again.

Does the same server work okay in Safari on the same device?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM