xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.46k stars 511 forks source link

Error BI0000 Unexpected error - Xamarin.IOS Bindings #3279

Closed rodrigueslg closed 6 years ago

rodrigueslg commented 6 years ago

Steps to Reproduce

When trying to compile a native bindings project with AdyenCSE SDK, I get the following error:

/Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE/BTOUCH: Error BI0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com (BI0000) (AdyenCSE)

Here is the code:


using System;
using Foundation;
using ObjCRuntime;

namespace DreamTeam.Xamarin.AdyenCSE
{
    // @interface ADYAESCCMCryptor : NSObject
    [BaseType (typeof(NSObject))]
    interface ADYAESCCMCryptor
    {
        // +(NSData * _Nullable)encrypt:(NSData * _Nonnull)data withKey:(NSData * _Nonnull)key iv:(NSData * _Nonnull)iv;
        //[Static]
        [Export ("encrypt:withKey:iv:")]
        [return: NullAllowed]
        NSData Encrypt (NSData data, NSData key, NSData iv);

        // +(NSData * _Nullable)encrypt:(NSData * _Nonnull)data withKey:(NSData * _Nonnull)key iv:(NSData * _Nonnull)iv tagLength:(size_t)tagLength adata:(NSData * _Nullable)adata;
        //[Static]
        [Export ("encrypt:withKey:iv:tagLength:adata:")]
        [return: NullAllowed]
        NSData Encrypt (NSData data, NSData key, NSData iv, nuint tagLength, [NullAllowed] NSData adata);
    }

    // @interface ADYCard : NSObject
    [BaseType (typeof(NSObject))]
    interface ADYCard
    {
        // @property (nonatomic, strong) NSDate * _Nullable generationtime;
        [NullAllowed, Export ("generationtime", ArgumentSemantic.Strong)]
        NSDate Generationtime { get; set; }

        // @property (nonatomic, strong) NSString * _Nullable number;
        [NullAllowed, Export ("number", ArgumentSemantic.Strong)]
        string Number { get; set; }

        // @property (nonatomic, strong) NSString * _Nullable holderName;
        [NullAllowed, Export ("holderName", ArgumentSemantic.Strong)]
        string HolderName { get; set; }

        // @property (nonatomic, strong) NSString * _Nullable cvc;
        [NullAllowed, Export ("cvc", ArgumentSemantic.Strong)]
        string Cvc { get; set; }

        // @property (nonatomic, strong) NSString * _Nullable expiryMonth;
        [NullAllowed, Export ("expiryMonth", ArgumentSemantic.Strong)]
        string ExpiryMonth { get; set; }

        // @property (nonatomic, strong) NSString * _Nullable expiryYear;
        [NullAllowed, Export ("expiryYear", ArgumentSemantic.Strong)]
        string ExpiryYear { get; set; }

        // +(ADYCard * _Nullable)decode:(NSData * _Nonnull)json error:(NSError * _Nullable * _Nullable)error;
        //[Static]
        [Export ("decode:error:")]
        [return: NullAllowed]
        ADYCard Decode (NSData json, [NullAllowed] out NSError error);

        // -(NSData * _Nullable)encode;
        [NullAllowed, Export ("encode")]
        //[Verify (MethodToProperty)]
        NSData Encode { get; }
    }

    // @interface ADYCryptor : NSObject
    [BaseType (typeof(NSObject))]
    interface ADYCryptor
    {
        // +(void)setMsgPrefix:(NSString * _Nullable)prefix;
        //[Static]
        [Export ("setMsgPrefix:")]
        void SetMsgPrefix ([NullAllowed] string prefix);

        // +(void)setMsgSeparator:(NSString * _Nullable)separator;
        //[Static]
        [Export ("setMsgSeparator:")]
        void SetMsgSeparator ([NullAllowed] string separator);

        // +(NSString * _Nullable)encrypt:(NSData * _Nonnull)data publicKeyInHex:(NSString * _Nonnull)keyInHex;
        //[Static]
        [Export ("encrypt:publicKeyInHex:")]
        [return: NullAllowed]
        string Encrypt (NSData data, string keyInHex);

