我有一个 Xamarin.forms 应用程序。在 iOS 项目中,我从此处安装了 HockeyApp 包,并按照此处的示例在我的 中添加以下代码AppDelegate.cs
:
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
//We MUST wrap our setup in this block to wire up
// Mono's SIGSEGV and SIGBUS signals
HockeyApp.Setup.EnableCustomCrashReporting (() => {
//Get the shared instance
var manager = BITHockeyManager.SharedHockeyManager;
//Configure it to use our APP_ID
manager.Configure ("YOUR-HOCKEYAPP-APPID");
//Start the manager
manager.StartManager ();
//Authenticate (there are other authentication options)
manager.Authenticator.AuthenticateInstallation ();
//Rethrow any unhandled .NET exceptions as native iOS
// exceptions so the stack traces appear nicely in HockeyApp
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
Setup.ThrowExceptionAsNative(e.ExceptionObject);
TaskScheduler.UnobservedTaskException += (sender, e) =>
Setup.ThrowExceptionAsNative(e.Exception);
});
//The rest of your code here
// ...
}
一旦我尝试编译程序,Visual Studio 就会抛出以下错误(以及更多此类错误):
严重性代码描述项目文件行抑制状态错误本机链接失败,未定义符号:std::__1::__vector_base_common::__throw_length_error() const。请确认所有必要的框架都已被引用,并且本地库已正确链接。 App.iOS
当我评论那段代码时,一切都运行良好。对此有何建议?有人在 ios xamarin forms 项目中成功设置 Hockey 吗?