in my IOS application I have an in-app purchase in my app and I need to send receipt to my web service to assign premium content to a user account. I need this to be reliable ev
I would definitely recommend AFNetworking, a very well-made networking library which wraps NSURLConnection.
In order to use it for your purpose you need to take advantage of the reachability build-in features of AFHTTPClient
as suggested in this other answer.
Basically you can execute and arbitrary block whenever the reachability status of the network changes using the setReachabilityStatusChangeBlock:
method of AFHTTPClient
.
Just remember to link and import the SystemConfiguration
framework, otherwise it won't work.