        // +(NSData * _Nullable)aesEncrypt:(NSData * _Nonnull)data withKey:(NSData * _Nonnull)key iv:(NSData * _Nonnull)iv;
        //[Static]
        [Export ("aesEncrypt:withKey:iv:")]
        [return: NullAllowed]
        NSData AesEncrypt (NSData data, NSData key, NSData iv);

        // +(NSData * _Nullable)rsaEncrypt:(NSData * _Nonnull)data withKeyInHex:(NSString * _Nonnull)keyInHex;
        //[Static]
        [Export ("rsaEncrypt:withKeyInHex:")]
        [return: NullAllowed]
        NSData RsaEncrypt (NSData data, string keyInHex);

        // +(NSData * _Nonnull)dataFromHex:(NSString * _Nonnull)hex;
        //[Static]
        [Export ("dataFromHex:")]
        NSData DataFromHex (string hex);

        // +(NSData * _Nullable)sha1FromStringInHex:(NSString * _Nonnull)stringInHex;
        //[Static]
        [Export ("sha1FromStringInHex:")]
        [return: NullAllowed]
        NSData Sha1FromStringInHex (string stringInHex);
    }

    // @interface ADYEncrypter : ADYCryptor
    [BaseType (typeof(ADYCryptor))]
    interface ADYEncrypter
    {
        // +(NSString * _Nullable)encrypt:(NSData * _Nonnull)data publicKeyInHex:(NSString * _Nonnull)keyInHex;
        //[Static]
        [Export ("encrypt:publicKeyInHex:")]
        [return: NullAllowed]
        string Encrypt (NSData data, string keyInHex);
    }

    // @interface ADYRSACryptor : NSObject
    [BaseType (typeof(NSObject))]
    interface ADYRSACryptor
    {
        // +(NSData * _Nullable)encrypt:(NSData * _Nonnull)data withKeyInHex:(NSString * _Nonnull)keyInHex;
        //[Static]
        [Export ("encrypt:withKeyInHex:")]
        [return: NullAllowed]
        NSData Encrypt (NSData data, string keyInHex);
    }

    // @interface AdyenUtil (NSDictionary)
    [Category]
    [BaseType (typeof(NSDictionary))]
    interface NSDictionary_AdyenUtil
    {
        // -(NSString * _Nonnull)encodeFormData __attribute__((deprecated("Use -ady_encodeFormData instead.")));
        [Export ("encodeFormData")]
        //[Deprecated(PlatformName.iOS, PlatformArchitecture.All, "Use -ady_encodeFormData instead.")]
        //[Verify (MethodToProperty)]
        string EncodeFormData { get; }

        // -(NSString * _Nonnull)ady_encodeFormData;
        [Export ("ady_encodeFormData")]
        //[Verify (MethodToProperty)]
        string Ady_encodeFormData { get; }
    }

    // @interface AdyenURLEncoding (NSString)
    [Category]
    [BaseType (typeof(NSString))]
    interface NSString_AdyenURLEncoding
    {
        // -(NSString * _Nullable)urlEncodeUsingEncoding:(NSStringEncoding)encoding __attribute__((deprecated("Use -ady_URLEncodedString instead.")));
        [Export ("urlEncodeUsingEncoding:")]
        //[Deprecated(PlatformName.iOS, PlatformArchitecture.All, "Use -ady_URLEncodedString instead.")]
        [return: NullAllowed]
        string UrlEncodeUsingEncoding (nuint encoding);
    }

    // @interface AdyenUtil (NSString)
    [Category]
    [BaseType (typeof(NSString))]
    interface NSString_AdyenUtil
    {
        // -(BOOL)isHexString __attribute__((deprecated("Use -ady_isHexString instead.")));
        [Export ("isHexString")]
        //[Deprecated(PlatformName.iOS, PlatformArchitecture.All, "Use -ady_isHexString instead.")]
        //[Verify (MethodToProperty)]
        bool IsHexString { get; }

