Hai to all In general cases if we want to get the data from any URL ,using internet or Wi-fi we will hit the url and parse that data and use it. But in the application what I am doing, I need to use pdp_ip0 cellular network only even though the wi=fi is available. So ,could any one help me how to use cellular n/w. Thank you all.
Asked
Active
Viewed 1,148 times
2 Answers
0
Using Reachability classes. You can check your device network (wi-fi or cellular ) and based on that you can allow to download data.You can go here :- http://developer.apple.com/iphone/library/samplecode/Reachability/Listings/Classes_Reachability_h.html#//apple_ref/doc/uid/DTS40007324-Classes_Reachability_h-DontLinkElementID_5

Sandeep Kumar
- 1,595
- 1
- 12
- 19
-
ok thank you very much for your response. Yes I have seen 1 app which uses reachability classes . when running it if network is not there it just throwing the alert box . Could you please post a sample code that using cellular network how to get the data from URL and necessary settings to do. Thank you so much for Your help Sandy – ratna Jun 21 '10 at 12:06
-
Getting the data is not dependable on network. Before sending the request check network status according to your requirement. Just go through the reachablity classes . It calrify how to check network. – Sandeep Kumar Jun 21 '10 at 13:14
-
In the app what I am going to develop should use cellular data network that gets data from an url in background(even though wifi is there). so i should connect to cellular data network and should data from URL(without using NSUrl class) – ratna Jun 21 '10 at 14:09