简体   繁体   English

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

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

I have a Xamarin.forms app. 我有一个Xamarin.forms应用程序。 In the iOS project I installed the HockeyApp package from here and followed the samples here by adding the following code in my AppDelegate.cs : 在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
    // ...
}

As soon as I try to compile the program Visual Studio throws the following error (and some more of that kind): 一旦我尝试编译该程序,Visual Studio就会抛出以下错误(以及其他一些错误):

Severity Code Description Project File Line Suppression State Error Native linking failed, undefined symbol: std::__1::__vector_base_common::__throw_length_error() const. 严重级代码描述项目文件行抑制状态错误本机链接失败,未定义符号:std :: __ 1 :: __ vector_base_common :: __ throw_length_error()const。 Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. App.iOS 请验证是否已引用所有必需的框架,并且已正确链接本机库.App.iOS

When I comment that code piece everything runs fine. 当我评论代码时,一切运行正常。 Any suggestions on that? 有什么建议吗? Anybody who successfully setup Hockey in an ios xamarin forms project? 在ios xamarin表单项目中成功设置曲棍球的人?

Are you targeting iOS 6? 你的目标是iOS 6吗?

If so from the getting started section on the HockeyApp Component it states this: 如果是这样,从HockeyApp组件的入门部分可以看出:

Targeting iOS 6.0 针对iOS 6.0

If you would like your app to target iOS 6.0 you will need to add the following arguments to your application project settings. 如果您希望应用程序以iOS 6.0为目标,则需要在应用程序项目设置中添加以下参数。

Open project Options Under Build -> iOS Build Go to the Additional Options -> Additional mtouch arguments and add: -cxx ->gcc_flags "-lc++" 打开项目选项在Build - > iOS Build下转到其他选项 - >其他mtouch参数并添加:-cxx - > gcc_flags“-lc ++”

Also this bug says the same thing 错误也说明了同样的事情

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

相关问题 本机链接在 xamarin.iOS 中失败 - Native linking failed in xamarin.iOS grpc.core 的 Xamarin iOS 本机链接失败 - Xamarin iOS native linking failed for grpc.core 使用参数的 Xamarin Forms 应用程序链接 - Xamarin Forms App Linking using parameters Xamarin iOS-“ ..的本地链接失败”,带有静态库绑定 - Xamarin iOS - “Native linking failed for ..” with Static Library Bind 如何将使用Zooz ios SDK的Zooz付款网关集成到Xamarin ios应用中? - How can i integrate zooz payment gateway using zooz ios sdk into xamarin ios app? 当从 Azure 管道生成 Xamarin-iOS nuget 时出现奇怪的“本机链接失败,未定义 Objective-C 类”(但在本地构建时不会) - Weird 'Native linking failed, undefined Objective-C class' when Xamarin-iOS nuget is generated from Azure Pipeline (but not when it's built locally) Xamarin表单:iOS链接框架 - Xamarin Forms: iOS Linking Framework 本机链接失败,未定义符号错误。 Xamarin Forms PCL iOS Visual Studio - Native linking failed, undefined symbol error. Xamarin Forms PCL iOS Visual Studio 将Xamarin Forms应用程序链接到API - Linking a Xamarin Forms app to an API xamarin IOS:警告:应用程序无法安装+启动 - xamarin IOS: Warning: App failed to install+launch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM