LoginSignup
6
6

More than 5 years have passed since last update.

Xamarin iOSでHockeyAppを使ってクラッシュレポートを送る

Posted at

以前はクラッシュレポートにXamarin Insightsという製品が使われていたようだが、現在ではXamarin InsightsはHockeyAppに統合された。

HockeyAppのアカウントを取得する

こちらの「GET STARTED FOR FREE」から。
https://hockeyapp.net/

ダッシュボードにAppを登録する

ダッシュボードから「New App」をクリック。
ipaをアップロードして登録することもできるが、今はまだipaを作っていないので「Create the app manually instead.」を選択。

プラットフォーム:iOS
Release Type:beta
Title: お好みのアプリケーション名
Bundle Identifier:Info.plistに書かれているCFBundleIdentifier

作成するとApp IDという文字列が生成されるので、メモしておく。

プロジェクトにHockeyApp for iOSコンポーネントを追加する

自分はXamarin Studio(Mac)でPCLでプロジェクトを作っているので、

HockeyTest.iOSComponentsを右クリック→Get More ComponentsHockeyApp for iOS を検索してインストール。

image

コードにBITHockeyManagerの呼び出しを追加する

AppDelegate.cs

using HockeyApp.iOS; // 追加


public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
    global::Xamarin.Forms.Forms.Init();

    // この3行を追加
    var manager = BITHockeyManager.SharedHockeyManager;
    manager.Configure("********************************");   // 先ほどメモしておいたApp ID
    manager.StartManager();

    LoadApplication(new App());

    return base.FinishedLaunching(app, options);
}

実行して意図的に例外を発生させてみる

例外発生でクラッシュさせ、アプリを再起動するとReportを送るか聞いてくる。
送るとすぐにダッシュボードにクラッシュが表示される。

image

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6