        // -(BOOL)ady_isHexString;
        [Export ("ady_isHexString")]
        //[Verify (MethodToProperty)]
        bool Ady_isHexString { get; }

        // -(NSString * _Nullable)URLEncodedString __attribute__((deprecated("Use -ady_URLEncodedString instead.")));
        [NullAllowed, Export ("URLEncodedString")]
        //[Deprecated(PlatformName.iOS, PlatformArchitecture.All, "Use -ady_URLEncodedString instead.")]
        //[Verify (MethodToProperty)]
        string URLEncodedString { get; }

        // -(NSString * _Nullable)ady_URLEncodedString;
        [NullAllowed, Export ("ady_URLEncodedString")]
        //[Verify (MethodToProperty)]
        string Ady_URLEncodedString { get; }
    }
}
VincentDondain commented 6 years ago

Hi,

Please include your full build logs, crash reports (if any), test case (to reproduce) and all your version information.

The test case is especially important here (it can be a stripped down super simple test case that shows the issue) since we're need to check the project options, native library and would be able to compile ourselves.

To get full build logs just set the log verbosity to diagnostic at the following locations:

On Visual Studio Windows you also want to add -v -v -v -v to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting Properties. Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.

The easiest way to get exact version information:

rodrigueslg commented 6 years ago

The code was generated using this tool: https://github.com/alexsorokoletov/objc-automatic The pod to create the binding is: https://cocoapods.org/pods/AdyenCSE

Enviroment

Xcode - 9.2 (9C40b) NuGet 3 ObjectiveSharpie (3.4)

Visual Studio Community 2017 for Mac Version 7.3.3 (build 5) Installation UUID: c1563fd1-31df-4833-a4d4-be73e3c4608a Runtime: Mono 5.4.1.7 (2017-06/e66d9abbb27) (64-bit) GTK+ 2.24.23 (Raleigh theme)

Package version: 504010007

NuGet Version: 4.3.1.4445

.NET Core Runtime: /usr/local/share/dotnet/dotnet Runtime Version: 2.0.0 SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks SDK Version: 2.0.0 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

Xamarin.Profiler Version: 1.6.0 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools Xcode 9.2 (13772) Build 9C40b

Xamarin.iOS Version: 11.6.1.3 (Visual Studio Community) Hash: f70a1348 Branch: xcode9.2 Build date: 2017-12-18 14:47:16-0500

Xamarin.Android Version: 8.1.3.0 (Visual Studio Community) Android SDK: /Users/Desenvolvedor/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 6.0 (API level 23)

SDK Tools Version: 25.1.2 SDK Platform Tools Version: 24.0.0 SDK Build Tools Version: 23.0.2

Java SDK: /usr java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Inspector Version: 1.4.0 Hash: b3f92f9 Branch: master Build date: Fri, 19 Jan 2018 22:00:34 GMT Client compatibility: 1

Xamarin.Mac Version: 4.0.0.215 (Visual Studio Community)

Build Information Release ID: 703030005 Git revision: b1c2982e201e71ef758866c9ade05f253a8c6f47 Build date: 2017-12-21 11:04:40-05 Xamarin addins: f397ddfbacfb39e60c9cc8d9e410f73faf8c2cbc Build lane: monodevelop-lion-d15-5

Operating System Mac OS X 10.12.6 Darwin 16.7.0 Darwin Kernel Version 16.7.0 Thu Jun 15 17:36:27 PDT 2017 root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

Enabled user installed addins Internet of Things (IoT) development (Preview) 7.1

Diagnostic Log

Rebuilding...

Cleaning Solution: AdyenCSE (Debug) Build started 1/22/2018 8:59:56 PM.


Project "/Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE/AdyenCSE.csproj" (Clean target(s)):

