Warning
The following guide need to disable SIP to work.
Please confirm the risk of disabling the SIP by yourself.
Another solution which does not require disabling SIP is currently under investigation.
Reboot into Recovery OS + Disable SIP
#objective-c xrefs hopper script | |
#rewrite the IDAPython script https://github.com/fireeye/flare-ida/blob/master/python/flare/objc2_xrefs_helper.py | |
#author: Kai Lu(@k3vinlusec) | |
#editor: Zhuoli Li(@dreampiggy) | |
def getRefPtr(doc,classMethodsVA,objcSelRefs, objcMsgRefs, objcConst): | |
ret = (None, None) | |
namePtr = doc.readUInt64LE(classMethodsVA) #get name field in struct __objc_method, it's selector | |
ctn = 0 |
title | date | tags | categories | author | ||||||
---|---|---|---|---|---|---|---|---|---|---|
The Core of SDWebImage v5.6 Architecture |
2020-02-22 23:08:12 +0800 |
|
|
土土Edmond木 |
This article is based on SDWebImage 5.6. Why i write this article, cause i found that SD's API is constantly iterating, and many of the structures are different from earlier versions. Here is to make a record. We will start from the top of the API's level list below, force on the entire framework's data flow.
extension AnimatedImage { | |
struct WrapperView: View & Inspectable { | |
var name: String | |
var bundle: Bundle? | |
@State var isAnimating: Bool | |
var onViewUpdate: (Self, PlatformView, AnimatedImage.Context) -> Void | |
var body: some View { | |
AnimatedImage(name: name, bundle: bundle, isAnimating: $isAnimating) |
extension String | |
{ | |
/// Creates a string by decoding a sequence of UTF-8 code units. | |
init?<S: Sequence>(utf8 input: S) where S.Iterator.Element == UTF8.CodeUnit { | |
var chars: [Character] = [] | |
var decoder = UTF8() | |
var iter = input.makeIterator() | |
loop: while true { | |
switch decoder.decode(&iter) { | |
case .scalarValue(let scalar): chars.append(Character(scalar)) |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) | |
{ | |
NSRunLoop * runLoop; | |
CLIMain * main; // replace with desired class | |
@autoreleasepool | |
{ | |
// create run loop |
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { | |
if (!self.isUserInteractionEnabled || self.isHidden || self.alpha <= 0.01) { | |
return nil; | |
} | |
if ([self pointInside:point withEvent:event]) { | |
for (UIView *subview in [self.subviews reverseObjectEnumerator]) { | |
CGPoint convertedPoint = [subview convertPoint:point fromView:self]; | |
UIView *hitTestView = [subview hitTest:convertedPoint withEvent:event]; | |
if (hitTestView) { | |
return hitTestView; |
// | |
// PSPDFFastEnumeration.h | |
// PSPDFFoundation | |
// | |
// PSPDFKit is the leading cross-platform solution for integrating PDFs into your apps: https://pspdfkit.com. | |
// Try it today using our free PDF Viewer app: https://pdfviewer.io/ | |
// | |
// This file is MIT licensed. | |
@protocol PSPDFFastEnumeration <NSFastEnumeration> |
#ifndef dispatch_main_sync_safe | |
#define dispatch_main_sync_safe(block)\ | |
if ([NSThread isMainThread]) {\ | |
block();\ | |
} else {\ | |
dispatch_sync(dispatch_get_main_queue(), block);\ | |
} | |
#endif | |
#ifndef dispatch_main_async_safe |