Skip to content

Commit

Permalink
Added CrashManager Binding to allow AutoSend/Disable of crash reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Viv-Rajkumar committed Mar 23, 2014
1 parent 9f180be commit 19bd180
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
Binary file modified bin/HockeyApp.dll
Binary file not shown.
15 changes: 15 additions & 0 deletions src/HockeyApp/ApiDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,23 @@ public interface BITHockeyManager {

[Export("startManager")]
void StartManager();

[Export ("crashManager", ArgumentSemantic.Retain)]
BITCrashManager CrashManager { get; }
}

[BaseType (typeof (NSObject))]
public partial interface BITHockeyBaseManager {
[Export ("serverURL", ArgumentSemantic.Copy)]
string ServerURL { get; set; }
}

[BaseType (typeof (BITHockeyBaseManager))]
public partial interface BITCrashManager {
[Export ("crashManagerStatus")]
BITCrashManagerStatus CrashManagerStatus { get; set; }
}

[BaseType (typeof (NSObject)), Model]
public interface BITCrashManagerDelegate {
[Export ("applicationLogForCrashManager:")]
Expand Down
3 changes: 3 additions & 0 deletions src/HockeyApp/HockeyApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,7 @@
<BundleResource Include="HockeySDKResources.bundle\feedbackActiviy%402x.png" />
<BundleResource Include="HockeySDKResources.bundle\Info.plist" />
</ItemGroup>
<ItemGroup>
<ObjcBindingCoreSource Include="StructsAndEnums.cs" />
</ItemGroup>
</Project>
11 changes: 11 additions & 0 deletions src/HockeyApp/StructsAndEnums.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;

namespace HockeyApp
{
public enum BITCrashManagerStatus : uint {
Disabled = 0,
AlwaysAsk = 1,
AutoSend = 2
}
}

4 changes: 4 additions & 0 deletions src/SampleApp/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ static void EnableCrashReportingUnsafe ()

var manager = BITHockeyManager.SharedHockeyManager;
manager.Configure (HockeyAppId, null);

// Uncomment following line to enable auto-send of crash reports on relaunch of app
// manager.CrashManager.CrashManagerStatus = BITCrashManagerStatus.AutoSend;

manager.StartManager ();
}
}
Expand Down

0 comments on commit 19bd180

Please sign in to comment.