在Xamarin中启用ARC [英] Enabling in ARC in xamarin

查看:72
本文介绍了在Xamarin中启用ARC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大多数安全和渗透工具都会报告是否未启用ARC.

Most of the security and penetration tools report if the ARC is not enabled.

fobjc-arc flag is not Found 

据我所知,我们无法在xamarin中执行此操作,因为我们这里没有构建设置.

As far as I know we can't do this in xamarin because we don't have build settings here.

只能在构建设置中设置此标志.

This flag can be set in build settings only.

即使我们能够做到,它也不会起作用,因为xamarin使用C#和MRC自己管理内存.

Even if we could , it won't work because xamarin uses C# and MRC to manage memory by itself.

任何人都可以向我解释如何完成或不执行,或者我的理解是错误的

Can anybody explain me how it can be done or not done or my understanding is wrong

我们可以通过构建设置将ARC打开到完整的项目

We can turn on ARC to a full project by build settings

CLANG_ENABLE_OBJC_ARC=YES

但是在Xam Studio中无法执行此操作...在mtouch中设置值也会引发错误

But there is no way to do this in xam studio ... setting the value in mtouch also throws error

推荐答案

在Xamarin.iOS项目属性窗口的其他mtouch参数文本字段中添加以下内容:

Add the following to the Additional mtouch arguments text field within the Xamarin.iOS project properties window:

-gcc_flags "-fobjc-arc"

这篇关于在Xamarin中启用ARC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