iPhoneの通信ログを簡単に取得する方法です。 まずPCとiPhoneをUSBケーブルで繋ぎます。 iOSデバイスのUDIDを確認します。(iTunesやXcodeで簡単に確認できます) iTerm2などのターミナルで以下のコマンドを叩きます
Reveal (http://revealapp.com/) なる iOS 向けのランタイムインスペクタなるものを知人のツイート経由で見つけた。ランタイムインスペクタとは何か ・・・ "Reveal brings the power of tools like Firebug and Web Inspector to iOS developers." ということでiOS アプリ用の Firebug みたいなのだと思えば良い。 動画を観てると確かにすごい。3D で動かしながら View の階層を手繰ってアプリのビューがどういう構造になっているかを見ていくことができる。更に動的にパラメータを変更して大きさや動きを変える、なんて Firebug の css の編集みたいなこともできるようだ。ベータ版は無料のようだ。 これは捗る。 RubyMotion で動かす ドキュメントを見てみたところ Re
モバイルデバイス用のWebサイトやWebアプリケーション開発で大変なものの1つが動作確認です。何台ものデバイスを机の上に並べて、ひとつひとつ確認しなければなりません。 アドビシステムズのAdobe Labsが公開した「Adobe Shadow」は、そうした苦労をしているデベロッパー、デザイナーにとって手放せないツールになるでしょう。 複数デバイスに対する同時表示とリモートインスペクション Shadowがどんなツールなのか解説用ビデオの説明を紹介しましょう。 iPhoneアプリのShadowを起動すると番号が表示されます。 その番号を、MacOSかWindows用Chromeブラウザのエクステンションとして配布されているShadowに入力します。これで、ChromeブラウザとiPhoneがペアになりました。 同じように、Android用ShadowもChromeブラウザとペアにすることができ
まず、iPhoneのSafariでどこでも良いのでページを開いてブックマークしましょう。 そして「How to use Firebug on your iPad and iPhone」に書かれているJavaScriptをコピーします。 javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new%20Image;E[r]('src',I+L);})
作った → https://github.com/shokai/iphone-js-console iPhone用のJavaScript shellのようなもの。FirebugやChromeの開発パネルみたいな感じで使う。 chrome拡張やiPhoneシミュレータでiPhone用のwebページの動作は確認できるが、加速度センサやGeo Location APIなんかは実機で動かさないとデバッグできない。 しかしデバッグをしようにも、iPhone上で大量のalertを出すと気が狂ってしまう。iPhoneで実行中のwebページ上の任意のオブジェクトの中身を、Macから覗いたり値を書き換えたり関数を実行したりするツールが必要だったので作った。 なお、Androidのブラウザにはwebsocketが無いのでこのツールは動かない。Androidではlogcatで adb logcat | grep
iPhone アプリをデバッグするときに、ソースに NSLog をそのまま書いてしまうと、リリース時に削除するのが面倒なので、以下のようなマクロを使っています。 #ifdef DEBUG # define LOG(...) NSLog(__VA_ARGS__) # define LOG_METHOD NSLog(@"%s", __func__) #else # define LOG(...) ; # define LOG_METHOD ; #endif 使い方は、まずプロジェクトの設定を開き、「Debug」構成を選択してから、一番下のユーザ定義カテゴリの「GCC_PREPROCESSOR_DEFINITIONS」に「DEBUG」を追加しておきます。 こうすることで、Debug build のときにだけ「DEBUG」が定義されます。 あとは、NSLog の代わりに LOG を使うようにすれば
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く