Thank you for your reply. I have found the reason.
When create new Bindings Library, the Build Action for StructsAndEnums.cs is ObjcBindingCoreSource by default. It works after I change it to ObjcBindingApiDefinition , the same as ApiDefinition.cs.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to binding static library(.a) to Xamarin iOS.
Firstly I create a new Bindings Library project (IOS->Library->Unified API).
Then I generate ApiDefinitions.cs and StructsAndEnums.cs using objective sharpie( version 3.5.61) and copy codes to project files as official document says.
There are two problems:
Screenshot in ApiDefinitions.cs :
Screenshot in StructsAndEnums.cs
But this error will not show when building project.
That is because VS generate a file named like "XGPushTokenBindType.g.cs" in path "Project/PushBindingLibIOS/obj/Debug/iOS/PushBindingLibIOS/"
I don't know how to solve this problem.
Hoping for your answers.
Thank you for your reply. I have found the reason.
When create new Bindings Library, the Build Action for StructsAndEnums.cs is ObjcBindingCoreSource by default. It works after I change it to ObjcBindingApiDefinition , the same as ApiDefinition.cs.