D
D
diesmal2013-04-12 11:33:15
Objective-C
diesmal, 2013-04-12 11:33:15

Software touch on an iOS device?

I really hope to get a recipe or a hint. There is a task on iPhone, iOS 6.1.3 (jailbreak). Make a software system touch. As far as I understood, earlier this was done through the Private API, the GraphicsServices framework, something like this:

+(void)simulateTouchDown:(CGPoint)point{

    point.x = roundf(point.x);
    point.y = roundf(point.y);

    GSEventRecord record;
    memset(&record, 0, sizeof(record));

    record.type = kGSEventHand;
    record.windowLocation = point;
    record.timestamp = GSCurrentEventTimestamp();

    GSSendSystemEvent(&record);

}

But, there is no reaction from the device. Other ways used structures that no longer exist.
Has anyone done similar tasks? Maybe there is another way to make this touch?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktorianec, 2013-04-15
@Victorianec

Yes, your way worked, of course. But perhaps there is an option to use such a method?

[self.buttonCalibrate sendActionsForControlEvents:UIControlEventTouchUpInside];

But if a touch is needed, then at the moment it is difficult to find any other way.

A
Alexey Storozhev, 2013-09-27
@storoj

In iOS 6, GraphicsServices works without jail, but there is a lot of shamanism. Carefully analyze all the topics on stack overflow, I can’t help specifically now, unfortunately.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question