1

我有一个 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 吗?

4

1 回答 1

3

你的目标是 iOS 6 吗?

如果是这样,从HockeyApp 组件的入门部分中可以看出:

针对 iOS 6.0

如果您希望您的应用程序以 iOS 6.0 为目标,您需要将以下参数添加到您的应用程序项目设置中。

在 Build -> iOS Build 下打开项目选项 转到 Additional Options -> Additional mtouch arguments 并添加:-cxx ->gcc_flags "-lc++"

这个错误也说了同样的话

于 2016-04-19T21:58:01.730 回答