狠狠撸

狠狠撸Share a Scribd company logo
Titanium 3.3 / 3.4 と 
iOS で気をつけたいこと 
Titanium もくもく会 #21 in ZEPPELIN
みやした りゅうたろう 
Mobile App Engineer 
Titanium もくもく会 #21 in ZEPPELIN
Titanium 3.3 で強化された点は…… 
Titanium もくもく会 #21 in ZEPPELIN
HTTPClient Improvements 
! 
As of this Release, the HTTP client on iOS 
uses the iOS NSURLConnection class, 
replacing the ASIHTTPRequest class. The 
new implementation did not add, modify 
or remove any APIs. No modifications to 
existing application should be required. 
Titanium 3.3.0.GA Release Notes より引用 / Titanium もくもく会 #21 in ZEPPELIN
     *      * 
  *     +  うそです 
     n ∧_∧ n 
 + (?(* ??`)E) 
      Y     Y    * 
Titanium もくもく会 #21 in ZEPPELIN
var http = Ti.Network.createHTTPClient({ 
onload: function () { 
console.log(this.responseText); 
} 
}); 
http.open('GET', 'http://httpbin.org/get'); 
http.send(null); 
Titanium もくもく会 #21 in ZEPPELIN
"headers": { 
"Accept-Encoding": "gzip", 
"Connection": "close", 
"Host": "httpbin.org", 
"User-Agent": "Appcelerator Titanium/3.2.3.GA", 
"X-Requested-With": "XMLHttpRequest" 
} 
一部抜粋 / Titanium もくもく会 #21 in ZEPPELIN 
Titanium 3.2.3.GA
Titanium 3.3.0.GA / 3.4.0.RC2 
"headers": { 
"Accept": "*/*", 
"Accept-Encoding": "gzip, deflate", 
"Accept-Language": "ja-jp", 
"Connection": "close", 
"Content-Type": "application/x-www-form-urlencoded; 
charset=utf-8", 
"Host": "httpbin.org", 
"User-Agent": "Appcelerator Titanium/3.4.0" 
} 
一部抜粋 / Titanium もくもく会 #21 in ZEPPELIN
単なる GET でも 
HTTP ヘッダが変わってます 
※ Content-Type はワナだと思います 
Titanium もくもく会 #21 in ZEPPELIN
で Header からクリアできると思いきや、 
Titanium もくもく会 #21 in ZEPPELIN 
ちなみに 
http.setRequestHeader('Content-Type', null); 
http.setRequestHeader('Content-Type', ''); 
じゃないと “値が” 消えないから要注意です 
※ ドキュメントには … Value to assign to the header. May be null to clear a default header value, such as X-Requested-With. 
  …… ってあるのにね
Titanium もくもく会 #21 in ZEPPELIN 
気をつけよう(;??`)
WKWebView App Extension 
iOS 8 
Custom Keyboard Touch ID API 
Titanium もくもく会 #21 in ZEPPELIN
WKWebView App Extension 
iOS 8 
Custom Keyboard Touch ID API 
Titanium もくもく会 #21 in ZEPPELIN
ATOK
width: 1024 
height: 406
width: 1024 = キーボードの横幅 / 高さ 
height: 406
Ti.App.addEventListener( 
'keyboardframechanged', 
function (e) { 
Titanium もくもく会 #21 in ZEPPELIN 
console.log(e); 
} 
);
キーボードの表示 / 非表示で発火 
…… ではない! 
Titanium もくもく会 #21 in ZEPPELIN
キーボード領域の大きさが変わると発火 
…… ATOK は表示で3回発火する 
※ デフォルトキーボードは表示1回, 非表示1回 
※ SwiftKey / TouchPal は表示2回~3回 
Titanium もくもく会 #21 in ZEPPELIN
気をつけよう:(;??’ω?'): 
Titanium もくもく会 #21 in ZEPPELIN
? Ti 3.3.0.GA と iOS 8 の組み合わせ 
→ AlertDialog のレイアウトがちょい変 
→ 3.4.0 で直ってますが、GA はいつ? 
? iPhone 6 / 6 Plus 対応は 3.4.0 推薦 
→ iOS 6 はサヨウナラを許容できますか? 
→ tiapp.xml 編集で何とかできるけど… 
http://qiita.com/ryugoo/items/5e559bb95c9780523a15 / Titanium もくもく会 #21 in ZEPPELIN 
ほかにも……
Titanium もくもく会 #21 in ZEPPELIN 
ワナも色々あるけれど 
CODE STRONG!

More Related Content

Titanium 3.3 / 3.4 と iOS で気をつけたいこと

  • 1. Titanium 3.3 / 3.4 と iOS で気をつけたいこと Titanium もくもく会 #21 in ZEPPELIN
  • 2. みやした りゅうたろう Mobile App Engineer Titanium もくもく会 #21 in ZEPPELIN
  • 3. Titanium 3.3 で強化された点は…… Titanium もくもく会 #21 in ZEPPELIN
  • 4. HTTPClient Improvements ! As of this Release, the HTTP client on iOS uses the iOS NSURLConnection class, replacing the ASIHTTPRequest class. The new implementation did not add, modify or remove any APIs. No modifications to existing application should be required. Titanium 3.3.0.GA Release Notes より引用 / Titanium もくもく会 #21 in ZEPPELIN
  • 5.      *      *   *     +  うそです      n ∧_∧ n  + (?(* ??`)E)       Y     Y    * Titanium もくもく会 #21 in ZEPPELIN
  • 6. var http = Ti.Network.createHTTPClient({ onload: function () { console.log(this.responseText); } }); http.open('GET', 'http://httpbin.org/get'); http.send(null); Titanium もくもく会 #21 in ZEPPELIN
  • 7. "headers": { "Accept-Encoding": "gzip", "Connection": "close", "Host": "httpbin.org", "User-Agent": "Appcelerator Titanium/3.2.3.GA", "X-Requested-With": "XMLHttpRequest" } 一部抜粋 / Titanium もくもく会 #21 in ZEPPELIN Titanium 3.2.3.GA
  • 8. Titanium 3.3.0.GA / 3.4.0.RC2 "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Accept-Language": "ja-jp", "Connection": "close", "Content-Type": "application/x-www-form-urlencoded; charset=utf-8", "Host": "httpbin.org", "User-Agent": "Appcelerator Titanium/3.4.0" } 一部抜粋 / Titanium もくもく会 #21 in ZEPPELIN
  • 9. 単なる GET でも HTTP ヘッダが変わってます ※ Content-Type はワナだと思います Titanium もくもく会 #21 in ZEPPELIN
  • 10. で Header からクリアできると思いきや、 Titanium もくもく会 #21 in ZEPPELIN ちなみに http.setRequestHeader('Content-Type', null); http.setRequestHeader('Content-Type', ''); じゃないと “値が” 消えないから要注意です ※ ドキュメントには … Value to assign to the header. May be null to clear a default header value, such as X-Requested-With.   …… ってあるのにね
  • 11. Titanium もくもく会 #21 in ZEPPELIN 気をつけよう(;??`)
  • 12. WKWebView App Extension iOS 8 Custom Keyboard Touch ID API Titanium もくもく会 #21 in ZEPPELIN
  • 13. WKWebView App Extension iOS 8 Custom Keyboard Touch ID API Titanium もくもく会 #21 in ZEPPELIN
  • 14. ATOK
  • 16. width: 1024 = キーボードの横幅 / 高さ height: 406
  • 17. Ti.App.addEventListener( 'keyboardframechanged', function (e) { Titanium もくもく会 #21 in ZEPPELIN console.log(e); } );
  • 18. キーボードの表示 / 非表示で発火 …… ではない! Titanium もくもく会 #21 in ZEPPELIN
  • 19. キーボード領域の大きさが変わると発火 …… ATOK は表示で3回発火する ※ デフォルトキーボードは表示1回, 非表示1回 ※ SwiftKey / TouchPal は表示2回~3回 Titanium もくもく会 #21 in ZEPPELIN
  • 21. ? Ti 3.3.0.GA と iOS 8 の組み合わせ → AlertDialog のレイアウトがちょい変 → 3.4.0 で直ってますが、GA はいつ? ? iPhone 6 / 6 Plus 対応は 3.4.0 推薦 → iOS 6 はサヨウナラを許容できますか? → tiapp.xml 編集で何とかできるけど… http://qiita.com/ryugoo/items/5e559bb95c9780523a15 / Titanium もくもく会 #21 in ZEPPELIN ほかにも……
  • 22. Titanium もくもく会 #21 in ZEPPELIN ワナも色々あるけれど CODE STRONG!