Building with tools version "15.0". Target _CheckForInvalidConfigurationAndPlatform: Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ). Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ). Task "Message" Configuration=Debug Done executing task "Message". Task "Message" Platform=AnyCPU Done executing task "Message". Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('bin/Debug/' != '' and !HasTrailingSlash('bin/Debug/')). Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('obj/' != '' and !HasTrailingSlash('obj/')). Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('obj/Debug/' != '' and !HasTrailingSlash('obj/Debug/')). Target _CleanGeneratedSources: Task "RemoveDir" Removing directory "obj/Debug/ios/". Done executing task "RemoveDir". Target BeforeClean: Target "UnmanagedUnregistration" skipped, due to false condition; ((('$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)' or '$(RegisterForComInterop)' != 'true' or '$(OutputType)' != 'library') or ('$(_AssemblyTimestampBeforeCompile)' == '')) and Exists('@(_UnmanagedRegistrationCache)')) was evaluated as ((('' != '' or '' != 'true' or 'Library' != 'library') or ('' == '')) and Exists('obj/AdyenCSE.csproj.UnmanagedRegistration.cache')). Target CoreClean: Task "Delete" Done executing task "Delete". Task "ReadLinesFromFile" Done executing task "ReadLinesFromFile". Task "FindUnderPath" Comparison path is "bin/Debug/". Done executing task "FindUnderPath". Task "FindUnderPath" Comparison path is "obj/Debug/". Done executing task "FindUnderPath". Task "Delete" Done executing task "Delete". Task "RemoveDuplicates" Done executing task "RemoveDuplicates". Task "MakeDir" Done executing task "MakeDir". Task "WriteLinesToFile" Done executing task "WriteLinesToFile". Target AssignProjectConfiguration: Task "AssignProjectConfiguration" Done executing task "AssignProjectConfiguration". Target _SplitProjectReferencesByFileExistence: Task "ResolveNonMSBuildProjectOutput" skipped, due to false condition; ('$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!='') was evaluated as ('true'=='true' and ''!=''). Target _GetProjectReferenceTargetFrameworkProperties: Task "MSBuild" Done executing task "MSBuild". Target PrepareProjectReferences: Target CleanReferencedProjects: Task "MSBuild" skipped, due to false condition; ('$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('true' != 'true' and 'true' == 'true' and '' != ''). Target CleanPublishFolder: Task "RemoveDir" skipped, due to false condition; ('$(PublishDir)'=='$(OutputPath)app.publish\' and Exists('$(PublishDir)')) was evaluated as ('bin/Debug/app.publish/'=='bin/Debug/app.publish\' and Exists('bin/Debug/app.publish/')). Target AfterClean: Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully. Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully. Target Clean:

Done building project "AdyenCSE.csproj".

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:00.00

Building Solution: AdyenCSE (Debug) Build started 1/22/2018 8:59:56 PM.


Project "/Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE/AdyenCSE.csproj" (Build target(s)):

Building with tools version "15.0". Target _CheckForInvalidConfigurationAndPlatform: Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ). Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ). Task "Message" Configuration=Debug Done executing task "Message". Task "Message" Platform=AnyCPU Done executing task "Message". Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('bin/Debug/' != '' and !HasTrailingSlash('bin/Debug/')). Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('obj/' != '' and !HasTrailingSlash('obj/')). Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('obj/Debug/' != '' and !HasTrailingSlash('obj/Debug/')). Target BuildOnlySettings: Target _CreateGeneratedSourcesDir: Task "MakeDir" Creating directory "obj/Debug/ios/". Done executing task "MakeDir". Target _CollectBundleResources: Task "CollectBundleResources" Done executing task "CollectBundleResources". Target _CreateEmbeddedResources: Task "CreateEmbeddedResources" Done executing task "CreateEmbeddedResources". Target BeforeBuild: Target "BuildOnlySettings" skipped. Previously built successfully. Target GetFrameworkPaths: Target GetReferenceAssemblyPaths: Task "GetReferenceAssemblyPaths" Done executing task "GetReferenceAssemblyPaths". Target "AssignLinkMetadata" skipped, due to false condition; ( '$(SynthesizeLinkMetadata)' == 'true' ) was evaluated as ( '' == 'true' ). Target PrepareForBuild: Task "FindAppConfigFile" Done executing task "FindAppConfigFile". Task "MakeDir" Done executing task "MakeDir". Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!=''). Target BeforeResolveReferences: Target AssignProjectConfiguration: Task "AssignProjectConfiguration" Done executing task "AssignProjectConfiguration". Target "AssignProjectConfiguration" skipped. Previously built successfully. Target _SplitProjectReferencesByFileExistence: Task "ResolveNonMSBuildProjectOutput" skipped, due to false condition; ('$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!='') was evaluated as ('true'=='true' and ''!=''). Target _GetProjectReferenceTargetFrameworkProperties: Task "MSBuild" Done executing task "MSBuild". Target PrepareProjectReferences: Target ResolveProjectReferences: Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and ('true' == 'true' or 'true' != 'true') and '15.0' != '10.0' and '' != ''). Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' == '10.0' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and ('true' == 'true' or 'true' != 'true') and '15.0' == '10.0' and '' != ''). Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and 'true' != 'true' and 'true' == 'true' and '' != ''). Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingProject)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and 'true' == 'true' and '' != ''). Task "Warning" skipped, due to false condition; ('@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceNonexistent)' != '') was evaluated as ('' != '' and '' != ''). Target "FindInvalidProjectReferences" skipped, due to false condition; ('$(FindInvalidProjectReferences)' == 'true') was evaluated as ('' == 'true'). Target ResolveNativeReferences: Target "GetFrameworkPaths" skipped. Previously built successfully. Target "GetReferenceAssemblyPaths" skipped. Previously built successfully. Target "PrepareForBuild" skipped. Previously built successfully. Target GetInstalledSDKLocations: Task "GetInstalledSDKLocations" skipped, due to false condition; ('@(SDKReference)' != '') was evaluated as ('' != ''). Task "GetInstalledSDKLocations" skipped, due to false condition; ('@(SDKReference)' != '' and '$(SupportWindows81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindows81)' != '' and '$(TargetPlatformVersionWindows81)' != '') was evaluated as ('' != '' and '' == 'true' and '' != '' and '' != ''). Task "GetInstalledSDKLocations" skipped, due to false condition; ('@(SDKReference)' != '' and '$(SupportWindowsPhone81SDKs)' == 'true' and '$(TargetPlatformIdentifierWindowsPhone81)' != '' and '$(TargetPlatformVersionWindowsPhone81)' != '') was evaluated as ('' != '' and '' == 'true' and '' != '' and '' != ''). Target ResolveSDKReferences: Task "ResolveSDKReference" skipped, due to false condition; ('@(SDKReference)'!='') was evaluated as (''!=''). Target "ResolveSDKReferences" skipped. Previously built successfully. Target ExpandSDKReferences: Task "GetSDKReferenceFiles" skipped, due to false condition; ('@(ResolvedSDKReference)'!='') was evaluated as (''!=''). Target "ResolveNuGetPackageAssets" skipped, due to false condition; ('$(ResolveNuGetPackages)' == 'true' and exists('$(ProjectLockFile)')) was evaluated as ('true' == 'true' and exists('obj/project.assets.json')). Target "FilterDeniedAssemblyReferences" skipped, due to false condition; ('$(FilterDeniedAssemblies)' == 'true') was evaluated as ('false' == 'true'). Target ResolveAssemblyReferences: Task "ResolveAssemblyReference" TargetFrameworkMoniker: Xamarin.iOS,Version=v1.0 TargetFrameworkMonikerDisplayName: Xamarin.iOS TargetedRuntimeVersion:

