Build problems for iOS Bindings project of Twilio Client SDK

I have created a bindings project with Visual Studio on the Mac, it has the output files from Objective Sharpie and linked libraries as you can see in this repo:
bitbucket.org/mlang74/twiliovoice.ios/src

When the project is built the system is confused about the enumerations, as if they don't even exist.

  • error CS0246: The type or namespace name 'TCConnectionState' could not be found (are you missing a using directive or an assembly reference?)
  • error CS0246: The type or namespace name 'TCDeviceState' could not be found (are you missing a using directive or an assembly reference?)
  • error CS0246: The type or namespace name 'TCLogLevel' could not be found (are you missing a using directive or an assembly reference?)

It seems there must be some simple solution to get the compiler to recognize the StructsAndEnums.cs file and build a dll properly. Any ideas? Is this a project code or setup problem, or a problem with my computer configuration? Can someone open and build this project to verify?

Here is the full build output that I get on my Mac:

Building: TwilioVoice.iOS (Debug)
Build started 11/8/2017 8:32:49 PM.
__________________________________________________
Project "/Users/michaellang/TwilioVoice.iOS/TwilioVoice.iOS.csproj" (Build target(s)):

Target _CollectBundleResources:
    CollectBundleResources Task
      BundleResources: <null>
      OptimizePropertyLists: False
      OptimizePNGs: False
      ProjectDir: /Users/michaellang/TwilioVoice.iOS
      ResourcePrefix: Resources
Target _CreateEmbeddedResources:
    CreateEmbeddedResources Task
      BundleResources:
      Prefix: monotouch
Target _GenerateBindings:
    BTouchEmitDebugInformation: false
    BTouch Task
      BTouchToolPath: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/
      BTouchToolExe: btouch-native
      AdditionalLibPaths: <null>
      AllowUnsafeBlocks: True
      ApiDefinitions:
        ApiDefinition.cs
        ApiDefinitions.cs
        StructsAndEnums.cs
      BaseLibDll: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
      CompilerPath: <null>
      CoreSources: <null>
      DefineConstants: __UNIFIED__;__MOBILE__;__IOS__;DEBUG;
      EmitDebugInformation: False
      ExtraArgs: <null>
      GeneratedSourcesDir: obj/Debug/ios/
      GeneratedSourcesFileList: obj/Debug/ios/sources.list
      Namespace: <null>
      NativeLibraries: <null>
      NoStdLib: False
      OutputAssembly: <null>
      ProcessEnums: False
      ProjectDir: /Users/michaellang/TwilioVoice.iOS
      References:
        /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll
        /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll
        /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
      Resources: <null>
      Sources: <null>
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/btouch-native /v /baselib:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll /unsafe /d:"__UNIFIED__;__MOBILE__;__IOS__;DEBUG" /Users/michaellang/TwilioVoice.iOS/ApiDefinition.cs /Users/michaellang/TwilioVoice.iOS/ApiDefinitions.cs /Users/michaellang/TwilioVoice.iOS/StructsAndEnums.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/michaellang/TwilioVoice.iOS/obj/Debug/ios/ /sourceonly:/Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/sources.list /target-framework=Xamarin.iOS,v1.0 
Target _PrepareNativeReferences:
    PrepareNativeReferences Task
      IntermediateOutputPath: obj/Debug/
      NativeReferences: <null>
Target _CompressNativeFrameworkResources:
  Skipping target "_CompressNativeFrameworkResources" because it has no inputs.
Target _CompressObjCBindingNativeFrameworkResources:
  Skipping target "_CompressObjCBindingNativeFrameworkResources" because it has no inputs.
Target _GenerateCompileInputs:
    /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(3163,5): warning MSB9004: ManifestResourceWithNoCulture item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Resx', and optional LogicalName.
