Wei's Memo

A programmer's log.

UIWebView Lost Basic Auth

method in

http://stackoverflow.com/questions/1769888/how-to-display-the-authentication-challenge-in-uiwebview

causes a problem.

to be continued

Installing Git Autocompletion Script for Mac

1
curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash

No need to worry about what directory you’re in when you run this command, it is set to go to your home directory as ~ is used with the target.

Then I added to my ~/.bash_profile file the following ‘execute if it exists’ code:

1
2
3
if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash
fi

iOS Device CPUs

1
2
3
ARMv7s = iPhone 5, iPad 4
ARMv7  = iPhone 3GS, iPhone 4, iPhone 4S, iPod 3G/4G/5G, iPad, iPad 2, iPad 3, iPad Mini  
ARMv6  = iPhone 2G/3G, iPod 1G/2G

Set UIWebView’s Background Color

set the webview’s opaque property to NO .. and set the background of the view underneath to green.

when the webview is CDVCordovaView, just set it opaque to NO, and set the view’s background color:

1
self.webView.backgroundColor = BACKGROUND_COLOR;

Build Android Project With Ant

Converting to ant project

android update project -p or android update project -s -p

solving the “dir.sdk missing” error

sdk.dir is missing. Make sure to generate local.properties using ‘android update project’ or to inject it through an env var.

android update project –target android-17 …