如何将 armv6 架构添加到 Xcode 项目中?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7347802/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 21:54:11  来源:igfitidea点击:

How to add armv6 architecture to Xcode project?

iphoneiosxcodearchitecturearmv6

提问by Anders Lindsetmo

I got a warning that my project needs to include the armv6 binary.. but I don't really know how to do that. Have been googling for an answer, but non of the suggestions seems to fit? Is armv6 something I need to download to support in my app, or does Xcode have it, I just need to include it in my project settings? Also, my app should support OS back till 3.1.

我收到一条警告,说我的项目需要包含 armv6 二进制文件……但我真的不知道该怎么做。一直在谷歌上搜索答案,但似乎没有任何建议适合?我需要下载 armv6 来支持我的应用程序,还是 Xcode 有它,我只需要将它包含在我的项目设置中?此外,我的应用程序应该支持操作系统回到 3.1。

I have added i386 behind armv6 and armv7 in the Debug section, but I dunno if that fixes the problem. Does this seem right to you people with more experience?

我在调试部分的 armv6 和 armv7 后面添加了 i386,但我不知道这是否能解决问题。对于有更多经验的人来说,这是否正确?

Screenshot of Architecture settings:

架构设置截图:

回答by Bancha Rojkittisakul

Follow my step

按照我的步骤

  1. In your picture you choose level change it to "Combined"
  2. Click at Standard (armv7) $(ARCHS_STANDARD_32_BIT)
  3. Choose "Other"
  4. CLick at "$(ARCHS_STANDARD_32_BIT)" and the Click "-" to delete it
  5. Click "+" to add new item
  6. Type "armv6"
  7. Click "+" again
  8. Type "armv7"
  9. Click anywhere to finish
  1. 在您的图片中,您选择级别将其更改为“组合”
  2. 单击标准 (armv7) $(ARCHS_STANDARD_32_BIT)
  3. 选择“其他”
  4. 单击“$(ARCHS_STANDARD_32_BIT)”,然后单击“-”将其删除
  5. 点击“+”添加新项目
  6. 输入“armv6”
  7. 再次点击“+”
  8. 输入“armv7”
  9. 单击任意位置完成

I hope this help

我希望这有帮助

I just have the same problem and I try to do this and it work for me

我只是有同样的问题,我尝试这样做,它对我有用

回答by Teofilo Israel Vizcaino Rodrig

I could run my code on an old 1st generation iPhone using the string armv6 armv7instead of $(ARCHS_STANDARD_32_BIT)in architectures and setting "Build Active Architecture Only"to YES.

我可以在旧的第一代 iPhone 上运行我的代码,在架构中使用字符串armv6 armv7而不是$(ARCHS_STANDARD_32_BIT)并将“仅构建活动架构”设置为是。

回答by Nikunj Jadav

In Project Settings, select "Standard" for the architecture (not "Optimized"). This should allow you to select "armv6" for the Active Architecture. This means it should also work on older devices (barring any other deprecations) once it's on the app store.

在项目设置中,为架构选择“标准”(不是“优化”)。这应该允许您为 Active Architecture 选择“armv6”。这意味着一旦它在应用程序商店中,它也应该适用于旧设备(除非有任何其他弃用)。

Change your base SDK to iOS Device 4.x or below so you can see your armv6 architecture.

将您的基础 SDK 更改为 iOS Device 4.x 或更低版本,以便您可以看到您的 armv6 架构。

回答by MatthewRandall

I just had this same problem. I loaded up a number of older XCode projects and they would compile and run fine with the simulator however as soon as you tried to run or debug on the device (which in my case in a iTouch v2) it would simply say it was running, then say the application exited. No errors, no logs.

我刚刚遇到了同样的问题。我加载了许多较旧的 XCode 项目,它们可以在模拟器上编译并运行良好,但是一旦您尝试在设备上运行或调试(在我的情况下是 iTouch v2),它只会说它正在运行,然后说应用程序退出。没有错误,没有日志。

Thanks to someone on the iOS Developer forums for putting me on the right track. At some point over the last couple of XCode releases (not counting the XCode releases for OSX Lion as I have access only to OSX Snow Leopard) Apple changed how projects were set up even older ones that were loaded.

感谢 iOS 开发者论坛上的某个人让我走上正轨。在最近几个 XCode 版本(不包括 OSX Lion 的 XCode 版本,因为我只能访问 OSX Snow Leopard)的某个时候,Apple 改变了项目的设置方式,甚至是加载的旧项目。

The standard architecture used to include both arm6 and arm7 however, and at least with XCode 4.2 standard now only includes Arm 7 $(ARCHS_STANDARD_32_BIT) and apparently resets an old project's settings as well. Which went un-noticed to me as I used the simulator.

然而,标准架构曾经包括 arm6 和 arm7,至少在 XCode 4.2 标准中,现在只包括 Arm 7 $(ARCHS_STANDARD_32_BIT) 并且显然也重置了旧项目的设置。当我使用模拟器时,我没有注意到这一点。

I tried changing the configuration string to "arm6 arm7" and this did not work. However the error that was returned contained the solution (at least for me an hopefully others still having this problem.)

我尝试将配置字符串更改为“arm6 arm7”,但这不起作用。然而,返回的错误包含解决方案(至少对我来说,希望其他人仍然有这个问题。)

In XCode 4.2 if you wish to build down to older hardware such as v1 and v2 devices simply change the project setting for Architectures to $(VALID_ARCHS) which defaults to the old standard of Arm6 and Arm7.

在 XCode 4.2 中,如果您希望构建到较旧的硬件,例如 v1 和 v2 设备,只需将 Architectures 的项目设置更改为 $(VALID_ARCHS),默认为 Arm6 和 Arm7 的旧标准。

You may as mentioned previously be required to set the Build Active Architecture Only to "Yes" for the debug option (this however is not confirmed by me to be required).

如前所述,您可能需要将调试选项的“仅构建活动架构”设置为“是”(但是我并未确认需要这样做)。

I hope this helps anyone else still having this issue and I apologize for bumping this thread.

我希望这可以帮助仍然有此问题的其他人,我为撞到这个线程而道歉。

回答by iGranDav

That's because you use the new iOS 5 SDK. Apple drop the armv6 architecture from the standard architectures.

那是因为您使用了新的 iOS 5 SDK。Apple 从标准架构中删除了 armv6 架构。

You can have more information on this threadI've started before.

您可以在我之前开始的这个线程上获得更多信息。