<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5914534925717554519</id><updated>2026-07-11T08:19:01.463+09:00</updated><category term="日経Watch"/><category term="ソフト開発"/><category term="政治"/><category term="ネットニュース"/><category term="経済"/><category term="iPhone"/><category term="Android"/><category term="携帯"/><category term="科学"/><category term="flex-air"/><category term="外交"/><category term="iPad"/><category term="エコ"/><category term="音楽"/><category term="地元ネタ"/><category term="広告"/><category term="HTML5"/><category term="iOS"/><category term="Google"/><category term="UI/UX"/><category term="ヘルスケア"/><category term="写真"/><category term="サーバー管理"/><category term="教育"/><category term="美術"/><category term="Apple"/><category term="ゲーム"/><category term="映画"/><category term="Flex Coding Tips"/><category term="Mac"/><category term="Android Coding Tips"/><category term="ジャーナリズム"/><category term="旅行"/><category term="iPhone Coding Tips"/><category term="著作権"/><category term="YouTube Data API"/><category term="インディーズ"/><category term="AngularJS"/><category term="読書"/><category term="重要気付き"/><category term="お笑い"/><category term="電子書籍"/><category term="演劇"/><category term="Adobe"/><category term="WindowsMobile"/><category term="Silverlight"/><category term="ゴーヤカーテン日記"/><category term="SoundCloud"/><category term="人生この一曲"/><category term="Java"/><category term="DailyMotion"/><category term="YouTube"/><category term="HybridApps"/><category term="あるキーワードで気になったアプリ"/><category term="ダライ・ラマ"/><title type='text'>琴線探査</title><subtitle type='html'>感動するもの、気になるものをどこまでも探索するブログ</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3862</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-9092119613249452209</id><published>2019-02-28T18:18:00.000+09:00</published><updated>2019-02-28T18:18:29.693+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>macOS MojaveでGoogle Play Musicの制御にメディアキーが使えない場合の対処</title><summary type="text">macOS MojaveでGoogle Play Musicの制御にメディアキーが使えない場合は、

システム環境設定＞セキュリティとプライバシー＞プライバシー＞アクセシビリティ




でChromeにコンピュータの制御の許可を与えてやると動くようになるよ。</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/9092119613249452209/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2019/02/macos-mojavegoogle-play-music.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/9092119613249452209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/9092119613249452209'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2019/02/macos-mojavegoogle-play-music.html' title='macOS MojaveでGoogle Play Musicの制御にメディアキーが使えない場合の対処'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR6euXIenNG7XYhI9ExhxgHLvuhaMIMW1Z7WLu0URQ_4OC-n1o-gfyv0qYizusfJmHIuJRhAqKJfGShobbhlZNHYijI7Irn5SzgZ42rMGiy83BWUB8o6WJvDxK-d4UOW7O-sy1FMR69Nw/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2019-02-28+18.17.12.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-3273156058635135085</id><published>2017-11-04T15:13:00.000+09:00</published><updated>2017-11-07T12:33:40.033+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone Coding Tips"/><title type='text'>iPhoneXかどうかをJavaScriptで判断するには？</title><summary type="text">まずUserAgentで判別できないかと考えた。しかし、

mozilla/5.0 (iphone; cpu iphone os 11_1 like mac os x) applewebkit/604.3.5 (khtml, like gecko) mobile/15b93

という感じなので無理。

cordova-plugin-deviceでもダメ。


で、世間ではどのような議論が行われているかというと、

ios - Detect if the device is iPhone X - Stack Overflow

画面の幅高さで判別しろとか、ネイティブ側で

struct utsname systemInfo;
uname(&amp;amp;systemInfo);

的なことをしろとか、safe-area-inset-*があるかどうかで判別しろとか、そういった議論が行われている。
</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/3273156058635135085/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2017/11/iphonexjavascript.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/3273156058635135085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/3273156058635135085'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2017/11/iphonexjavascript.html' title='iPhoneXかどうかをJavaScriptで判断するには？'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvwhGAvclvwTbQ00UFek-oJ_Pb0lUEeJWdgWD1oWzfPPd7udMbYeGZHHQcUnGtWpQ_2BxG8Rl0nuZELDdEnNtxlhaMgCRQNm4LiwblHX1dtz5-6z3Biys_rK22b_y8BP48xQrEV0VETNY/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2017-11-03+17.26.37.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-8845186278694809126</id><published>2016-08-18T12:47:00.000+09:00</published><updated>2016-08-18T12:47:53.017+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HybridApps"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>CordovaアプリでAppStoreのストア情報の「言語」に「日本語」を追加するには？</title><summary type="text">CordovaアプリをAppStoreに提出すると、何もしなければストア情報の「言語」が英語になる。