Done building target "_GenerateCompileInputs" in project "TwilioVoice.iOS.csproj".
Target GenerateTargetFrameworkMonikerAttribute:
  Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Target CoreCompile:
    /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/4.5/csc.exe /noconfig /unsafe+ /nowarn:2008 /nostdlib+ /errorreport:prompt /warn:4 /define:__UNIFIED__;__MOBILE__;__IOS__;DEBUG /errorendlocation /preferreduilang:en-US /reference:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll /reference:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll /reference:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll /debug+ /debug:portable /optimize- /out:obj/Debug/TwilioVoice.iOS.dll /resource:libcrypto.a /resource:libssl.a /resource:libTwilioClient.a /target:library /utf8output Properties/AssemblyInfo.cs libcrypto.linkwith.cs libssl.linkwith.cs libTwilioClient.linkwith.cs Structs.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/ObjCRuntime/Libraries.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/ObjCRuntime/Messaging.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/Constants.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCConnection.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCConnectionDelegate.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCDevice.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCDeviceDelegate.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TCPresenceEvent.g.cs /Users/michaellang/TwilioVoice.iOS/obj/Debug/ios/TwilioVoiceiOS/TwilioClient.g.cs "/var/folders/1y/7trvx64j5n5ctxhnzq44cpp40000gn/T/Xamarin.iOS,Version=v1.0.AssemblyAttributes.cs"
    obj/Debug/ios/TwilioVoiceiOS/TCConnection.g.cs(206,18,206,35): error CS0246: The type or namespace name 'TCConnectionState' could not be found (are you missing a using directive or an assembly reference?)
    obj/Debug/ios/TwilioVoiceiOS/TCDevice.g.cs(254,18,254,31): error CS0246: The type or namespace name 'TCDeviceState' could not be found (are you missing a using directive or an assembly reference?)
    obj/Debug/ios/TwilioVoiceiOS/TwilioClient.g.cs(83,36,83,46): error CS0246: The type or namespace name 'TCLogLevel' could not be found (are you missing a using directive or an assembly reference?)
Done building target "CoreCompile" in project "TwilioVoice.iOS.csproj" -- FAILED.

Done building project "TwilioVoice.iOS.csproj" -- FAILED.

Build FAILED.

/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(3163,5): warning MSB9004: ManifestResourceWithNoCulture item type is deprecated. Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Resx', and optional LogicalName.
obj/Debug/ios/TwilioVoiceiOS/TCConnection.g.cs(206,18,206,35): error CS0246: The type or namespace name 'TCConnectionState' could not be found (are you missing a using directive or an assembly reference?)
obj/Debug/ios/TwilioVoiceiOS/TCDevice.g.cs(254,18,254,31): error CS0246: The type or namespace name 'TCDeviceState' could not be found (are you missing a using directive or an assembly reference?)
obj/Debug/ios/TwilioVoiceiOS/TwilioClient.g.cs(83,36,83,46): error CS0246: The type or namespace name 'TCLogLevel' could not be found (are you missing a using directive or an assembly reference?)
    1 Warning(s)
    3 Error(s)

Time Elapsed 00:00:01.43

---------------------- Done ----------------------

Build: 3 errors, 1 warning
Tagged:

Best Answer

Answers

  • ChrisvanwykChrisvanwyk USXamarin Team, University, XamUProfessors, Developer Group Leader Xamurai

    Hi @MichaelLang - there is a problem accessing your repo.

    Unfortunately no way to have a quick look.

  • MichaelLangMichaelLang USMember

    Sorry, I'm not sure why. I just tried from a chrome incognito window and it loaded. The repo is public access. I tried to use github instead, but the file size limit prevented the libTwilioClient.a file from being uploaded.

    Is this an access problem accessing with a git client? Can you download the repo instead of connecting with a git client?
    bitbucket.org/mlang74/twiliovoice.ios/downloads/

    I put a copy of the downloaded repo here:
    www.dropbox.com/s/ncr24chva2xfok5/mlang74-twiliovoice.ios-823e78c1a41e.zip?dl=0

    If xamarin forums has an alternate preferred way to upload files, please let me know.

    note: I had to drop the https prefix from my links because the forums wouldn't let me include links in my post.

  • MichaelLangMichaelLang USMember

    That worked! Thanks.

    Build result has a warning, but I suppose that's fine.

    ====

    Build succeeded.  /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(3163,5): 
            warning MSB9004: ManifestResourceWithNoCulture item type is deprecated. 
            Emit EmbeddedResource items instead, with metadata WithCulture='false', Type='Resx', and optional LogicalName.
                1 Warning(s)
                0 Error(s)
    
            Time Elapsed 00:00:02.27
    
  • StephenWillisStephenWillis Member ✭✭

    Hi Michael,

    I was wondering if this solution works for you when you use it in Visual Studio?

    I have a similar issue in that I have a binding project which builds successfully but when I use it in Visual Studio, no classes show up below the binding project.

    I tried the same with your project, i.e. opened it in Visual Studio and used the steps from ChrisvanWyk and it does build successfully but again I cannot see any classes in Visual Studio in the Object Browser and when I reference it in another iOS project I can't seem to use any classes from it.

    Just wondering if there is anything obvious I could be doing wrong?

    Thanks,
    Stephen.

Sign In or Register to comment.