Assemblies:
    System
    Xamarin.iOS
AssemblyFiles:
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll
CandidateAssemblyFiles:
TargetFrameworkDirectories:
    /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/,/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/,/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades/
InstalledAssemblyTables:
IgnoreInstalledAssemblyTable:
    False
SearchPaths:
    {CandidateAssemblyFiles}
    {HintPathFromItem}
    {TargetFrameworkDirectory}
    {Registry:Software/Microsoft/Xamarin.iOS,v1.0,AssemblyFoldersEx}
    {AssemblyFolders}
    {GAC}
    {RawFileName}
    bin/Debug/
AllowedAssemblyExtensions:
    .winmd
    .dll
    .exe
AllowedRelatedFileExtensions:
    .pdb
    .dll.mdb
    .exe.mdb
    .xml
    .pri
    .dll.config
    .exe.config
    .dll.mdb
    .exe.mdb
    .pdb
AppConfigFile:

AutoUnify:
    True
CopyLocalDependenciesWhenParentReferenceInGac:
    True
FindDependencies:
    True
TargetProcessorArchitecture:
    msil
StateFile:
    obj/Debug/AdyenCSE.csprojResolveAssemblyReference.cache
InstalledAssemblySubsetTables:
IgnoreInstalledAssemblySubsetTable:
    False
TargetFrameworkSubsets:
FullTargetFrameworkSubsetNames:
    Full
ProfileName:

FullFrameworkFolders:
    /Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades/
LatestTargetFrameworkDirectories:
ProfileTablesLocation:
Primary reference "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e".
    Resolved file path is "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll".
    Reference found at search path location "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll".
    This reference is not "CopyLocal" because it's in a Frameworks directory.
    The ImageRuntimeVersion for this reference is "".
Primary reference "System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e".
    Resolved file path is "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll".
    Reference found at search path location "{TargetFrameworkDirectory}".
        For SearchPath "{TargetFrameworkDirectory}".
        Considered "/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/System.winmd", but it didn't exist.
        Considered "/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/System.dll", but it didn't exist.
        Considered "/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/System.exe", but it didn't exist.
        Considered "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.winmd", but it didn't exist.
    This reference is not "CopyLocal" because it's in a Frameworks directory.
    The ImageRuntimeVersion for this reference is "".
Primary reference "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065".
    Resolved file path is "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll".
    Reference found at search path location "{TargetFrameworkDirectory}".
        For SearchPath "{TargetFrameworkDirectory}".
        Considered "/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/Xamarin.iOS.winmd", but it didn't exist.
        Considered "/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/Xamarin.iOS.dll", but it didn't exist.
        Considered "/Library/Frameworks/Mono.framework/External/xbuild-frameworks/Xamarin.iOS/v1.0/Xamarin.iOS.exe", but it didn't exist.
        Considered "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.winmd", but it didn't exist.
    This reference is not "CopyLocal" because it's in a Frameworks directory.
    The ImageRuntimeVersion for this reference is "".

