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

查看:27
本文介绍了在 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天全站免登陆