Skip to content

Commit

Permalink
Simulator support, bump minimum iOS to iOS 15
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelomer committed Jun 29, 2024
1 parent 2289c0a commit ec42131
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
TARGET := iphone:13.7:13.0
ifeq ($(SIMULATOR),1)
TARGET := simulator:clang::14.0
ARCHS = arm64
else
TARGET := iphone:15.6:15.0
ARCHS = arm64e arm64
INSTALL_TARGET_PROCESSES = SpringBoard
endif

include $(THEOS)/makefiles/common.mk

Expand All @@ -11,4 +16,4 @@ Oneko_CFLAGS = -include macros.h -Wno-deprecated-declarations
Tweak.xm_CFLAGS = -fobjc-arc
resources.m_CFLAGS = -fobjc-arc

include $(THEOS_MAKE_PATH)/tweak.mk
include $(THEOS_MAKE_PATH)/tweak.mk
9 changes: 6 additions & 3 deletions Tweak.xm
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,18 @@ static Oneko *neko;
static OnekoWindow *window;
static NSTimer *timer;

@interface UITouchesEvent : NSObject
@end

%hook UITouchesEvent

-(void)_setHIDEvent:(id)event {
%orig;
NSSet<UITouch *> *touches;
if (@available(iOS 11.0, *)) {
touches = [MSHookIvar<NSMutableSet *>(self, "_allTouchesMutable") copy];
touches = [(NSMutableSet *)[self valueForKey:@"_allTouchesMutable"] copy];
} else {
touches = MSHookIvar<NSSet *>(self, "_touches");
touches = (NSSet *)[self valueForKey:@"_allTouches"];
}
if (touches.count == 0) {
return;
Expand Down Expand Up @@ -213,4 +216,4 @@ static void onekoTimerTick() {
[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
}

%end
%end
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Description: Oneko for iOS
Maintainer: pixelomer
Author: pixelomer
Section: Tweaks
Depends: mobilesubstrate (>= 0.9.5000), firmware (>= 13.0)
Depends: mobilesubstrate (>= 0.9.5000), firmware (>= 15.0)

0 comments on commit ec42131

Please sign in to comment.