titanium 3.3 / 3.4 と ios で気をつけたいこと

Post on 27-May-2015

3.089 Views

Category:

Technology

6 Downloads

Preview:

Click to see full reader

DESCRIPTION

Titanium 3.3 / 3.4 と iOS を組み合わせてアプリを作る場合に気をつけたいことを紹介しています (Japanese)

TRANSCRIPT

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

Titanium もくもく会 #21 in ZEPPELIN

みやした りゅうたろう

Titanium もくもく会 #21 in ZEPPELIN

Mobile App Engineer

Titanium もくもく会 #21 in ZEPPELIN

Titanium 3.3 で強化された点は……

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

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 3.2.3.GA

一部抜粋 / Titanium もくもく会 #21 in ZEPPELIN

"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 3.3.0.GA / 3.4.0.RC2

Titanium もくもく会 #21 in ZEPPELIN

単なる GET でも HTTP ヘッダが変わってます※ Content-Type はワナだと思います

Titanium もくもく会 #21 in ZEPPELIN

ちなみに

http.setRequestHeader('Content-Type', null);

http.setRequestHeader('Content-Type', '');

で Header からクリアできると思いきや、

じゃないと “値が” 消えないから要注意です※ ドキュメントには … Value to assign to the header. May be null to clear a default header value, such as X-Requested-With.   …… ってあるのにね

Titanium もくもく会 #21 in ZEPPELIN

気をつけよう(;´∀`)

iOS 8

Titanium もくもく会 #21 in ZEPPELIN

WKWebView App Extension

Custom Keyboard Touch ID API

iOS 8

Titanium もくもく会 #21 in ZEPPELIN

WKWebView App Extension

Custom Keyboard Touch ID API

ATOK

width: 1024 height: 406

= キーボードの横幅 / 高さwidth: 1024 height: 406

Titanium もくもく会 #21 in ZEPPELIN

Ti.App.addEventListener( 'keyboardframechanged', function (e) { console.log(e); } );

Titanium もくもく会 #21 in ZEPPELIN

キーボードの表示 / 非表示で発火 …… ではない!

Titanium もくもく会 #21 in ZEPPELIN

キーボード領域の大きさが変わると発火 …… ATOK は表示で3回発火する※ デフォルトキーボードは表示1回, 非表示1回 ※ SwiftKey / TouchPal は表示2回~3回

Titanium もくもく会 #21 in ZEPPELIN

気をつけよう:(;゙゚’ω゚'):

http://qiita.com/ryugoo/items/5e559bb95c9780523a15 / 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 編集で何とかできるけど…

ほかにも……

Titanium もくもく会 #21 in ZEPPELIN

ワナも色々あるけれど CODE STRONG!

top related