alexsorokoletov / objc-automatic

[Not supported anymore] Automation tool to bind CocoaPods to NuGet packages for Xamarin.iOS
45 stars 15 forks source link

Unsupported clang availability platform: 'bridgeos' #14

Closed michaeldimoudis closed 6 years ago

michaeldimoudis commented 6 years ago

Hi, and thanks for your work.

I'm trying to bind EstimoteProximitySDK and getting this error on the 1st stage during sharpie bind -output bindings.

sharpie bind -output bindings/EstimoteBluetoothScanning -sdk "iphoneos" -scope pods/EstimoteBluetoothScanning/XCode/Pods/EstimoteBluetoothScanning/EstimoteBluetoothScanning/EstimoteBluetoothScanning.framework/Headers/*.h pods/EstimoteBluetoothScanning/XCode/Pods/EstimoteBluetoothScanning/EstimoteBluetoothScanning/EstimoteBluetoothScanning.framework/Headers/EstimoteBluetoothScanning.h -n DreamTeam.Xamarin.EstimoteBluetoothScanning -c -Ipods/EstimoteBluetoothScanning/XCode/Pods/EstimoteBluetoothScanning/EstimoteBluetoothScanning/EstimoteBluetoothScanning.framework/Headers -F pods/EstimoteBluetoothScanning/XCode/Pods/EstimoteBluetoothScanning/EstimoteBluetoothScanning -v

With error: System.Exception: Unsupported clang availability platform: 'bridgeos'

  at Sharpie.Bind.Attributes.AvailabilityBaseAttribute+<FromClang>d__6.MoveNext () [0x0037d] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Attributes/AvailabilityBaseAttribute.cs:192 
  at System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].MoveNext () [0x0006f] in <3fb92ec709f44a579da6a23087df403d>:0 
  at Sharpie.Bind.Massagers.AvailabilityMassager.Massage (ICSharpCode.NRefactory.CSharp.EntityDeclaration entity) [0x00092] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:55 
  at Sharpie.Bind.Massagers.AvailabilityMassager.VisitPropertyDeclaration (ICSharpCode.NRefactory.CSharp.PropertyDeclaration propertyDeclaration) [0x00000] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:29 
  at ICSharpCode.NRefactory.CSharp.PropertyDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at Sharpie.Bind.Massagers.AvailabilityMassager.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00006] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:24 
  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at Sharpie.Bind.DocumentSyntaxTree.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00015] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/DocumentSyntaxTree.cs:37 
  at Sharpie.Bind.BindingMassager.Massage (ICSharpCode.NRefactory.CSharp.AstNode astNode, Sharpie.Bind.BindingTarget bindingTarget) [0x00033] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingMassager.cs:103 
  at Sharpie.Bind.BindingFrontend.Bind (Clang.Ast.Decl decl) [0x000b5] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingFrontend.cs:61 
  at Sharpie.BindTool.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl decl) [0x0018b] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:164 
  at Clang.Driver.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:158 
  at Clang.Driver.HandleTranslationUnit (System.IntPtr translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:148 
  at (wrapper managed-to-native) Clang.Driver:RunInternal (Clang.Driver,string[],string,Clang.Frontend.DiagnosticConsumer)
  at Clang.Driver.Run (System.String[] inputFiles, System.String[] clangArgs, Clang.Frontend.DiagnosticConsumer diagnosticConsumer) [0x00177] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:139 
  at Sharpie.ParseTool.Run () [0x005c8] in /Users/builder/vsts/_work/2/s/Sharpie/ParseTool.cs:576 
  at Sharpie.BindTool.CoreRun () [0x00001] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:120 
  at Sharpie.BindTool.Run () [0x00026] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:98```

My guess is that this package might have some swift? Anyway just thought I'd share my findings and if you have any ideas about this error. :)

alexsorokoletov commented 6 years ago

Hi @michaeldimoudis I have never seen this error or this bridgeos before so we will have to find out together :) EstimoteProximitySDK is indeed based on Swift according to their readme: https://github.com/Estimote/iOS-Proximity-SDK

Make sure Always Embed Swift Standard Libraries build setting is set to Yes (this option is turned off by default for Objective–C projects). Estimote Proximity SDK contains Swift code internally and requires Swift standard libraries in the app bundle.

I'd say chances are low that we can bind objc-swift mixed pod using Sharpie. That also means that objc-automatic will not support this type of pods at least for now.

Wondering if we could do something better about that.