I have requirement like when user sign up first time , I need to set cellular data on for my app in device setting. Is there any way to set cellular data on programmatically for my app? If no then can anyone give me reason or proof for same? And if yes how we can do that? I have checked this link: Is there a cellular data usage API in iOS 7? and also checked iOS Detect 3G or WiFi . But can't find solution.
Asked
Active
Viewed 2,327 times
0
-
No, because common sense. – Filip Radelic Jan 22 '15 at 11:33
-
@FilipRadelic This answer here : http://stackoverflow.com/a/26355897/2849443 saying something else. Can you explain his answer? I am not getting clue. – Pooja Shah Jan 22 '15 at 12:02
-
I guess you mean this part? ***"you can enable/disable cellular data for specific connections using the NSURLRequest allowsCellularAccess property."*** - just read what the property says - ***"allows..."*** - it's used to prevent a request over cellular network if wifi is not available and has nothing to do with turning cellular data on or off. – Filip Radelic Jan 22 '15 at 15:34
-
The reason you can't find anything about this in Apple's docs is because it's not something Apple would ever even let you think about. Settings.app is there for users to configure their system settings and it would be a disaster if any 3rd party app could programatically change any setting. If you told us what it is that you want to achieve with this, maybe we could offer an alternate solution. – Filip Radelic Jan 22 '15 at 15:40
-
@FilipRadelic I want to to set turn On Cellular Data for my app when user sign up from my app.So I need to turn on cellular data from code. If apple doesn't provide this I need to give reason and proof link to client that apple doesn't provide this – Pooja Shah Jan 23 '15 at 05:38
-
@FilipRadelic that's why I need the link that apple doesn't provide this. If possible can you share with me how can I prove that cellular data on or off can't set from code – Pooja Shah Jan 23 '15 at 06:11
-
If there was proof of everything that *can't* be done, documentation size would be counted in petabytes. If it could be done, it would be there. The fact it's not should be enough of a proof. Joey has already provided you with a good answer and a link to AppStore guideline that states anything not public will be rejected. I suggest you accept his answer and move along. – Filip Radelic Jan 23 '15 at 12:17
1 Answers
1
You can't do that, no. If the device is Jailbroken then sure, you can access private APIs and I imagine there is a way to do it. However, if you want to get on the app store, the best hope is to ask the user to enable cellular data.
That's all you can do.

Joey Clover
- 756
- 5
- 14
-
I am planning to go live on app store. If I can't do this any link of apple that has mentioned this in detail that apple will not approve this? – Pooja Shah Jan 22 '15 at 11:34
-
1https://developer.apple.com/app-store/review/guidelines/#functionality ... 2.5 - Apps that use non-public APIs will be rejected – Joey Clover Jan 22 '15 at 11:46