简体   繁体   English

使用SDK 4.0模拟iPhone 3.0

[英]Simulate iPhone 3.0 with SDK 4.0

i have xcode 3.1.3 and xcode 3.2.1 installed 我安装了xcode 3.1.3和xcode 3.2.1

For sure now I use 3.2.1 with Sdk 4 to develop new apps. 当然,我现在使用3.2.1与Sdk 4开发新的应用程序。 But what if I like to test a App compiled with sdk 4 on a simulated iphone that would just have 3.0?? 但是,如果我喜欢在模拟iphone上测试一个用sdk 4编译的应用程序,那将会有3.0?

As BaseSDk i use 4.0 and as target 3.0 作为BaseSDk,我使用4.0和目标3.0

In xcode 3.1.3 i could select a simulator down to 2.x but with sdk 4.0 i only have the option 4.0 iphone or 3.2 ipad 在xcode 3.1.3中我可以选择一个低至2.x的模拟器,但是使用sdk 4.0我只能选择4.0 iphone或3.2 ipad

Example> i know iAd is not supported before 4.0 so I set the framework to weak. 示例>我知道4.0之前不支持iAd所以我将框架设置为弱。 But just to be sure all works fine I really would like to test my app in a simulator that simulates an iphone with 3.0 但只是为了确保一切正常,我真的想在模拟器中测试我的应用程序,该模拟器模拟带有3.0的iphone

thx chris 克里斯

The new simulator does not seem to be able to run the old simulator OSs (3.2 being the oldest it'll run). 新的模拟器似乎无法运行旧的模拟器操作系统(3.2是最早运行的)。 I tried moving them over from old SDK installs and several variations and "no go". 我尝试将它们从旧的SDK安装和几个版本中移除,并且“不行”。

You can check that you aren't using methods defined in the new SDK, when you set the base SDK to 4.0 but set the Deployment to to 3.1.3, for example. 例如,当您将基本SDK设置为4.0但将部署设置为3.1.3时,可以检查是否未使用新SDK中定义的方法。 For a blog post on how to do this see this blog post , and note my comment on an easier way to do the last two steps (no need to edit the project file as a text file). 有关如何执行此操作的博客文章 ,请参阅此博客文章 ,并注意我对更简单的方法执行最后两个步骤的注释(无需将项目文件编辑为文本文件)。

inside the iphone sdk dmg file, there should be a folder called packages. 在iphone sdk dmg文件里面,应该有一个名为packages的文件夹。 in it, you'll find packages like iPhoneSDK3_0 and iPhoneSimulator3_0. 在其中,你会找到像iPhoneSDK3_0和iPhoneSimulator3_0这样的软件包。 Install them to be able to use them in xcode. 安装它们以便能够在xcode中使用它们。

Correct me if I'm wrong, but I think a device with 3.0 installed can't even run apps compiled with 3.2 or 4.0. 如果我错了,请纠正我,但我认为安装3.0的设备甚至无法运行使用3.2或4.0编译的应用程序。 Furthermore, Apple now only accepts iPhone apps (including updates of existing apps) linked against the 4.0 libraries, which won't run on OS version 3.0 devices. 此外,Apple现在只接受与4.0库相关联的iPhone应用程序(包括现有应用程序的更新),这些应用程序无法在OS 3.0版设备上运行。

So why do you want to test your app on a 3.0 device? 那你为什么要在3.0设备上测试你的应用程序呢?

Try setting the architecture you want to build for in the Xcode project preferences and rebuilding. 尝试在Xcode项目首选项和重建中设置要构建的体系结构。

If this doesn't work, completely uninstall Xcode and downgrade. 如果这不起作用,请完全卸载Xcode并降级。 You have to completely uninstall because your system must have updated the frameworks for 4.0. 您必须完全卸载,因为您的系统必须已更新4.0的框架。

Hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM