O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

20150520 Extensionのログを取ろう 関モバ #2

2.770 visualizações

Publicada em

関西モバイルアプリ研究会 #2
「Extensionのログを取ろう」の資料です

Publicada em: Software
  • DOWNLOAD FULL BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui

20150520 Extensionのログを取ろう 関モバ #2

  1. 1. Extensionの ログを取ろう 2015.5.20 関西モバイルアプリ研究会 #2 @itok_twit
  2. 2. @itok_twit • いとうけい(itok) • 公私共にプログラマ iOS / Mac(たまに Android や Windows) • http://itok.jp/ • 新しい名刺もらってください→
  3. 3. Extension側の ログを取り出したい 実機デバッグ用とか ユーザからのフィードバック用に
  4. 4. App Groupを使おう
  5. 5. 準備 App Group追加 プロジェクトに設定(Extension側も忘れずに)
  6. 6. Log用ライブラリ CocoaLumberjack XCGLogger Objective-C ○ Swift △ ○ ファイル出力 ○ ○ ファイルの ローテーション ○ 今日はこちらを
  7. 7. CocoaLumberjack // AppGroupが使用するパスを取得 NSURL* url = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier: @"group.jp.itok.GroupTest"]; url = [url URLByAppendingPathComponent:@"Library/Caches/Logs" isDirectory:YES]; // ログファイルの出力先に↑のディレクトリを指定 DDLogFileManagerDefault* mgr = [[DDLogFileManagerDefault alloc] initWithLogsDirectory:[url path]]; DDFileLogger* fileLogger = [[DDFileLogger alloc] initWithLogFileManager:mgr]; [DDLog addLogger:fileLogger]; // ログ出力 DDLogInfo(@"[app] launch"); App本体とExtension両方で同じ初期化を実行
  8. 8. ログ結果 Extensionのログ Bundle IDごとにログ出力 あとは自由に料理しましょう Appのログ

×