Xamarin.Forms Additional Arguments

Bryan Franklin 0 Reputation points


When building an application with Xamarin.Forms, I am running into an error with using the option of Additional Arguments for iOS with -gcc_flags "-fobjc-arc". When I use this argument I get the error of:

Error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -fobjc-arc -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker Documents/GitHub/Trunk/Source/iOS/obj/iPhoneSimulator/Debug/Entitlements.xcent (MT5201) (DOMA.iOS)

When I remove the Additional Argument for iOS, the application can build. Is the argument that I am using incorrect?

A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,260 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,419 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,960 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 30,741 Reputation points Microsoft Vendor


    The -fobjc-arc flag indicates automatic reference counting, which is a memory managing mechanism in the swift language.

    Please refer to Automatic Reference Counting for more details.

    In C#, since C# has its own memory managing mechanism Automatic Memory Management, you don't need to specify ARC.

    Best Regards,

    Alec Liu.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments