Skip to content

Instantly share code, notes, and snippets.

View chunta's full-sized avatar
😄
I am tired

chunta

😄
I am tired
View GitHub Profile
find “$PROJECT_DIR/Carthage/Build/iOS” -name ‘*.framework’ -type d | while read -r FRAMEWORK
do
PATH_COUNT=$(echo “$FRAMEWORK/” | grep -o ‘/’ | wc -l)
FILE_NAME=$(echo $FRAMEWORK | cut -d ‘/’ -f $PATH_COUNT | cut -d ‘.’ -f 1)
EXECUTE_FILE=“$FRAMEWORK/$FILE_NAME”
echo $EXECUTE_FILE
if $(lipo $EXECUTE_FILE -verify_arch i386) ; then
lipo -remove i386 $EXECUTE_FILE -o $EXECUTE_FILE
@chunta
chunta / uiapplication-method-swizzling.m
Created November 28, 2019 04:56 — forked from dfox/uiapplication-method-swizzling.m
Method Swizzling in UIApplication to Capture Touch Events
#import "UIApplication+EventInterceptor.h"
#import <objc/runtime.h>
#import "EventLogger.h"
@implementation UIApplication (EventInterceptor)
+(void) load
{
//Swap the implementations of our interceptor and the original sendEvent:
Method oldMethod = class_getInstanceMethod(self, @selector(sendEvent:));
@chunta
chunta / uiapplication-method-swizzling.m
Created November 28, 2019 04:56 — forked from dfox/uiapplication-method-swizzling.m
Method Swizzling in UIApplication to Capture Touch Events
#import "UIApplication+EventInterceptor.h"
#import <objc/runtime.h>
#import "EventLogger.h"
@implementation UIApplication (EventInterceptor)
+(void) load
{
//Swap the implementations of our interceptor and the original sendEvent:
Method oldMethod = class_getInstanceMethod(self, @selector(sendEvent:));