Done executing task "ResolveAssemblyReference". Target "GenerateBindingRedirects" skipped, due to false condition; ('$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true') was evaluated as ('' == 'true' and '' == 'true'). Target "GenerateBindingRedirectsUpdateAppConfig" skipped, due to false condition; ('$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)')) was evaluated as ('' == 'true' and '' == 'true' and Exists('obj/Debug/AdyenCSE.csproj.AdyenCSE.dll.config')). Target "ResolveComReferences" skipped, due to false condition; ('@(COMReference)'!='' or '@(COMFileReference)'!='') was evaluated as (''!='' or ''!=''). Target AfterResolveReferences: Target ResolveReferences: Target "ResolveNuGetPackageAssets" skipped, due to false condition; ('$(ResolveNuGetPackages)' == 'true' and exists('$(ProjectLockFile)')) was evaluated as ('true' == 'true' and exists('obj/project.assets.json')). Target AssignTargetPaths: Task "AssignTargetPath" Done executing task "AssignTargetPath". Task "AssignTargetPath" Done executing task "AssignTargetPath". Task "AssignTargetPath" Done executing task "AssignTargetPath". Task "AssignTargetPath" Done executing task "AssignTargetPath". Task "AssignTargetPath" skipped, due to false condition; ('@(_DeploymentBaseManifestWithTargetPath)'=='' and '%(None.Extension)'=='.manifest') was evaluated as (''=='' and ''=='.manifest'). Target "AssignTargetPaths" skipped. Previously built successfully. Target SplitResourcesByCulture: Task "Warning" skipped, due to false condition; ('@(ResxWithNoCulture)'!='') was evaluated as (''!=''). Task "Warning" skipped, due to false condition; ('@(ResxWithCulture)'!='') was evaluated as (''!=''). Task "Warning" skipped, due to false condition; ('@(NonResxWithCulture)'!='') was evaluated as (''!=''). Task "Warning" skipped, due to false condition; ('@(NonResxWithNoCulture)'!='') was evaluated as (''!=''). Task "AssignCulture" Done executing task "AssignCulture". Target "CreateManifestResourceNames" skipped, due to false condition; ('@(EmbeddedResource)' != '') was evaluated as ('' != ''). Target CreateCustomManifestResourceNames: Target PrepareResourceNames: Target "ResolveAssemblyReferences" skipped. Previously built successfully. Target "SplitResourcesByCulture" skipped. Previously built successfully. Target BeforeResGen: Target "ResolveReferences" skipped. Previously built successfully. Target FindReferenceAssembliesForReferences: Target CoreResGen: Task "GenerateResource" skipped, due to false condition; ('%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' != 'CLR2') was evaluated as ('' == 'Resx' and '' != 'false' and 'CurrentRuntime' != 'CLR2'). Task "GenerateResource" skipped, due to false condition; ('%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '$(GenerateResourceMSBuildRuntime)' == 'CLR2') was evaluated as ('' == 'Resx' and '' != 'false' and 'CurrentRuntime' == 'CLR2'). Target AfterResGen: Target ResGen: Target "CompileLicxFiles" skipped, due to false condition; ('@(_LicxFile)'!='') was evaluated as (''!=''). Target PrepareResources: Target "ResolveKeySource" skipped, due to false condition; ($(SignManifests) == 'true' or $(SignAssembly) == 'true') was evaluated as ( == 'true' or == 'true'). Target _GenerateBindings: Building target "_GenerateBindings" completely. Output file "obj/Debug/ios/sources.list" does not exist. Task "Message" BTouchEmitDebugInformation: false Done executing task "Message". Task "BTouch" /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" /Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE/ApiDefinitions.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:/Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE/obj/Debug/ios/ /sourceonly:/Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE/obj/Debug/ios/sources.list /target-framework=Xamarin.iOS,v1.0 /Library/Frameworks/Mono.framework/Commands/mcs -debug -unsafe -target:library -nowarn:436 -out:/Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE/obj/Debug/ios/temp.dll -r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/bgen/Xamarin.iOS.BindingAttributes.dll -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 -unsafe -r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll -define:UNIFIED;MOBILE;IOS;DEBUG /Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE/ApiDefinitions.cs -lib:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS BTOUCH : error BI0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com System.IO.IOException: Sharing violation on path /Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE/obj/Debug/ios/DreamTeamXamarinAdyenCSE/ADYAESCCMCryptor.g.cs at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00259] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:274 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:144 at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool) at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x00008] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/io/streamwriter.cs:226 at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/io/streamwriter.cs:192 at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/io/streamwriter.cs:174 at System.IO.StreamWriter..ctor (System.String path) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/io/streamwriter.cs:156 at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string) at Generator.GetOutputStream (System.String namespace, System.String name) [0x000a5] in :0 at Generator.GetOutputStreamForType (IKVM.Reflection.Type type) [0x00068] in :0 at Generator.Generate (IKVM.Reflection.Type type) [0x000d3] in :0 at Generator.Go () [0x00e01] in :0 at BindingTouch.Main2 (System.String[] args) [0x01235] in :0 at BindingTouch.Main (System.String[] args) [0x00002] in :0 at System.Environment.get_StackTrace () [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/Environment.cs:316 at ErrorHelper.ShowInternal (System.Exception e) [0x00000] in :0 at ErrorHelper.Show (System.Exception e) [0x00000] in :0 at BindingTouch.Main (System.String[] args) [0x00000] in :0 The command exited with code 1. Done executing task "BTouch" -- FAILED. Done building target "_GenerateBindings" in project "AdyenCSE.csproj" -- FAILED. Target _CheckForCompileOutputs: Target "_SGenCheckForOutputs" skipped, due to false condition; ('$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')) was evaluated as ('Off' == 'On' or (''!='' and 'Off' == 'Auto')). Target _CleanGetCurrentAndPriorFileWrites: Task "ReadLinesFromFile" Done executing task "ReadLinesFromFile". Task "ConvertToAbsolutePath" Done executing task "ConvertToAbsolutePath". Task "FindUnderPath" Comparison path is "/Volumes/DADOS/Empresa1/ios-auto-binding-tool/objc-automatic-master/bindings/AdyenCSE". Done executing task "FindUnderPath". Task "FindUnderPath" Comparison path is "bin/Debug/". Done executing task "FindUnderPath". Task "FindUnderPath" Comparison path is "obj/Debug/". Done executing task "FindUnderPath". Task "RemoveDuplicates" Done executing task "RemoveDuplicates". Target _CleanRecordFileWrites: Task "RemoveDuplicates" Done executing task "RemoveDuplicates". Task "MakeDir" Done executing task "MakeDir". Task "WriteLinesToFile" Done executing task "WriteLinesToFile".

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

Build FAILED.

BTOUCH : error BI0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com 0 Warning(s) 1 Error(s)

Time Elapsed 00:00:01.08

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

Build: 1 error, 0 warnings

dalexsoto commented 6 years ago

I see various errors in your API definition like

// @interface ADYAESCCMCryptor : NSObject
    [BaseType (typeof(NSObject))]
    interface ADYAESCCMCryptor
    {
        // +(NSData * _Nullable)encrypt:(NSData * _Nonnull)data withKey:(NSData * _Nonnull)key iv:(NSData * _Nonnull)iv;
        //[Static]
        [Export ("encrypt:withKey:iv:")]
        [return: NullAllowed]
        NSData Encrypt (NSData data, NSData key, NSData iv);

        // +(NSData * _Nullable)encrypt:(NSData * _Nonnull)data withKey:(NSData * _Nonnull)key iv:(NSData * _Nonnull)iv tagLength:(size_t)tagLength adata:(NSData * _Nullable)adata;
        //[Static]
        [Export ("encrypt:withKey:iv:tagLength:adata:")]
        [return: NullAllowed]
        NSData Encrypt (NSData data, NSData key, NSData iv, nuint tagLength, [NullAllowed] NSData adata);
    }

Removing [Static] is incorrect since the native selector is a static one and some others down the line.

objc-automatic is a unsupported tool by Xamarin and while it uses our tooling like ObjectiveSharpie to generate the API definition to interface Objective-C, you really need to audit the output of ObjectiveSharpie like the warning points out in our documentation portal:

WARNING: Objective Sharpie is a tool for experienced Xamarin developers with advanced knowledge of Objective-C (and by extension, C). Before attempting to bind an Objective-C library you should have solid knowledge of how to build the native library on the command line (and a good understanding of how the native library works).

Please read Binding Objective-C Libraries at our documentation portal and try to fix your binding project, if after fixing it you still encounter this error please attach the full binding project to this issue.

mandel-macaque commented 6 years ago

@rodrigueslg can you please let us know if you managed to fix the issue after @dalexsoto comments?

rodrigueslg commented 6 years ago

No it didn't work, the error continues.

I gave up using objc-automatic.

VincentDondain commented 6 years ago

Hi,

As @dalexsoto said in his comment you're trying to use an unsupported tool and in order to further help you we'd need you to attach the full binding project.

In addition, since it's not clear you're having an issue directly implicating the Xamarin.iOS / Xamarin.Mac SDKs, I think the broader developer community would be the best and quickest place for additional troubleshooting help on this issue. Posting a question on Stack Overflow [0] or the Xamarin Forums [1][2] would be the best next step.

[0] https://stackoverflow.com/questions/tagged/xamarin [1] https://forums.xamarin.com/categories/ios [2] https://forums.xamarin.com/categories/mac

In case it might also be a helpful reference, you can find some general recommendations on the best places to ask various kinds of questions about Xamarin on:

https://developer.xamarin.com/guides/cross-platform/troubleshooting/support-options/