Im working on a navigation app that requires active wifi access (due to its connectivity to a hardware device using wifi), my trouble is that when the app is in the background the wifi scanning interval is dropping considerably and at some point the app will scan for wifi connectivity only every 5 minutes.
Any ideas of how it would be possible to trigger a wifi scan more often?
Any lead appreciated!
Thanks!
Go for Reachability.h class and use kReachabilityChangedNotification defined in the class.
Related
I am developing an app that needs to be debugged under a slow connection. My issue is that I only own an iPhone 5 that uses LTE. I can disable LTE in my Settings for a 4G connection but this 4G connection is still to fast for my testing purposes. I would like to know if there is a way to programmatically force the testing iPhone into 3G or EDGE.
You'll want to test flaky in addition to just going slow - you can simulate this with apple's network link conditioner and running your iPhone through your mac's internet connection (or run simulator). See Installing Apple's Network Link Conditioner Tool .
If you really want some good testing, the best way to do it is look up your cell provider's coverage map and find some crappy locations. Test in those areas while driving in and out of range should weed out any broken network code you have. :)
Network Link Conditioner also exists on the device in recent iOS builds, i'm not positive of when they added it.
But its present in Settings, under the Developer menu.
I can disable LTE in my Settings for a 4G connection but this 4G connection is still to fast for my testing purposes
LTE is (a kind of) 4G.
If you disable it, it will fall back to EDGE. Alternatively, you may switch to a Wi-Fi connection and slow it down (if your router has such a feature).
I have wifi issues in with my application and the iPod I use for development. Other users have reported the same problems with my app.
The app keeps an open connection using sockets, and I show the connection status on top. Also the application reconnects when is disconnected.
The wifi signal of my iPod drops every 1 minute, and eventually, it drops until: I plug a power-source to the iPod or I exit the application.
It's really and issue that is driving me crazy :-P
The iPod iOS version is 5.0.1
Do you know what can I do to fix this problem? Did anybody else have the same connection problems?
Thanks in advance.
Edit: Added log: http://pastebin.com/hYVs5Vat
Edit2: Seems that I have two different problems,
1- the wifi dropping and coming every minute.
2- the application disconnecting completely the wifi. [SOLVED]
The 1st one looks to be an iPod vs router problem, not applications fault.
You can try setting the
Application uses WiFi
boolean to YES in the plist. If you don't then it turns off the WiFi after some time to save battery.
this is really important for me to switch between Wifi & 3G on iphone via code .
so is there any possibility any backdoor or some way to crack. i can scan all the wifi hot spot and can drag their details but i need a background process that help me to scan 3g also and allow me to auto-switch whenever it finds wifi
You dont need to do this in code.
The iPhone does this automatically for you anyway. As long as you have a wifi enabled on the iphone, it will pick up the wigi signal and when it can connect will automatically switch to the wifi signal.
Hope this helps.
Let me know if it did a little. thanks
PK
Lets consider that I am connected to internet through 3G in my App. When a wi-fi hot spot seems to be appearing, can I programmatically switch to the wi-fi. Is this vice-versa condition possible?
iOS does this automatically by itself!
If no known WiFi network is found, it uses cellular data. If it finds a known WiFi-network, it connects to and uses that network instead.
If any WiFi-network is found, and your application requests access to the internet, iOS (usually) automatically presents an alertView and lets the user log in to a WiFi-network. If the user does not log into a WiFi-network, it stays on the 3G-network. When iOS 7 comes, iOS may connect to Hotspot 2.0 networks automatically as well.
Apple keeps individual apps on a tight leash, and so they do not let apps control things like this.
I have developed an application for iPhone, which is continuously interacting with database ... I have observed that it is running fine in 3G environment but in wifi its performance is not good.
Can someone suggest what can be the reason for it? or can I do anything to resolve it?
I'd rather expect the contrary, given that 3G cellular signal may fluctuate wildly, while WIFI signal should stay almost the same even if you move within the room served by the access point.
The reason may be the particular wireless connection you are using for testing purposes. Try using a different WIFI network and see if the behavior you are experiencing changes.