如何为Xamarin.iOS创建crashlytics绑定? [英] How to create crashlytics binding for Xamarin.iOS?

查看:84
本文介绍了如何为Xamarin.iOS创建crashlytics绑定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了将Crashlytics.framework集成到XCode项目中的Crashlytics应用程序,它对于XCode非常有用.但是据我所知,要构建Xamarin.iOS绑定,我需要静态库,而且在框架和Crashlytics.app内容中都找不到它.只有运行"可执行文件和标头.我不知道如何在Xamarin.iOS下使用它.顺便说一句,在Xamarin论坛上的AndrewReed 设法以某种方式构建了dll,因此有可能.

I've downloaded Crashlytics app that integrates Crashlytics.framework into XCode project, and it works great for XCode. But as far as I know, to build Xamarin.iOS binding I need static library, and I can't find it neither in framework nor in Crashlytics.app contents. There is only "run" executable and header. I don't know how to use it under Xamarin.iOS. Btw, AndrewReed on Xamarin forum managed to build dll somehow, so it's possible.

那么,如何为Xamarin创建crashlytics绑定?

推荐答案

AndrewReed回答Xamarin论坛上的这个问题:

与许多sdk一样,有时它们捆绑一个文件夹而不是静态库,该库本质上是静态库.将有一个很大的文件,可能没有扩展名(这是您的.a文件),因此您可以将其重命名为.a,然后将其包含在xamarin绑定项目中.在文件夹的头文件上运行Sharpie标记,这将生成您所需的文件.提防一个陷阱,委托是c#中的保留字,因此您可能需要四处更改,并在名称中添加@符号以允许您使用保留字.所以我实际上所做的是,用xcode创建一个项目并运行crashlytics程序,然后将crashlytics框架添加到该项目中.在finder中找到它,您将具有如下结构:-运行-/Versions-/A --- Crashlytics ---/Headers ---- Crashlytics.h

As with quite a few sdk's, sometimes they bundle a folder instead of the static lib,which essentially is the static library. There will be a sizeable file that maybe doesnt have an extension(this is your .a file) so you can rename that to be .a and then include that in a xamarin bindings project. Run the sharpie marker on the header file in the folder which will generate your necessary files. Watch out for one gotcha, delegate is a reserved word in c#, so you may need to go around and change this by adding an @ symbol(to the name) to allow you to use the reserved word. So what I actually did was, created a project in xcode and ran the crashlytics programme, this then added the crashlytics framework to the project. In finder locate that and you will have a structure like so: - run - /Versions --/A ---Crashlytics ---/Headers ----Crashlytics.h

因此/A文件夹本质上是您的静态库,请使用它并从中创建您的绑定,或者在这种情况下,只需从单声道绑定||中下载它即可.我的仓库.

So the /A folder is essentially your static lib, use this and create your binding from that, or in this particular case, just download it from the mono bindings || my repo.

这篇关于如何为Xamarin.iOS创建crashlytics绑定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