気づいてはいた。実際のアプリは日本語のみ対応なので、せめて「日本語、英語」と表示されるようにすべきだ。しかし、そんなところを気にするユーザーはいないだろうと思って解決を先送りにしていたら、ユーザーから指摘を受けた。

やっぱりちゃんと解決しないとダメだと思い直したが、どうすればいいのか？色々と調べたけど、ぴったりな情報は無かったのでログしておこうと思う。

XcodeでFile＞New＞File...

ダイアログが出るので iOS＞Resource＞Strings File＞Next

ファイル保存ダイアログが出るので「Localizable.strings」という名前でResources配下に保存する。

ファイルインスペクター（Xcodeのプロジェクトナビゲーターでファイルを選択</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/8845186278694809126/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2016/08/cordovaappstore.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/8845186278694809126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/8845186278694809126'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2016/08/cordovaappstore.html' title='CordovaアプリでAppStoreのストア情報の「言語」に「日本語」を追加するには？'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-143370216722410482</id><published>2016-03-17T13:23:00.000+09:00</published><updated>2016-03-17T13:27:53.517+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="HybridApps"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone Coding Tips"/><title type='text'>AppleのAppStoreにCordovaアプリを提出してリジェクトされたら…これをチェック！</title><summary type="text">AppleのAppStoreにCordovaアプリを審査に提出したらリジェクトを食らった。曰く。


During review, your app failed to launch on iPad running iOS 9.2.1 and iPhone running iOS 9.2.1 on both Wi-Fi and cellular networks. Specifically, when we selected the application on the Home screen, the app displayed a launch image then quit unexpectedly. This may be because iOS 9 uses a watchdog timer for applications; if an application takes </summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/143370216722410482/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2016/03/appleappstorecordova.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/143370216722410482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/143370216722410482'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2016/03/appleappstorecordova.html' title='AppleのAppStoreにCordovaアプリを提出してリジェクトされたら…これをチェック！'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1Ujf7wHMj7_eo1z91u1v3KGk0je2uFopozU03p_HLxGH7jKj2WgP9_JNOH9lRMsY3B1oXuesByvMYlA8TvcFGMGNmRR56bylBuw_Tsw2veo12Rjf2fs4LcQMbTkhdlGY50uzY7wmTaGE/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2016-03-17+12.48.56.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-3126517766591346049</id><published>2016-03-15T15:53:00.000+09:00</published><updated>2016-03-16T10:52:19.463+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone Coding Tips"/><title type='text'>iOSアプリ申請・公開手順まとめ 〜2016年3月版〜</title><summary type="text">iOSアプリの申請・公開手順については、すでに様々な人々がブログ等でまとめてくれているが、代表的な記事でもすでに少々古くなっていることを否めない。

そこで、2016年3月版として改めて書いておくことにはそれなりの意味があると思うのでログを残しておこうと思う。

記事を書くにあたり、こちらのサイトを大いに参考にさせて頂いた。
よく分かる！iOS アプリのリリース手順のまとめ ｜ Developers.IO


前提として、アプリの開発が済んでいることとする。


1. Production用のCertificateファイルの作成

iOS Certificates - Apple Developer

にアクセス。作業は全てSafariで行った方が良い。

「+」ボタンをクリック。




「App Store and Ad Hoc」を選択してスクロールして「Continue」をクリック</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/3126517766591346049/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2016/03/ios-20163.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/3126517766591346049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/3126517766591346049'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2016/03/ios-20163.html' title='iOSアプリ申請・公開手順まとめ 〜2016年3月版〜'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeTuGaNyTsqkipRP_YHddBOcMHbbFnFedVuanlPQ8dSrmUi79E3AG-hjqxvAi2PAQAZR-6qk5RH5k_MHv-WuZbhHtkTz2-5PJ8dXZs5nSIKkh5xC8sh2NiGaB1jHeedUG3Ckd39tEwJIA/s72-c/01.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-1979598456354743574</id><published>2016-02-26T17:28:00.000+09:00</published><updated>2016-03-08T16:39:13.750+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone Coding Tips"/><title type='text'>【Ionic（Cordova）】Telerik版WKWebViewのpluginでLocal Storageにデータを保存できるようにするには？</title><summary type="text">Ionic（Cordova）でWKWebViewを使う時にハマるのがLocal Storageの扱い。アプリを起動するたびにLocal Storageに保存したデータがリセットされるという問題だ。
&lt;!--
---- 16.03.07追記

iOSのplatformを ionic platform add ios@4.1.0 で作りなおした上、cordova-plugin-wkwebview-engine 1.0.2をインストールしたところ、Local Storageの問題は解決されたようだ＼(^o^)／

----- ここまで
--&gt;
公式のApache版 はこのように解決できる。

iPhoneアプリ開発メモ: WKWebViewでの環境構築がついに発表される

iPhoneアプリ開発メモ: RPGツクールMVでiPhoenアプリビルド最新のcordovaでWKWebViewを使う</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/1979598456354743574/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2016/02/ioniccordovatelerikwkwebviewpluginlocal.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/1979598456354743574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/1979598456354743574'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2016/02/ioniccordovatelerikwkwebviewpluginlocal.html' title='【Ionic（Cordova）】Telerik版WKWebViewのpluginでLocal Storageにデータを保存できるようにするには？'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-6766973342256954718</id><published>2016-02-19T12:11:00.002+09:00</published><updated>2016-02-19T12:22:29.517+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Coding Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>AmazonのAppStoreで位置情報を使うアプリの対応端末を増やす方法</title><summary type="text">最近AmazonのAppStoreはパーミッションに関する制約が厳しくなり、これまで何も言われなかったアプリが警告扱いになり、ついに非対応ということになってしまった。




問題のアプリは位置情報を扱うアプリなのだが、Amazonの端末はGPSを搭載している端末が少ないので、このままでは対応端末が非常に限られてしまう。







改善すべきはAndroidManifest.xmlに設定しているパーミッションの指定。現在、位置情報関連のパーミッションは次の２つ。

&amp;lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&amp;gt;
&amp;lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&amp;gt</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/6766973342256954718/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2016/02/amazonappstore.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/6766973342256954718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/6766973342256954718'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2016/02/amazonappstore.html' title='AmazonのAppStoreで位置情報を使うアプリの対応端末を増やす方法'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieCRY_lQftpAW7maAnDDJoxVIcKsbBjm5z64mP3YOHWwYach5vX0ResojH0nAtaMWHK3xXk0YskNaWNjmdneEs_0fP0J2Hudyfjn5-hG1h3-B-YjtM5BfixAKjp1SZ24FZnp1tcJGcQmA/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2016-02-19+11.44.42.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-5258052677787345766</id><published>2015-10-08T12:40:00.000+09:00</published><updated>2015-10-08T12:40:18.228+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone Coding Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>Swift2で二地点の緯度・経度からその距離を計算するには？</title><summary type="text">二地点の緯度・経度からその距離を計算する（日本は山だらけ〜）

のJava版をSwift2に移植しました。数学は分かりません。理論も分かりません。でもSwiftとJavaは分かるので移植はできるのです(^^);

オリジナルがMITライセンスなので、このコードもリスペクトを込めてMITライセンスとします。



//
//  GeoUtil.swift
//

import Foundation


/**
*  二地点の緯度・経度からその距離を計算する（日本は山だらけ〜） - http://yamadarake.jp/trdi/report000001.html
*/
@objc(GeoUtil) class GeoUtil: NSObject {
    
    
    static let BESSEL_A: Double = 6377397.155;
    static </summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/5258052677787345766/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/10/swift2.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/5258052677787345766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/5258052677787345766'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/10/swift2.html' title='Swift2で二地点の緯度・経度からその距離を計算するには？'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-7589528322378790759</id><published>2015-10-08T12:11:00.000+09:00</published><updated>2015-10-08T12:25:22.840+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone Coding Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>iOS9で位置情報を使う定期バックグラウンド処理をする場合のバッテリー消費を抑えるには？</title><summary type="text">iOSでのバックグラウンド処理の制限

iOSでのバックグラウンド処理は非常に制限されているが、いくつか方法はある。しかし、「定期的にバックグラウンド処理をする」という条件になるとかなり限られる。

どのような方法を選択できるかはアプリのタイプや目的によるが、アプリによらず選択できるであろう方法は少なくとも２つある。

Background fetch

iOSがアプリの利用頻度などから「非定期に」バックグラウンド処理を動作させるので使えない。

Remote Notifications

サーバーからのNotificationが届くタイミングでバックグラウンド処理を起動する方法だが、サーバーサイドの実装が必要な上、Notificationが届くタイミングはまちまちで、最悪の場合は届かないこともあるので、苦労の割に確実性に欠ける。


AndroidのAlarmManagerの代替は無い</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/7589528322378790759/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/10/ios9.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/7589528322378790759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/7589528322378790759'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/10/ios9.html' title='iOS9で位置情報を使う定期バックグラウンド処理をする場合のバッテリー消費を抑えるには？'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-4961940787614678166</id><published>2015-09-15T13:56:00.001+09:00</published><updated>2015-09-16T13:36:48.432+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>SwiftでCordova（ionic）のpluginを開発するには？</title><summary type="text">Swiftでcordovaのプラグインを開発することはできるのだろうか？

このあたりを見ると開発できそうだ。

Chris Dell - Software Developer :: Writing an iOS Cordova plugin in pure Swift

How to write Cordova plugin in Swift? - Stack Overflow

やってみよう。

今回はChrisさんのコードを参考に、HTMLからネイティブに小文字のメッセージを送って大文字変換されたメッセージを受信するというサンプルを作る。これが完成形。




ビルドシステムはionicを使うが、プラグイン部分の開発はcordovaでも通用するはず。

まずはblankプロジェクトを作ろう。


$ ionic start CDVEchoPlugin blank

</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/4961940787614678166/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/09/swiftcordovaionicplugin.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/4961940787614678166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/4961940787614678166'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/09/swiftcordovaionicplugin.html' title='SwiftでCordova（ionic）のpluginを開発するには？'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTiKTmlGW51u9s9rIBRilOiXjxsC7tph4S4Vkh8fuEsCGkwupCiFG6G1wJ-cxu7v6ANZ46zwemUb6oNuGYoHwnR2FpzaLtkiuFaWUHEYt9Ii849J1TiEZ3GxGJrK8LkDFUf4oPWTOloF8/s72-c/iPhone+5+for+junkoro_snapshot_2015-09-14_17-56-17.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-1109332380868984128</id><published>2015-08-26T17:06:00.000+09:00</published><updated>2015-08-26T17:06:17.096+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>これがAngularJSの$apply()や$digest()が低速な理由のひとつか？</title><summary type="text">昨日書いた記事 「琴線探査: Dr. GlebのAngularアプリ最適化TIPSまとめ」&amp;nbsp;に、try-catchがあるとV8では最適化されないため処理が遅くなると書いた。

今日は自分で書いたアプリをプロファイルしてみた。このように、$apply()や$digest()に相当な時間がかかっていることが分かった。




これは予想通りだったが、驚いたのは$apply()や$digest()でtry-catchを使っているらしいことだ。

「Not optimized: TryCatch Statement」とツールチップが出ている。ひょっとすると、これが$apply()や$digest()が低速な理由のひとつなのかもしれない。

だとすると、かなり根本的なレベルで高速化できていないことになる…内部的にtry-catchを使わないようにできないのかなぁ(´・ω・`)</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/1109332380868984128/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/08/angularjsapplydigest.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/1109332380868984128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/1109332380868984128'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/08/angularjsapplydigest.html' title='これがAngularJSの$apply()や$digest()が低速な理由のひとつか？'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAZblJxzRU-GBhoCc-OCWM5CV4ijMcOm3LBKHG3162IcTBjIebUNlbPCQbUsPdVUfPdFzM0PqH_tKBroMDfr1TcemQI7D309dWUp7aB1UQj2lUX6Z3ZvjbI2axixIlBObqGBedjmuShCo/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2015-08-26+16.47.07%25EF%25BC%25882%25EF%25BC%2589.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-5476214415711217973</id><published>2015-08-25T16:49:00.000+09:00</published><updated>2015-08-26T17:11:27.184+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>Dr. GlebのAngularアプリ最適化TIPSまとめ</title><summary type="text">Dr. Glebのブログ記事 Improving Angular web app performance example. | Better world by better software を簡単にまとめておこうと思う。


try-catchはできるだけ使わない

V8ではtry-catchを使った処理は最適化されないので、特にループ処理ではできるだけ使わないようにする。Primesの例ではtry-catchを無くしただけで全体の処理は2倍以上、メソッド単体では200倍近く高速化している。

追記15.08.26：$apply()や$digest()でtry-catchが使われていることが判明(ﾉ∀`)  
琴線探査: これがAngularJSの$apply()や$digest()が低速な理由のひとつか？


ダイジェストサイクルをできるだけ速くする

$scope.$apply()</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/5476214415711217973/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/08/dr-glebangulartips.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/5476214415711217973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/5476214415711217973'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/08/dr-glebangulartips.html' title='Dr. GlebのAngularアプリ最適化TIPSまとめ'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-3244149651697733</id><published>2015-08-13T17:48:00.000+09:00</published><updated>2015-08-13T17:56:35.404+09:00</updated><title type='text'>AngularMaterial VS Polymer - UI部分だけそれぞれで実装・比較して分かったこと</title><summary type="text">あるWEBアプリをAngularMaterialを使って実装しているが、最近Polymerが1.0になったので、実験的にUI部分をPolymerで実装し直して比較してみることにした。

ここに分かったことをまとめておこうと思う。


UIコンポーネントの数

AngularMaterialの方がベーシックに使えるものが多い。最近ではFAB Speed Dialなどのコンポーネントが増え、益々充実してきている。Polymerにもgoogle-mapなどのコンポーネントが増えてはいる。


UIの動作速度

Polymerの方が速い。PolymerはアニメーションにWebAnimationを使用しているが、AngularMaterialはngAnimateに依存しているからだと思われ。


レイアウトのしやすさ

Polymerの方が分かりやすい。Polymerではvertical, </summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/3244149651697733/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/08/angularmaterial-vs-polymer-ui.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/3244149651697733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/3244149651697733'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/08/angularmaterial-vs-polymer-ui.html' title='AngularMaterial VS Polymer - UI部分だけそれぞれで実装・比較して分かったこと'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-6266811799948707529</id><published>2015-08-06T14:53:00.000+09:00</published><updated>2015-08-06T14:53:27.788+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>CSSのtranslate3dをパースして数字の配列にするには？</title><summary type="text">CSSのtranslate3dは例えば translate3d(5, -10, 0) のような文字列になっているが、このままでは計算するのに使いにくい。

そこで、これをパースして数字の配列にするにはどうすればいいだろう。例えば、このような正規表現を使うというのはどうでしょう？

/**
 * CSSのtranslate3d文字列を数字の配列に変換して返す
 */
function parseTranslate3d(string) {
  var array = string.replace(&#39;translate3d&#39;, &#39;&#39;).match(/-?[\d\.]+/g);
  for (var i = 0; i &lt; array.length; i++) {
    array[i] = Number(array[i]);
  }
  return array;
}

</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/6266811799948707529/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/08/csstranslate3d.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/6266811799948707529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/6266811799948707529'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/08/csstranslate3d.html' title='CSSのtranslate3dをパースして数字の配列にするには？'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-1909070729353508533</id><published>2015-07-11T08:15:00.001+09:00</published><updated>2015-07-11T08:15:06.352+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android Coding Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="Google"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>ionicでcrosswalkのビルド後のapkがarmv7とx86に分かれた件</title><summary type="text">最新版のionicでは、crosswalkのビルド後のapkがarmv7とx86に分かれるようになった。

これによって、armv7とx86両対応のために40MB以上になっていたアプリサイズが20MB程度まで軽量化された。

喜ばしい事ではあるけれど、リリース時にとても混乱してしまった。

リリーススクリプトを書いているのだけど、これまでは一つのapkにサインすればよかったものが二つのapkにサインする必要がでてきて、スクリプトがまともに動かなくなってしまったからだ。

しかし、このことに気づいた後は特に問題は無かった。

Google Playでは、すでに一つのリリースで複数のapkをアップロードできるようになっているので全く心配は無い。</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/1909070729353508533/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/07/ioniccrosswalkapkarmv7x86.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/1909070729353508533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/1909070729353508533'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/07/ioniccrosswalkapkarmv7x86.html' title='ionicでcrosswalkのビルド後のapkがarmv7とx86に分かれた件'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-4278201900075999530</id><published>2015-07-08T13:53:00.000+09:00</published><updated>2015-07-08T13:53:44.854+09:00</updated><title type='text'>ionicで最新版のcrosswalkをインストールする方法</title><summary type="text">ionicで最新版のcrosswalkをインストールする方法について。

Crosswalkのstableな最新版はここでチェックできる。

現在「14.43.343.17」が最新版だが、「ionic browser ls」すると




ionicでは14.x系はcanaryになっていることがわかる。

ここに最新版を追加するにはionicのbrowser.jsというスクリプトを編集する。


$ sudo vi /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/browser.js

Browser.crosswalkVersions = [
・・・・
{
version: &#39;12.41.296.5&#39;,
publish_date: &#39;2015-03-05 13:19&#39;
},
{
//独自に追加
</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/4278201900075999530/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/07/ioniccrosswalk.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/4278201900075999530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/4278201900075999530'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/07/ioniccrosswalk.html' title='ionicで最新版のcrosswalkをインストールする方法'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4WQ2UYYe19mVPcDGPRggxkIJSR5H-0Oh17s_vC7Ank7cHbFSM7ntEB4NVrcdR-TYyldNuEXAU3QksOsR_YAs6WEtrZXe5FCvx8oC6zeUCxj-C9llctCfN6YPrINmyTYYSW1_Huss6QN0/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2015-07-08+13.50.50.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-6375913458312843517</id><published>2015-06-27T11:04:00.000+09:00</published><updated>2015-06-27T11:04:32.887+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>Angular2.x系が出るまで1.x系でES6やTypeScriptと共存させる方法についてのビデオ</title><summary type="text">Angular2.x系が出るまで1.x系でES6やTypeScriptと共存させるにはどうしたらよいのか？

この疑問に、このビデオ「Getting Ready for Angular 2.0」がある程度答えてくれていたのでメモ。



55:34あたりからThe question is…「But What Do We Do Now？」と始まる。そう。そこが聞きたかった！

ES6って何となく全く違う言語のような気がしていて、一体どんな風に書くの？と思っていた。

しかし、よくよく考えてみるとES6はES5の機能を受け継いでいるので、ES6で書いてもAngular1.x系は動くのである。というか、「ES5でES6の拡張機能が使えるようになったと考えた方がいい」ということに気づかされた。


例えば、これがおなじみの1.x系でのコントローラーの書き方だ。


そして、ES6と共存させて書く</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/6375913458312843517/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/06/angular2x1xes6typescript.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/6375913458312843517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/6375913458312843517'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/06/angular2x1xes6typescript.html' title='Angular2.x系が出るまで1.x系でES6やTypeScriptと共存させる方法についてのビデオ'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/9ZVvsUCIyRI/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-6480696738423904352</id><published>2015-06-12T16:40:00.001+09:00</published><updated>2015-07-11T08:04:11.784+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Coding Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>ionicでインストールするcrosswalkを選択できない件</title><summary type="text">追記15.07.11：最新版のionic（1.6.1）では「ionic browser add crosswalk@バージョン」で指定通りインストールできるようになった。この記事も合わせて読むとionicの更新に依存することなくcrosswalkの最新版をインストールできるようになる。

琴線探査: ionicで最新版のcrosswalkをインストールする方法

----

最近ionicのCLIが1.5.0にバージョンアップしたのだが、その後platform/androidを削除してcrosswalkを再インストールしたら、localStorageに保存したはずの値がアプリの再起動時に保存前の状態に戻っているという動作になってしまった。

ChromeのDevToolsでは、crosswalkのバージョンは42.0.2311.135となっている。以前のバージョンが何だったのかは覚えてい</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/6480696738423904352/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/06/ioniccrosswalk.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/6480696738423904352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/6480696738423904352'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/06/ioniccrosswalk.html' title='ionicでインストールするcrosswalkを選択できない件'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-7806879329102057794</id><published>2015-06-11T17:44:00.000+09:00</published><updated>2015-06-11T17:44:12.532+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>ionic（cordova）のカスタムプラグイン開発のワークフローを構築する</title><summary type="text">カスタムプラグイン開発のワークフローが必要だ！

ionic（cordova）のカスタムプラグインを開発するのはそれほど難しいことではない。しかし当然の事ながら、プラグインの開発は試行錯誤を重ねる必要がある。そのための円滑なワークフローを構築するのにかなり苦労したので、まとめておきたいと思う。

ここでは、ionic側からカスタムプラグインを叩いてネイティブのノーティフィケーションを表示するサンプルを作ろうと思う。とりあえずAndroid用を開発することにする。


ionicプロジェクトの作成

まず、ionicプロジェクトを作り、CordovaLib-debug.aarを作るため一度ビルドする。



AndroidStudioプロジェクトの作成

AndroidStudioで~/Documents/git/customplugin-androidに、パッケージ名</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/7806879329102057794/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/06/ioniccordova.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/7806879329102057794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/7806879329102057794'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/06/ioniccordova.html' title='ionic（cordova）のカスタムプラグイン開発のワークフローを構築する'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia-a7Ke7nnzteHFq4-sd7NRNxvlPnQQJo8fgQn5BRYA-3W_7sagQlq3YqCaEB1Z3f5URqSFTLXSODkmVDryKNytyH0Xs_x7D9rUuyrw9g_oU0UsgKs2o_nkPJLbX6T6mGXa2hyqPAabzY/s72-c/%25E3%2582%25B9%25E3%2582%25AF%25E3%2583%25AA%25E3%2583%25BC%25E3%2583%25B3%25E3%2582%25B7%25E3%2583%25A7%25E3%2583%2583%25E3%2583%2588+2015-06-11+11.51.00.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-8953005785760584967</id><published>2015-06-02T11:03:00.001+09:00</published><updated>2015-06-11T10:59:06.910+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Google"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>コンテンツのレーティング（IARC）が理由でアプリが不承認（リジェクト）される件 ＠ Google Play</title><summary type="text">Google Playにて、コンテンツのレーティング（IARC）が理由でアプリが不承認（リジェクト）された！不承認を通知するメールにはこんな文言が…


不承認の理由: Google Play コンテンツ レーティング ポリシーへの違反。


 提出したアプリの性質からして、どう考えてもリジェクトされる理由が分からなかった。こんなことは初めてだ。しかし、しばらくすると自動的に承認された(^^);

原因は、「IARC認定」（Certificate ID）が得られる前にアプリを提出したことだと分かった。

IARCのコンテンツレーティング認定アンケートなど、アプリの掲載情報を入力すると提出可能になる。

しかし、実際問題としてはアンケートに答えるだけではダメで、IARCからCertificate IDのメールが来て、Google Play Developer Consoleが次のような状態</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/8953005785760584967/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/06/iarc-google-play.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/8953005785760584967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/8953005785760584967'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/06/iarc-google-play.html' title='コンテンツのレーティング（IARC）が理由でアプリが不承認（リジェクト）される件 ＠ Google Play'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDMKa_iTJP4hekOD5Csq9eAReVO3QmXDwGsY7WNEDZ8eUG00T6JD7c7LYA7jXWIgtyvhN2_dk-qyZwEBQD76zeYtiMgkTRPy8Xd4wVd8XdhqHID0yE0Lq0BQtgTHw7enHq5xbqn9bO8bA/s72-c/image.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-4021644486042066664</id><published>2015-05-13T11:10:00.003+09:00</published><updated>2015-05-13T11:10:33.678+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>脱jQueryするにはdocument.querySelector()もあるけど状況どう？</title><summary type="text">AngularJS内蔵のjqLiteを使うことにしたが、DOMElementを取得するのにdocument.getElementById()というのは使いにくい場合もある。

ところで、jQueryライクなものとしてdocument.querySelector()もあるけど、状況はどうなのか？と。

Can I use... Support tables for HTML5, CSS3, etc

な〜んだ。全然大丈夫じゃん！なら、もはやjQueryも必須ではないし、getElementById()も要らないじゃん！と思ったが…

document.querySelector - Web API インターフェイス | MDN

【訳注: 上記ではクラスセレクタを用いた検索を例示していますが、この様な単発のクラス名の場合は getElementsByClassName() メソッドを用いた</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/4021644486042066664/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/05/jquerydocumentqueryselector.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/4021644486042066664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/4021644486042066664'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/05/jquerydocumentqueryselector.html' title='脱jQueryするにはdocument.querySelector()もあるけど状況どう？'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-8009044459633227432</id><published>2015-05-13T10:37:00.000+09:00</published><updated>2015-05-13T10:37:41.833+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>angular.element()のjQueryを読み込んだ場合とそうでない場合（jqLite）の動作の違い</title><summary type="text">できるだけページを軽量化するためにjQueryを読み込まないようにしようと思った。しかし、jQueryは便利なので捨てがたいなと思っていた。そんな時、angular.element()というメソッドがあることに気がついた。

AngularJS: API: angular.element

AngularJSは内部でjqLiteというjQueryのサブセット版を持っていて、angular.element()はそれを使ってjQueryのオブジェクトを返してくれるらしい。

ただ実際に使ってみると、jQueryを読み込んだ場合とそうでない場合で動作が違うのでハマった。

jQueryを読み込んでいる場合はこのように#targetを取得できるが、そうでない場合、つまりjqLiteのみの場合は取得できない。

var $elm = angular.element(&#39;#target&#39;);

</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/8009044459633227432/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/05/angularelementjqueryjqlite.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/8009044459633227432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/8009044459633227432'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/05/angularelementjqueryjqlite.html' title='angular.element()のjQueryを読み込んだ場合とそうでない場合（jqLite）の動作の違い'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-7246461201575994937</id><published>2015-05-05T16:14:00.000+09:00</published><updated>2015-05-05T16:19:50.932+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Coding Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>ionicプロジェクトのsplash.pngを自動でリサイズしながら9-patchする「make-9patched-splash-ionic」</title><summary type="text">先日、nodejsで9-patch画像を自動生成する方法について書いた。

琴線探査: nodejsで9-patch画像を自動生成する「FourSide1px9patcher」

その後、このコードを使いやすいようにnodeモジュール化した。

junkoro/four-sides-1px-9patcher

ここからが本番。ionicプロジェクトでsplash.pngを自動的にリサイズしつつ9-patchするコードを書くときがｷﾀ(・∀・)!!

すでにnodeモジュール化して公開済み。

junkoro/make-9patched-splash-ionic

インストール方法やコード内容についてはgithubに譲るとして、ここでは開発時に困ったことについて書いておきたいと思う。

9-patchについては開発済みだったので何の問題も無かったが、画像のリサイズが困った。</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/7246461201575994937/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/05/ionicsplashpng9-patchmake-9patched.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/7246461201575994937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/7246461201575994937'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/05/ionicsplashpng9-patchmake-9patched.html' title='ionicプロジェクトのsplash.pngを自動でリサイズしながら9-patchする「make-9patched-splash-ionic」'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-4213231071180555107</id><published>2015-05-03T17:25:00.000+09:00</published><updated>2015-05-05T16:20:58.457+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Android Coding Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="ソフト開発"/><title type='text'>nodejsで9-patch画像を自動生成する「FourSide1px9patcher」</title><summary type="text">
h2 {
 font-size: 20px;
 font-weight: bold;
}


追記15.05.05：使いやすいようにnodeモジュール化した。
junkoro/four-sides-1px-9patcher

9-patchツールの現状 〜 開発意図前から9-patchを作るのは面倒だし問題だと思っていた。そこで改めて現状を調べてみたが、やはり9-patchを作るには

・Android SDKのdraw9patch
・Android Asset Studio - Simple Nine-patch Generator
・Eclipseプラグイン「Draw 9-patch Tool」
・Fireworksなど汎用の画像編集ソフトを使う

という感じ。nodejsで、特にgulpで9-patchを自動化できるツールが無いか探したが、これくらい。

gulp-9-patch</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/4213231071180555107/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/05/nodejs9-patchfourside1px9patcher.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/4213231071180555107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/4213231071180555107'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/05/nodejs9-patchfourside1px9patcher.html' title='nodejsで9-patch画像を自動生成する「FourSide1px9patcher」'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRzPJ6ohQYJV5GmsP3zFs7qxMAA5AgmR0u-BZTwYlXWBxp8F8WvkMlxGrSK1dJfJ6jOqujBgLX1wTApMNG4ktQesIlqqQiujiGEYBB5ZpS2NPvUfDfwD9HdErVu1wfFqwSYkVku95zS60/s72-c/src.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5914534925717554519.post-5422766049178353134</id><published>2015-04-05T18:42:00.001+09:00</published><updated>2015-04-05T18:42:54.356+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="映画"/><category scheme="http://www.blogger.com/atom/ns#" term="演劇"/><title type='text'>迫り来る電子の声と人形に宿った凄まじい情念 〜 映画「ボーカロイドオペラ葵上with文楽人形」＠アミューあつぎ映画.comシネマ</title><summary type="text">映画「ボーカロイドオペラ葵上with文楽人形」 を地元の映画館「アミューあつぎ映画.comシネマ」に見に行ってきた。




動機

一つの理由は、アミューあつぎ映画.comシネマの副支配人でおられる杉本穂高さんのこの記事を見たから。

「ボーカロイド™ オペラ 葵上 with 文楽人形」人ならざるものの魂の躍動&amp;nbsp;|&amp;nbsp;杉本穂高

もう一つの理由は、なぜか分からないけれど以前からアンドロイド的なものが気になっているから。

古くはbjörkの「all is full of love」。



近年では、冨田勲×初音ミク「イーハトーヴ交響曲」とか、オリエント工業のラブドール展とか、平田オリザ・石黒浩のアンドロイド演劇。

これらの作品には根源的に共通する何かがあるはずだと思うのだけど、いまだにそれが一体何なのか分からないので、今度こそハッキリさせよう！と。


「葵上」と</summary><link rel='replies' type='application/atom+xml' href='http://kinsentansa.blogspot.com/feeds/5422766049178353134/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://kinsentansa.blogspot.com/2015/04/withcom.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/5422766049178353134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5914534925717554519/posts/default/5422766049178353134'/><link rel='alternate' type='text/html' href='http://kinsentansa.blogspot.com/2015/04/withcom.html' title='迫り来る電子の声と人形に宿った凄まじい情念 〜 映画「ボーカロイドオペラ葵上with文楽人形」＠アミューあつぎ映画.comシネマ'/><author><name>junkoro</name><uri>http://www.blogger.com/profile/15432737623834607140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/sNl0GTXmhOE/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>