Giter Site home page Giter Site logo

ptfaketouch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ptfaketouch's Issues

PTFakeTouch ERROR! pointId all used after moving application into background

Steps to reproduce

  1. Run async loop with generating synthetic tap every second
  2. Lock iPhone (press side button)
  3. Unlock iPhone
    ER: taps continue to be performed
    AR: error "PTFakeTouch ERROR! pointId all used"

I've researched the issue a bit. After locking the iPhone all touches in touchAry have phase 'UITouchPhaseCancelled'

Found solution: in + (NSInteger)getAvailablePointId treat touch with phase UITouchPhaseCancelled as available (as Ended/Stationary are)

Keyboard键盘问题

当弹出键盘的时候模拟点击无法点击键盘, 这个貌似要修复下

Files Does not work in iOS 11 devices

I have integrated framework of PTFakeTouch, when I run it on device it shows error saying "Code sign error : bundle format unrecognized, invalid, or unsuitable", and when I run the same in simulator it says error: Invalid bitcode signature, and gives warning missing required architecture x86_64 in IOKIT.framework.

I have included PTFakeTouch.Framework & IOKit.Framework in my project, which I got when I build the PTFakeTouch project. I have just added the team in your project.

And rest everything was same, as mentioned in your GitHub link.

对源码有点疑问

  1. 这个项目跟 https://github.com/louisdh/pointerkit/tree/master/PTFakeTouch-master%202 的关系是?
  2. 不明白为何作如下设计:
+ (void)load{
    KW_ENABLE_CATEGORY(UITouch_KIFAdditions);
    KW_ENABLE_CATEGORY(UIEvent_KIFAdditions);
    touchAry = [[NSMutableArray alloc] init];
    for (NSInteger i = 0; i<100; i++) {
        UITouch *touch = [[UITouch alloc] initTouch];
        [touch setPhaseAndUpdateTimestamp:UITouchPhaseEnded];
        [touchAry addObject:touch];
    }
}

为何要在load的时候预先制造100个UITouch对象出来,为了之后的点击复用?防止每次创建新的对象?
如果是这样的话,创建100个,为何在getAvailablePointId时又只用到50个?

    for (NSInteger i=0; i<touchAry.count-50; i++) {
        UITouch *touch = [touchAry objectAtIndex:i];
        if (touch.phase==UITouchPhaseEnded||touch.phase==UITouchPhaseStationary) {
            [availableIds addObject:@(i+1)];
        }
    }

上面的代码还有个疑问,UITouchPhaseStationary阶段的UITouch拿出去复用真的好吗?如果把它复用成UITouchPhaseBegan,逻辑不通啊 <--- 看错了,这里没问题,后面在复用成UITouchPhaseBegan的时候会重新创建新的UITouch对象

Not support simulator?

Does this framework support simulator?
I'm using XCode 10.0.

