Trouble generating ApiDefinitions for new Twilio SDK

When I try to generate a binding from libTwiliioVoice.a I get an error. Is there a problem with my command?

MacBook-Pro:twilio-voice-ios michaellang$ sharpie xcode -sdks
sdk: appletvos11.1    arch: arm64   
sdk: iphoneos11.1     arch: arm64   armv7   
sdk: macosx10.13      arch: x86_64  i386    
sdk: watchos4.1       arch: armv7k  

MacBook-Pro:twilio-voice-ios michaellang$ sharpie bind -o sharpieOutput -sdk iphoneos11.1 -n TwilioVoice.iOS libTwilioVoice.a
Parsing 1 header files...
warning: /Users/michaellang/watchdog-mobile/twilio-voice-ios/libTwilioVoice.a: 'linker' input unused [-Wunused-command-line-argument]
warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
warning: argument unused during compilation: '-fno-spell-checking' [-Wunused-command-line-argument]
warning: argument unused during compilation: '-Xclang -detailed-preprocessing-record' [-Wunused-command-line-argument]
warning: argument unused during compilation: '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk' [-Wunused-command-line-argument]
warning: argument unused during compilation: '-D NS_BUILD_32_LIKE_64' [-Wunused-command-line-argument]
warning: argument unused during compilation: '-miphoneos-version-min=11.1' [-Wunused-command-line-argument]
error: unable to handle compilation, expected exactly one compiler job in ''
Error while processing /Users/michaellang/watchdog-mobile/twilio-voice-ios/libTwilioVoice.a.

Done. Exiting with error code 1.
error: Clang failed to parse input and exited with code 1

download link for the latest Objective-C Twilio code is here:
www.twilio.com/docs/api/voice-sdk/ios

I extracted the twilio-voice-ios-static-2.0.0-beta21.tar.bz2 file and ran the above commands from that folder.

For reference in what the binding should look like, the docs for the library: media.twiliocdn.com/sdk/ios/voice/releases/2.0.0-beta21/docs/hierarchy.html

Best Answers

  • MichaelLangMichaelLang US
    Accepted Answer

    I found the correct command. First I had to switch into the sub-folder "include" which contained 6 header files, then I ran this command:

    MacBook-Pro:include michaellang$ sharpie bind -o sharpieOutput -sdk iphoneos11.2 -n TwilioVoice.iOS *.h
    Parsing 6 header files...
    
    Binding...
      [write] ApiDefinitions.cs
      [write] StructsAndEnums.cs
    
    Binding Analysis: 
     ... lots of things to look into ...
    

Answers

  • MichaelLangMichaelLang USMember
    Accepted Answer

    I found the correct command. First I had to switch into the sub-folder "include" which contained 6 header files, then I ran this command:

    MacBook-Pro:include michaellang$ sharpie bind -o sharpieOutput -sdk iphoneos11.2 -n TwilioVoice.iOS *.h
    Parsing 6 header files...
    
    Binding...
      [write] ApiDefinitions.cs
      [write] StructsAndEnums.cs
    
    Binding Analysis: 
     ... lots of things to look into ...
    
Sign In or Register to comment.