Jestin Francis
Jestin Francis

Reputation: 323

How to detect the iPhone is falling down or moving upwards in Objective-C or Swift?

How to detect the device is falling down or moving upwards in Objective-C or Swift? The Core Motion only detect the movement when we tilt the device I need to detect the free fall of the device. Is there any relevant sensors calculating the falling speed of the iPhone?

Upvotes: 4

Views: 1008

Answers (1)

Zell B.
Zell B.

Reputation: 10286

Apple iPhone 6 has integrated barometer sensor so this might be the sensor that you are looking for. To access barometer data you will need to use CMAltimeter and CMAltitudeData classes

Upvotes: 2

Related Questions