How to do touch and hold in iOS app using Python client for Appium

Hey guys,
I posted this question originally in Stackoverflow but haven’t received any response yet. Will appreciate your help. ( Using URL because this forum complains new users can’t have more than 4 links in a post !)

Here is the actual question.

We are trying to write an automated test for our iOS app using the Appium python client.
We want to imitate Swipe event on an element but none of the APIs from
appium.webdriver.common.touch_action seem to be behaving the way we want.
Basically we want to break down swipe in three events (KEYDOWN, MOVE, KEYUP).
The flow goes as below

  1. Find the element.
  2. Hold it, swipe it from point A to B and Hold it there. (KEYDOWN and MOVE)
  3. Do something.
  4. Do something more.
  5. Release the element. (KEYUP)

How can we achieve it on iOS ?

We have it working on Android using monkeyrunner. It works as below

hr = MonkeyRunner.waitForConnection(timeout = 60, deviceId = dev_2)
hr.touch(X, Y,MonkeyDevice.DOWN)
for i in range(1, 13):
hr.touch(X, Y + 20*i, hr.MOVE)

// Do something

hr.touch(X, Y, MonkeyDevice.UP)