I am fairly new to iOS programming and I'm trying to make an iOS 5.1 app that communicates with a server to receive information from a database. I got the server returning the needed information from the database by following this tutorial: http://www.raywenderlich.com/2941/how-to-write-a-simple-phpmysql-web-service-for-an-ios-app
But then I tried to follow a the other half of the tutorial by the same guy: http://www.raywenderlich.com/2965/how-to-write-an-ios-app-that-uses-a-web-service
In this one we use JSON, ASIHTTPRequest and MBProgressHUD, but I get a lot of errors when I run this because ASIHTTPRequest is no longer supported in iOS 5.1.
Can anyone point me in the right direction here? I you can show me another tutorial that works for iOS 5.1 that would be great. I have looked but I can't find any.
Thanks
ASIHTTPRequest
is most likely returning errors in your iOS 5.1 app because you're using ARC.ASIHTTPRequest
wasn't written in ARC, which is why it's throwing tons of errors. But there's an easy workaround:ASIHTTPRequest
and add the following linker flag:-fno-objc-arc
. This linker flag acts as a crossbridge between the old non-ARC files and your ARC-based project.Although there may be residual warnings left, this trick should remove all other error messages associated with
ASIHTTPRequest
.