0

When there is no Internet connection, is there a way to tell the user that they cannot Bump their iPhone to transfer data. I have used motionEnded: method to detect the shake, but the sensitivity is less compared to the Bump feature.

Any help?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Ganesh Nayak
  • 802
  • 11
  • 38
  • You should never gate anything network related based on whether the iPhone believes there is a network available, because the act of attempting to use the network will often make it available. – Steven Fisher Jun 26 '12 at 05:49

2 Answers2

0

use apple's reachability class to check for connection availability and pop up a alertview with your desired message for user.

Saurabh Passolia
  • 8,099
  • 1
  • 26
  • 41
  • I have implemented that, but this should happen only when the user bump with another device. If I use motionEnded coupled with apple's reachability, I have to Bump with more energy, then what I get with Bump. Bump's sensitivity is more smoother. – Ganesh Nayak Jun 26 '12 at 05:16
0

Your question is not clear. Can you tell more about what you are trying to achieve, what you have done so far?

Anyway If I am getting this right, you want to transfer data when there is no internet connection. Remember bluetooth? Apple has built a GameKit framework on top of it. You can explore that.

Srikar Appalaraju
  • 71,928
  • 54
  • 216
  • 264
  • I don't want to transfer data when there is no internet connection. I just want to notify the user that He cannot transfer the data since there is no internet connection, when the user Bump the device. – Ganesh Nayak Jun 28 '12 at 03:51
  • thats easy. checking for internet connection. Try using this awesome project - https://github.com/tonymillion/Reachability – Srikar Appalaraju Jun 28 '12 at 13:12
  • I have already used Reachability to notify about no internet when trying to access the network. The issue is that when the user Bump the iPhone to transfer/exchange data, no block is executed or no event is called, when no internet. – Ganesh Nayak Jun 29 '12 at 03:30