简体   繁体   English

如何在Xamarin中将Google的API用于使用C#(而非Obj-C)的iOS应用

[英]How can I use Google's API in Xamarin for an iOS app using C# (not Obj-C)

I want to be able to use Google's API to communicate with a Google Spreadsheet within an iOS application that I'm building in Xamarin. 我希望能够使用Google的API与我在Xamarin中构建的iOS应用程序中的Google Spreadsheet通信。 I am familiar with C# but not Obj-C, hence why I'm using Xamarin (C#) and not Xcode (Obj-C). 我熟悉C#但不熟悉Obj-C,因此为什么我使用Xamarin(C#)而不是Xcode(Obj-C)。

I have found the .NET installation instructions at the link below but it is a .msi file for Windows only and I'm using a Mac so I don't know how to install it and use it within Xamarin (or even if that's possible!). 我已经在下面的链接中找到了.NET安装说明,但是它是仅适用于Windows的.msi文件,并且我使用的是Mac,因此我不知道如何在Xamarin中安装和使用它(即使可能的话) !)。

https://developers.google.com/google-apps/spreadsheets/#setting_up_your_client_library https://developers.google.com/google-apps/spreadsheets/#setting_up_your_client_library

I have found the Obj-C library available here: http://code.google.com/p/gdata-objectivec-client/ 我在这里找到了Obj-C库: http : //code.google.com/p/gdata-objectivec-client/

But if it can be avoided I'd much prefer to do it all in C# / Xamarin. 但是,如果可以避免的话,我更愿意在C#/ Xamarin中完成所有操作。 If it can't be done then that's fine I just need to know if it can be as I'd much prefer to do it that way. 如果不能完成,那很好,我只需要知道它是否可以,因为我更喜欢那样做。

If I absolutely have to to do it by using the Obj-C Google library then is that doable when mainly creating the app from Xamarin? 如果我绝对必须使用Obj-C Google库来执行此操作,那么在主要从Xamarin创建应用程序时是否可行? Are there any major considerations or issues that I might find? 我可能会发现一些主要的考虑因素或问题吗?

Any thoughts or help is much appreciated, thanks. 感谢您的任何想法或帮助。

[Xamarin forum post: http://forums.xamarin.com/discussion/9476/how-can-i-use-google-s-api-in-xamarin-for-an-ios-app-using-c-not-obj-c?new=1 ] [Xamarin论坛帖子: http : //forums.xamarin.com/discussion/9476/how-can-i-use-google-s-api-in-xamarin-for-an-ios-app-using-c-not -obj-c?new = 1 ]

C# API for google spreadsheet is poor and not very fast. Google电子表格的C#API很差,而且速度不是很快。 Maybe the best way is creating script on google side. 也许最好的方法是在Google端创建脚本。 Just create project from google disk. 只需从Google磁盘创建项目。 There will be a lot of tutorials. 将会有很多教程。 Unfortunately, it will be not c#, but Javascript, but it is pretty easy and you can send data in this script via POST and GET. 不幸的是,它不是c#,而是Javascript,但是非常简单,您可以通过POST和GET在此脚本中发送数据。

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

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