Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use cocoapods with xamarin

is this really to use cocoacontrols with xamarin? For example this one: http://www.cocoacontrols.com/platforms/ios/controls/kycirclemenu I know that I can create something like circle menu with UICollectionView (http://docs.xamarin.com/guides/ios/user_interface/introduction_to_collection_views) But anyway wondering is this really use cocoapods.

Thanks, Yaro

like image 724
Yaroslav Bigus Avatar asked Mar 05 '13 09:03

Yaroslav Bigus


2 Answers

Given that you write the binding for the API (http://docs.xamarin.com/guides/ios/advanced_topics/binding_objective-c_libraries), yes, you can probably use that control in your xamarin.ios app.

Before starting a new binding, check if it's already available here or elsewhere on github

like image 128
Stephane Delcroix Avatar answered Oct 12 '22 23:10

Stephane Delcroix


You can bind Objective C based Cocoapods to xamarin and its officially supported (https://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/walkthrough/)

  1. you have to find the github repo of the cocoapod and convert that into a static library(.a) file
  2. you have to use that static library to create binding library in Xam studio

then you are good to use in xamarin.ios

But swift based library is not officially supported in Xamarin.So you can't use Swift based cocoapods directly in xamarin as you do But there are workarounds

  1. You can bridge the Swift framework to C# using Objective C i.e expose the Swift APIs using Objective C and convert that into .a static library and then binding library

  2. Try porting the Swift to C# and it should be faster as well

As Stephane Delcroix quoted

Look if there are any existing monotouch bindings available here before starting to port

like image 21
Durai Amuthan.H Avatar answered Oct 13 '22 00:10

Durai Amuthan.H