集成Reveal

一、创建.lldbinit
command alias reveal_load expr (void*)dlopen((char*)[(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2);
command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
command alias reveal_stop expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil];


二、创建脚本lazy-copy-reveal.sh
#!/bin/sh

APPBUNDLEPATH="${TARGET_BUILD_DIR}/${EXECUTABLE_NAME}.app/"

REVEALFRAMEWORKPATH="/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib"

if [ -f "${REVEALFRAMEWORKPATH}" ] && [ "${CONFIGURATION}" == "Debug" ]; then
        cp "${REVEALFRAMEWORKPATH}" "${APPBUNDLEPATH}"
fi

猜你喜欢

转载自wrsuifeng.iteye.com/blog/2064610