iOS

iOS UIWebView and Javascript interactions

Posted on

https://github.com/marcuswestin/WebViewJavascriptBridge

廣告

Auto increment build number by run script. (Xcode)

Posted on

1. to add key in your Project-info.plist
CFBuildNumber, CFBuildDate
2. add scripts to your run script (in Xcode)
myPlist=$PROJECT_DIR/$PROJECT_NAME/$PROJECT_NAME-info.plist
CFBuildNumber=$(/usr/libexec/PlistBuddy -c “Print CFBuildNumber" $myPlist)
CFBuildNumber=$(($CFBuildNumber + 1))
/usr/libexec/PlistBuddy -c “Set :CFBuildNumber $CFBuildNumber" $myPlist
CFBuildDate=$(date)
/usr/libexec/PlistBuddy -c “Set :CFBuildDate $CFBuildDate" $myPlist
echo “build number: " $CFBuildNumber

3. get info from Project-info.plist and show on somewhere.
NSString * version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
NSString * buildNo = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBuildNumber"];
NSString * buildDate = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBuildDate"];

instruments remote exception encountered

Posted on

solution:
make sure your Xcode set the Profile scheme as Debug than Release.

install ldid

Posted on

get binary from
http://svn.telesphoreo.org/trunk/data/ldid/ldid-1.0.610.tgz
% tar -zxf ldid-1.0.610.tgz
% cd ldid-1.0.610
% g++ -I . -o util/ldid{,.cpp} -x c util/{lookup2,sha1}.c
% sudo cp -a util/ldid /usr/bin