Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to use cocoapods in xamarin.ios

shivashakthishivashakthi GBMember
edited March 2017 in Xamarin.iOS

I would like to use some thridparty libraries found in cocoapods but those libraries are not available in Nuget.
Basically I would like to use these libraries in xamarin.

I have asked the same question in stackoverflow also

Please help me with detailed steps


  • DuraiHDuraiH USMember ✭✭

    These docs are meant for Objective c based cocoapods but how about Swift based cocoapods library ?

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    Unfortunately our binding engine does not work with Swift libraries at this time.

  • HowardFore.0656HowardFore.0656 USMember
    edited July 2017

    I'm trying to follow that documentation, maybe I'm missing something. My goal is to install the Firebase Cloud Messaging component for iOS. The Getting Started directs me to the Google instructions which says to use Cocoapods. Am I correct that Sharpie is the prefererred method for a Xamarin project?

    The "real world example" page referred above says to do: "sharpie pod init ios AFNetworking".

    My real world is different:
    $ sharpie pod init ios 'Firebase/Core'
    error: invalid SDK identifier: ios
    $ sharpie pod init iOS 'Firebase/Core'
    error: invalid SDK identifier: iOS

    This is in a Forms project with iOS and Android.

    Any ideas what I'm missing?

    UPDATE: The answer in my case, pieced together from a number of different SO posts was that sharpie is hard-coded to look for the iOS sdk's through XCode's default location of /Applications/ That's not where mine was. Plus xcodebuild wasn't pointing to Xcode's Developer directory. Now on to other errors, LOL:

    [ERROR] FATAL UNHANDLED EXCEPTION: Sharpie.ProcessException: 'pod --version' exited with error code 1
    at Sharpie.ProcessRunner.Run[T] (FilePath executablePath, Sharpie.ProcessArguments arguments, System.Func3 readHandler, Boolean redirectStandardOutput, Boolean redirectStandardError) <0x109403b80 + 0x0037a> in <filename unknown>:0 at Sharpie.CocoaPods.Pod.get_Version () <0x1094038a0 + 0x0020d> in <filename unknown>:0 at Sharpie.PodTool+PodCommandTool.CheckForCocoaPods () <0x1094036a0 + 0x00010> in <filename unknown>:0 at Sharpie.PodTool+InitTool.Run () <0x1094025b0 + 0x00171> in <filename unknown>:0 at Sharpie.Tooling.Tool.Run (IEnumerable1 args) <0x1093f1070 + 0x0064a> in :0
    at Sharpie.Tooling.ToolRunnerTool.Run () <0x109400140 + 0x00289> in :0
    at Sharpie.Tooling.Tool.Run (IEnumerable1 args) <0x1093f1070 + 0x0064a> in <filename unknown>:0 at Sharpie.Tooling.ToolRunnerTool.Run () <0x109400140 + 0x00289> in <filename unknown>:0 at Sharpie.Entry+SharpieToolRunnerTool.Run () <0x109400070 + 0x0002c> in <filename unknown>:0 at Sharpie.Tooling.Tool.Run (IEnumerable1 args) <0x1093f1070 + 0x0064a> in :0
    at Sharpie.Tooling.ToolRunnerTool.Run (IEnumerable1 args, System.Action1 aboutToRunToolHandler) <0x1093f0fd0 + 0x0005c> in :0
    at Sharpie.Entry.Main (System.String[] args) <0x10608ae60 + 0x0032b> in :0

  • NashZhouNashZhou USMember ✭✭✭

    @HowardFore.0656 Shouldn't the preferred method be using the component from Xamarin Component store? I'm not too familiar with the Visual Studio IDE, but at least for Visual Studio for Mac there is a Components folder where you can edit your components.

    If you right click that folder, click edit components, and log into your Xamarin account, you should be able to search the store and download the firebase component without going through Objective Sharpie.

  • anoopmohanananoopmohanan USMember ✭✭


    I know this is an old post, I saw an article which uses objc-automatic tool.


Sign In or Register to comment.