繁体   English   中英

在Xamarin IOS App中使用Hockey SDK时链接失败

[英]Linking failed when using Hockey SDK in Xamarin IOS App

我有一个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表单项目中成功设置曲棍球的人?

你的目标是iOS 6吗?

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

针对iOS 6.0

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

打开项目选项在Build - > iOS Build下转到其他选项 - >其他mtouch参数并添加:-cxx - > gcc_flags“-lc ++”

错误也说明了同样的事情

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM