Forum Xamarin.iOS

Xamarin.iOS Binding doesn't recognize .framework reference.

pedroccrlpedroccrl BRMember ✭✭

Hello!
Im trying to binding the Bitmovin Player iOS SDK.

I followed these steps:

  1. Generate ApiDefinitions.cs and StructsAndEnums.cs
    sharpie pod init ios AFNetworking
    Replace the Podfile with BitmovinPlayer SDK:

    platform :ios, '13.1'
    install! 'cocoapods', :integrate_targets => false
    target 'ObjectiveSharpieIntegration' do
    use_frameworks!
    end
    pod 'BitmovinPlayer', git: 'https://github.com/bitmovin/bitmovin-player-ios-sdk-cocoapod.git', tag: '2.33.0'

    Sharpie created the files successfully.

  2. Create a Xamarin.iOS Binding Project

  3. Replace ApiDefinitions and Structs.cs
  4. Remove Verify attributes
  5. In Visual Studio, added 'Native Reference' of BitmovinPlayer.

The problem is Visual Studio doesn't recognize the using BitmovinPlayer;.

Build output: Target _GenerateBindings:
BTouchEmitDebugInformation: false
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/btouch-native /v /nostdlib /baselib:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll /lib:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS /r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll /unsafe /d:"UNIFIED;MOBILE;IOS;DEBUG" /Users/pedroccrl/Projects/BitmoviniOSBinding/BitmoviniOSBinding/ApiDefinition.cs /s:/Users/pedroccrl/Projects/BitmoviniOSBinding/BitmoviniOSBinding/Structs.cs -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll /tmpdir:/Users/pedroccrl/Projects/BitmoviniOSBinding/BitmoviniOSBinding/obj/Debug/ios/ /sourceonly:/Users/pedroccrl/Projects/BitmoviniOSBinding/BitmoviniOSBinding/obj/Debug/ios/sources.list /target-framework=Xamarin.iOS,v1.0
BTOUCH : error BI0002: bgen: Could not compile the API bindings.
ApiDefinition.cs(3,7): error CS0246: The type or namespace name 'BitmovinPlayer' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(46,34): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2394,39): error CS0246: The type or namespace name 'IBMPUserInterfaceAPI' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2394,61): error CS0246: The type or namespace name 'IBMPUserInterfaceEventHandler' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(131,38): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(221,16): error CS0111: Type 'BMPCue' already defines a member called 'Constructor' with the same parameter types
ApiDefinition.cs(297,31): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(1899,32): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(345,39): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(1903,32): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(1908,65): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(1908,146): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(2753,6): error CS0579: Duplicate 'Static' attribute
ApiDefinition.cs(2785,6): error CS0579: Duplicate 'Static' attribute
ApiDefinition.cs(2434,33): error CS0246: The type or namespace name 'GCKMediaStatus' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2438,35): error CS0246: The type or namespace name 'GCKMediaMetadata' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2458,26): error CS0246: The type or namespace name 'GCKCastChannel' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2481,9): error CS0246: The type or namespace name 'GCKMediaStatus' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2485,9): error CS0246: The type or namespace name 'GCKMediaMetadata' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2489,9): error CS0246: The type or namespace name 'GCKDevice' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2517,9): error CS0246: The type or namespace name 'GCKCastChannel' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2541,42): error CS0246: The type or namespace name 'GCKMediaInformation' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2953,14): error CS0111: Type 'BMPOfflineManagerListener' already defines a member called 'OfflineManager' with the same parameter types
ApiDefinition.cs(719,28): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(764,30): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(930,32): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(583,44): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2723,46): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2966,10): warning CS0618: 'iOSAttribute' is obsolete: 'Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.'
ApiDefinition.cs(2843,38): error CS0246: The type or namespace name 'IBMPMetadataEntry' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2230,35): error CS0246: The type or namespace name 'IBMPPlayerAPI' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2230,50): error CS0246: The type or namespace name 'IBMPPlayerEventHandler' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2230,74): error CS0246: The type or namespace name 'IBMPRemoteControlAPI' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(3023,10): warning CS0618: 'iOSAttribute' is obsolete: 'Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.'
ApiDefinition.cs(3028,10): warning CS0618: 'iOSAttribute' is obsolete: 'Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.'
ApiDefinition.cs(521,27): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
Done building target "_GenerateBindings" in project "BitmoviniOSBinding.csproj" -- FAILED.

Done building project "BitmoviniOSBinding.csproj" -- FAILED.

Build FAILED.

ApiDefinition.cs(2966,10): warning CS0618: 'iOSAttribute' is obsolete: 'Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.'
ApiDefinition.cs(3023,10): warning CS0618: 'iOSAttribute' is obsolete: 'Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.'
ApiDefinition.cs(3028,10): warning CS0618: 'iOSAttribute' is obsolete: 'Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.'
BTOUCH : error BI0002: bgen: Could not compile the API bindings.
ApiDefinition.cs(3,7): error CS0246: The type or namespace name 'BitmovinPlayer' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(46,34): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2394,39): error CS0246: The type or namespace name 'IBMPUserInterfaceAPI' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2394,61): error CS0246: The type or namespace name 'IBMPUserInterfaceEventHandler' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(131,38): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(221,16): error CS0111: Type 'BMPCue' already defines a member called 'Constructor' with the same parameter types
ApiDefinition.cs(297,31): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(1899,32): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(345,39): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(1903,32): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(1908,65): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(1908,146): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(2753,6): error CS0579: Duplicate 'Static' attribute
ApiDefinition.cs(2785,6): error CS0579: Duplicate 'Static' attribute
ApiDefinition.cs(2434,33): error CS0246: The type or namespace name 'GCKMediaStatus' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2438,35): error CS0246: The type or namespace name 'GCKMediaMetadata' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2458,26): error CS0246: The type or namespace name 'GCKCastChannel' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2481,9): error CS0246: The type or namespace name 'GCKMediaStatus' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2485,9): error CS0246: The type or namespace name 'GCKMediaMetadata' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2489,9): error CS0246: The type or namespace name 'GCKDevice' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2517,9): error CS0246: The type or namespace name 'GCKCastChannel' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2541,42): error CS0246: The type or namespace name 'GCKMediaInformation' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2953,14): error CS0111: Type 'BMPOfflineManagerListener' already defines a member called 'OfflineManager' with the same parameter types
ApiDefinition.cs(719,28): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(764,30): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(930,32): error CS0308: The non-generic type 'NSObject' cannot be used with type arguments
ApiDefinition.cs(583,44): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2723,46): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2843,38): error CS0246: The type or namespace name 'IBMPMetadataEntry' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2230,35): error CS0246: The type or namespace name 'IBMPPlayerAPI' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2230,50): error CS0246: The type or namespace name 'IBMPPlayerEventHandler' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(2230,74): error CS0246: The type or namespace name 'IBMPRemoteControlAPI' could not be found (are you missing a using directive or an assembly reference?)
ApiDefinition.cs(521,27): error CS0246: The type or namespace name 'IBMPJsonable' could not be found (are you missing a using directive or an assembly reference?)
3 Warning(s)
34 Error(s)

Time Elapsed 00:00:04.64

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Build: 34 errors, 3 warnings

what am I doing wrong?

Posts

  • Imran_619Imran_619 Member ✭✭✭

    Steps to Reproduce
    Create iOS binding project
    Build project
    Examine output DLL in object browser and see no methods or classes
    Expected Behavior
    Should have the methods and classes on the dll to use in ios xamarin project

    Actual Behavior
    Project compiles successfully but DLL has no methods or entry points to use

    Environment
    Microsoft Visual Studio Community 2017
    Version 15.7.4
    VisualStudio.15.Release/15.7.4+27703.2035
    Microsoft .NET Framework
    Version 4.7.03056

    Installed Version: Community

    Visual C++ 2017 00369-60000-00001-AA044
    Microsoft Visual C++ 2017

    Application Insights Tools for Visual Studio Package 8.12.10405.1
    Application Insights Tools for Visual Studio

    ASP.NET and Web Tools 2017 15.0.40601.0
    ASP.NET and Web Tools 2017

    C# Tools 2.8.3-beta6-62923-07. Commit Hash: 7aafab561e449da50712e16c9e81742b8e7a2969
    C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

    Common Azure Tools 1.10
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

    JavaScript Language Service 2.0
    JavaScript Language Service

    JavaScript Project System 2.0
    JavaScript Project System

    JavaScript UWP Project System 2.0
    JavaScript UWP Project System

    Merq 1.1.19-rc (a4ffc1b)
    Command Bus, Event Stream and Async Manager for Visual Studio extensions.

    Microsoft JVM Debugger 1.0
    Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

    Microsoft MI-Based Debugger 1.0
    Provides support for connecting Visual Studio to MI compatible debuggers

    Microsoft Visual C++ Wizards 1.0
    Microsoft Visual C++ Wizards

    Microsoft Visual Studio VC Package 1.0
    Microsoft Visual Studio VC Package

    Mono Debugging for Visual Studio 4.10.5-pre (ab58725)
    Support for debugging Mono processes with Visual Studio.

    NuGet Package Manager 4.6.0
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    ProjectServicesPackage Extension 1.0
    ProjectServicesPackage Visual Studio Extension Detailed Info

    ResourcePackage Extension 1.0
    ResourcePackage Visual Studio Extension Detailed Info

    Test Adapter for Boost.Test 1.0
    Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

    Test Adapter for Google Test 1.0
    Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

    TypeScript Tools 15.7.20419.2003
    TypeScript Tools for Microsoft Visual Studio

    Visual Basic Tools 2.8.3-beta6-62923-07. Commit Hash: 7aafab561e449da50712e16c9e81742b8e7a2969
    Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

    Visual C++ for Cross Platform Mobile Development (Android) 15.0.27625.00
    Visual C++ for Cross Platform Mobile Development (Android)

    Visual F# Tools 10.1 for F# 4.1 15.7.0.0. Commit Hash: 173513e369ffb7a1c4d5dccf83696d9aac2ab2d0.
    Microsoft Visual F# Tools 10.1 for F# 4.1

    Visual Studio Code Debug Adapter Host Package 1.0
    Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

    Visual Studio Tools for CMake 1.0
    Visual Studio Tools for CMake

    Visual Studio Tools for Universal Windows Apps 15.0.27703.2035
    The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

    VisualStudio.Mac 1.0
    Mac Extension for Visual Studio

    Windows Machine Learning Generator Extension 1.0
    Windows Machine Learning Visual Studio Extension Detailed Info

    Xamarin 4.10.10.2 (35a01d8dc)
    Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin Designer 4.12.1 (f3257e429)
    Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

    Xamarin.Android SDK 8.3.3.2 (HEAD/dffc59120)
    Xamarin.Android Reference Assemblies and MSBuild support.

    Xamarin.iOS and Xamarin.Mac SDK 11.12.0.4 (64fece5)
    Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
    Build Logs
    1>------ Rebuild All started: Project: iXpandBindingslib, Configuration: Release Any CPU ------
    1> Connecting to Mac server 192.168.1.126...
    1> Connecting to Mac server 192.168.1.126...
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3268,5): warning MSB9004: ManifestResourceWithNoCulture item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Resx', and optional LogicalName.
    1> iXpandBindingslib -> C:\2020CAM\RELEASE_4\RELEASE_4_X\CLIENT_GEN_2\1CS\iXpandBindingslib\bin\Release\iXpandBindingslib.dll

    For more information on mobile app development on you can visit ArStudioz

Sign In or Register to comment.