Binding CocoaPods library using Objective Sharpie

Viewed 968

I have been trying to bind a cocoaPods library written in objective-c using the Objective sharpie tool. I also have the .framework files.

First i tried to import the .Framework files under the native references on visual studio (IOS Project) then connected my VS to a MacOS with the needed SDK installed and built the app. The app built but did nothing with the native references. So i gave objective sharpie a shot. This is what i am doing:

After i installed cocoapods and objective sharpie I created a single page app in XCode. Navigated to the project directory in the Terminal, and executed the command:

sharpie pod init ios BiometridAuth

and got this result:

** Setting up CocoaPods master repo...
(this may take a while the first time)
** Searching for requested CocoaPods...
error: Could not find CocoaPod: BiometridAuth
hint: try grepping 'pod list' ?

So objective sharpie doesnt find the pod... but it exists because when i put it in the pod file and install it via cocoapods it installs correctly. Can anyone help ?

1 Answers

As mentioned by the Xamarin team(comment-1, comment-2), the sharpie pod command is deprecated.

So, in order to generate ApiDefinitions.cs and StructuresAndEnums.cs from pod, you can use the following sharpie bind.

sharpie bind \
      -o BiometridAuth \
      -sdk iphoneos13.2 \
      -scope . \
      Pods/BiometridAuth/BiometridAuth.framework/Headers/*

Also, you can check the parameters for -sdk argument with sharpie xcode --sdks.

sharpie xcode --sdks

sdk: appletvos13.4    arch: arm64
sdk: appletvos13.2    arch: arm64
sdk: iphoneos13.6     arch: arm64   armv7
sdk: iphoneos13.5     arch: arm64   armv7
sdk: iphoneos13.4     arch: arm64   armv7
sdk: iphoneos13.2     arch: arm64   armv7
sdk: macosx10.15      arch: x86_64  i386
sdk: watchos6.2       arch: armv7k
sdk: watchos6.1       arch: armv7k
Related