gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 23:17:37 25 4
gpt4 key购买 nike

我有一个 Xamarin.forms 应用程序。在 iOS 项目中,我从 here 安装了 HockeyApp 包。并关注样本 here通过在我的 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 抛出以下错误(以及更多此类错误):

Severity Code Description Project File Line Suppression State Error Native linking failed, undefined symbol: 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

当我评论那段代码时,一切都运行良好。有什么建议吗?有人在 ios xamarin 表单项目中成功设置了 Hockey 吗?

最佳答案

您的目标是 iOS 6 吗?

如果是,来自 getting started section在 HockeyApp 组件上,它说明了这一点:

Targeting 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.

Open project Options Under Build -> iOS Build Go to the Additional Options -> Additional mtouch arguments and add: -cxx ->gcc_flags "-lc++"

还有这个bug说同样的话

关于c# - 在 Xamarin IOS App 中使用 Hockey SDK 时链接失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36726675/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com