-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove more PTFakeTouch Remove CGGeometry Reference Fix cursor More cleanup Axe more unused functions Fix warning More unused functions More unused functions Remove OS Version Checks Mac Catalyst on Monterey and Ventura will alwyas be iOS 15+ therefore these platform checks are unnecessary. Remove unnecessary swizzle Remove unused struct Remove more unused structs Remove more functions Remove whitespace Remove UIApplication unused methods Remove more Remove private interfaces from KIF headers Rename folder Whitespace fixes Remove unused swizzle method Whitespace Move script Fix comment Remove unused selectors Comments Change to init swizzle Try again Bump deployment target + remove folder - Removed ‘Recovered References’ Folder - Bump deployment targets to match PlayCover (introduces a couple deprecation warnings) Fix deprecation warnings More cursor disable to AKInterface Remove PTFakeTouch disable cursor Whitespace Remove unnecssary Obj-C Hacks (Needs testing) Seems to work but I don’t entirely understand their original function, so needs to be tested. Remove check (handled by dispatch_once) Remove view specification Whitespace Remove more Remove more Remove more Add back toucher/view cacher Remove unused available checks Simplify PlayLoader - `dyld_get_base_platform` returns PLATFORM_IOS even when passed PLATFORM_IOSMAC - `sysctlbyname` calls `sysctl` under the hood - `csops` Nothing is changed Add comments to PlayLoader Add source Fix compilation error Add back sysctlbyname interpose Fix indentation Remove unused PlayUI Remove unused FileManager extension Remove some unused variables + cleanup
- Loading branch information
1 parent
df1ef2a
commit e3e422b
Showing
42 changed files
with
292 additions
and
2,227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
PlayTools/Controls/PTFakeTouch/Additions/UITouch-KIFAdditions.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// UITouch-KIFAdditions.h | ||
// KIF | ||
// | ||
// Created by Eric Firestone on 5/20/11. | ||
// Licensed to Square, Inc. under one or more contributor license agreements. | ||
// See the LICENSE file distributed with this work for the terms under | ||
// which Square, Inc. licenses this file to you. | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "IOHIDEvent+KIF.h" | ||
#import "UITouch+Private.h" | ||
|
||
@interface UITouch (KIFAdditions) | ||
|
||
- (id)initAtPoint:(CGPoint)point inWindow:(UIWindow *)window onView:(UIView*)view; | ||
- (id)initTouch; | ||
|
||
- (void)setLocationInWindow:(CGPoint)location; | ||
- (void)setPhaseAndUpdateTimestamp:(UITouchPhase)phase; | ||
|
||
@end |
106 changes: 106 additions & 0 deletions
106
PlayTools/Controls/PTFakeTouch/Additions/UITouch-KIFAdditions.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
// | ||
// UITouch-KIFAdditions.m | ||
// KIF | ||
// | ||
// Created by Eric Firestone on 5/20/11. | ||
// Licensed to Square, Inc. under one or more contributor license agreements. | ||
// See the LICENSE file distributed with this work for the terms under | ||
// which Square, Inc. licenses this file to you. | ||
|
||
#import "UITouch-KIFAdditions.h" | ||
#import <objc/runtime.h> | ||
#import "PTFakeMetaTouch.h" | ||
|
||
@implementation UITouch (KIFAdditions) | ||
|
||
- (id)initAtPoint:(CGPoint)point inWindow:(UIWindow *)window onView:(UIView*)view; | ||
{ | ||
self = [super init]; | ||
if (self == nil) { | ||
return nil; | ||
} | ||
|
||
// Create a fake tap touch | ||
[self setWindow:window]; // Wipes out some values. Needs to be first. | ||
|
||
[self _setLocationInWindow:point resetPrevious:YES]; | ||
|
||
UIView *hitTestView = view; | ||
|
||
[self setView:hitTestView]; | ||
[self setPhase:UITouchPhaseBegan]; | ||
if (![[NSProcessInfo processInfo] isiOSAppOnMac] && ![[NSProcessInfo processInfo] isMacCatalystApp]) { | ||
[self _setIsTapToClick:NO]; | ||
} else { | ||
[self _setIsFirstTouchForView:YES]; | ||
[self setIsTap:NO]; | ||
} | ||
[self setTimestamp: [[NSProcessInfo processInfo] systemUptime]]; | ||
if ([self respondsToSelector:@selector(setGestureView:)]) { | ||
[self setGestureView:hitTestView]; | ||
} | ||
|
||
[self kif_setHidEvent]; | ||
return self; | ||
} | ||
|
||
- (id)initTouch; | ||
{ | ||
//DLog(@"init...touch..."); | ||
self = [super init]; | ||
if (self == nil) { | ||
return nil; | ||
} | ||
NSArray *scenes = [[[UIApplication sharedApplication] connectedScenes] allObjects]; | ||
NSArray *windows = [[scenes objectAtIndex:0] windows]; | ||
UIWindow *window = [windows lastObject]; | ||
CGPoint point = CGPointMake(0, 0); | ||
[self setWindow:window]; // Wipes out some values. Needs to be first. | ||
|
||
[self _setLocationInWindow:point resetPrevious:YES]; | ||
|
||
UIView *hitTestView = [window hitTest:point withEvent:nil]; | ||
|
||
[self setView:hitTestView]; | ||
[self setPhase:UITouchPhaseEnded]; | ||
//DLog(@"init...touch...setPhase 3"); | ||
if (![[NSProcessInfo processInfo] isiOSAppOnMac] && ![[NSProcessInfo processInfo] isMacCatalystApp]) { | ||
[self _setIsTapToClick:NO]; | ||
} else { | ||
[self _setIsFirstTouchForView:YES]; | ||
[self setIsTap:NO]; | ||
} | ||
[self setTimestamp: [[NSProcessInfo processInfo] systemUptime]]; | ||
if ([self respondsToSelector:@selector(setGestureView:)]) { | ||
[self setGestureView:hitTestView]; | ||
} | ||
|
||
[self kif_setHidEvent]; | ||
return self; | ||
} | ||
|
||
// | ||
// setLocationInWindow: | ||
// | ||
// Setter to allow access to the _locationInWindow member. | ||
// | ||
- (void)setLocationInWindow:(CGPoint)location | ||
{ | ||
[self setTimestamp: [[NSProcessInfo processInfo] systemUptime]]; | ||
[self _setLocationInWindow:location resetPrevious:NO]; | ||
} | ||
|
||
- (void)setPhaseAndUpdateTimestamp:(UITouchPhase)phase | ||
{ | ||
//DLog(@"setPhaseAndUpdateTimestamp : %ld",(long)phase); | ||
[self setTimestamp: [[NSProcessInfo processInfo] systemUptime]]; | ||
[self setPhase:phase]; | ||
} | ||
|
||
- (void)kif_setHidEvent { | ||
IOHIDEventRef event = kif_IOHIDEventWithTouches(@[self]); | ||
[self _setHidEvent:event]; | ||
CFRelease(event); | ||
} | ||
|
||
@end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.