[DEBUG] Session did end with error Error Domain=DTiPhoneSimulatorErrorDomain Code=1 UserInfo=0x100413f10 "シミュレートされたアプリケーションを終了します。"
というエラーで落ちる不具合の修正法。■追記
以下はPINの表示画面の遷移までしかできない。
PINまで取得してくれる修正方があったので、こちらの方が有用
Titanium MobileでTwitterOAuth時のエラーと解決方法 - 俺の作業ログ
lib/oauth_adapter.jsのvar authorizeUICallback = function(e)を以下のように修正する。
var authorizeUICallback = function(e){
var select = exports.select;
var body = e.source.html;
var handler = new htmlparser.DefaultHandler(function(err, dom){
if (err) {
alert('Error: ' + err);
}
else {
var div = select(dom, 'div');
div.forEach(function(div2){
if (div2.attribs.id == 'oauth_pin') {
var codeDiv = select(dom, 'code');
codeDiv.forEach(function(code){
code.children.forEach(function(codeData){
pin = codeData.data;
if (receivePinCallback)
setTimeout(receivePinCallback, 100);
id = null;
div = null;
destroyAuthorizeUI();
});
});
};
});
}
});
var parser = new htmlparser.Parser(handler);
parser.parseComplete(body);
};