Undefined symbols for architecture x86_64:
  "_IOHIDEventCreateDigitizerEvent", referenced from:
      _kif_IOHIDEventWithTouches in PTFakeTouch(IOHIDEvent+KIF.o)
  "_IOHIDEventCreateDigitizerFingerEventWithQuality", referenced from:
      _kif_IOHIDEventWithTouches in PTFakeTouch(IOHIDEvent+KIF.o)
  "_IOHIDEventSetIntegerValue", referenced from:
      _kif_IOHIDEventWithTouches in PTFakeTouch(IOHIDEvent+KIF.o)
  "_IOHIDEventAppendEvent", referenced from:
      _kif_IOHIDEventWithTouches in PTFakeTouch(IOHIDEvent+KIF.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

集成到xocode8报错

ld: warning: ignoring file /Users/Alvin/Downloads/PTFakeTouch-master/IOKit.framework/IOKit.tbd, missing required architecture x86_64 in file /Users/Alvin/Downloads/PTFakeTouch-master/IOKit.framework/IOKit.tbd (3 slices)
Undefined symbols for architecture x86_64:
"_IOHIDEventCreateDigitizerEvent", referenced from:
_kif_IOHIDEventWithTouches in PTFakeTouch(IOHIDEvent+KIF.o)
"_IOHIDEventCreateDigitizerFingerEventWithQuality", referenced from:
_kif_IOHIDEventWithTouches in PTFakeTouch(IOHIDEvent+KIF.o)
"_IOHIDEventSetIntegerValue", referenced from:
_kif_IOHIDEventWithTouches in PTFakeTouch(IOHIDEvent+KIF.o)
"_IOHIDEventAppendEvent", referenced from:
_kif_IOHIDEventWithTouches in PTFakeTouch(IOHIDEvent+KIF.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

tweak

大神们 ... 我想在一个tweak里面调用 要怎么写

Non-public API usage

 

 
Dear Developer,We identified one or more issues with a recent delivery for your app, "XXXX. Please correct the following issues, then upload again. Non-public API usage - The app references non-public symbols in XXXMoudle: _IOHIDEventAppendEvent, _IOHIDEventCreateDigitizerEvent, _IOHIDEventCreateDigitizerFingerEventWithQuality, _IOHIDEventSetIntegerValue. If method names in your source code match the private Apple APIs listed above

FrameWork does not show any file

screen shot 2018-07-16 at 11 33 45 am

Whenever I try to include framework in my project it does not show or give suggestion about .h file.
My os Version is 11.0 & I am using swift 4 / Objective c.

Compile with theos

Did somebody try to compile this lib with theos? I was trying to compile it from ios device, but seem it impossible. XCTest/XCTest.h required, this is one of xcode frameworks I think.

image

I think the only way to compile this lib is xcode? Is it possible to use this lib at tweak? Compile dylib?

Keyboard click

Hi man! Thank you for these samples!
Do you have an idea - why click doesn't work for keyboard?
Keyboard just disappears.
And maybe do you know - how to fix it?

无法滚动

  • (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent )event
    {
    UITouch
    touch = [touches anyObject];
    CGPoint originalLocation = [touch locationInView:self];
    originalLocation.x = 10;
    NSInteger pointId = [PTFakeMetaTouch fakeTouchId:[PTFakeMetaTouch getAvailablePointId] AtPoint:originalLocation withTouchPhase:UITouchPhaseBegan];
    [PTFakeMetaTouch fakeTouchId:pointId AtPoint:originalLocation withTouchPhase:UITouchPhaseBegan];
    }

  • (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent )event
    {
    UITouch
    touch = [touches anyObject];
    CGPoint originalLocation = [touch locationInView:self];
    originalLocation.x = 10;
    NSInteger pointId = [PTFakeMetaTouch fakeTouchId:[PTFakeMetaTouch getAvailablePointId] AtPoint:originalLocation withTouchPhase:UITouchPhaseMoved];
    [PTFakeMetaTouch fakeTouchId:pointId AtPoint:originalLocation withTouchPhase:UITouchPhaseMoved];
    }
    -(void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent )event
    {
    UITouch
    touch = [touches anyObject];
    CGPoint originalLocation = [touch locationInView:self];
    originalLocation.x = 10;
    NSInteger pointId = [PTFakeMetaTouch fakeTouchId:[PTFakeMetaTouch getAvailablePointId] AtPoint:originalLocation withTouchPhase:UITouchPhaseEnded];
    [PTFakeMetaTouch fakeTouchId:pointId AtPoint:originalLocation withTouchPhase:UITouchPhaseEnded];
    }

左边的列表无法滚动。

键盘

挺不错的framework.
但是有键盘的时候还是不行啊..
直接点到下面的window去了 ..
确定修复了么 ...

iOS 14 以上用不了的解决方案

作者是用了 KIF 的扩展分类,但代码比较老旧了。如果遇到 iOS 14 以上用不了的话,可以把 kif 的相关代码同步过去即可。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.