如何在无ARC项目的情况下使用新的iOS Google Maps SDK [英] How to work with new iOS Google Maps SDK under no ARC project

查看:54
本文介绍了如何在无ARC项目的情况下使用新的iOS Google Maps SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将新的Google Maps API添加到我的iOS应用程序中,但是它尚未使用ARC.因此,检查文档后,我认为必须具有ARC,SDK才能正常工作.我该怎么办?我的意思是仅针对与Google地图一起使用的资源激活ARC. (.xib文件,控制器)该怎么办?

I'm trying to add the new Google Maps API into my iOS application, however it does not use ARC yet. So, checking at the docs I think it's a requirement to have ARC in order for the SDK to work. How could I do that? I mean an option would be activating ARC just for the resources that will work with Google maps. (.xib files, controllers) How could that be done?

推荐答案

您可以通过添加编译器标志 -fno-objc-arc

you can disable ARC for individual files by adding a compiler flag -fno-objc-arc

此标志告诉编译器文件不是基于ARC的.

This flag tells the compiler that the files are not ARC based.

要执行此操作

  1. 选择目标
  2. 转到构建阶段"标签
  3. 扩展编译源
  4. 选择不是基于Arc的文件
  5. 按Enter
  6. 在出现的对话框中输入文本 -fno-objc-arc
  7. 完成
  1. Select the target
  2. Go to Build Phases tab
  3. Expand the Compile Sources
  4. Select the files which are not Arc based
  5. Press Enter
  6. In the appeared dialog box enter the text -fno-objc-arc
  7. Done

有关更多参考,请检查此问题

For more reference please check this question how-can-i-disable-arc-for-a-single-file-in-a-project

这篇关于如何在无ARC项目的情况下使用新的iOS Google Maps SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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