简体   繁体   English

如何使用Xcode 6在iPhone 4上部署和调试iOS应用

[英]how to deploy and debug an iOS app on iPhone 4 using Xcode 6

I have an app which is crashing on iPhone 4 having 7.1 installed , i want to debug app on phone using xcode 6, is it possible(as it shows unavailable currently) ? 我有一个在安装了7.1的iPhone 4上崩溃的应用程序,我想使用xcode 6在手机上调试该应用程序吗(可能显示为当前不可用)? if not what are the options I am left with ? 如果不是,我还有什么选择?

There is no option for an "iPhone 4 Simulator" in Xcode 6. But, if you use an iPhone 4S simulator with iOS 7.1, you can achieve the same effect, because with the same screen size and OS they are essentially the same for testing on the simulator. Xcode 6中没有用于“ iPhone 4 Simulator”的选项。但是,如果您将iPhone 4S Simulator与iOS 7.1一起使用,则可以实现相同的效果,因为在相同的屏幕尺寸和操作系统下,它们在测试中实质上是相同的在模拟器上。 Also see this question for reference. 另请参阅此问题以供参考。

Of course, if you have a physical iPhone 4, you can also test on the actual device. 当然,如果您有实体iPhone 4,也可以在实际设备上进行测试。 Make sure that your Deployment Target under TARGETS AND the iOS Deployment Target under PROJECT are set to 7.1 or below. 请确保您的Deployment TargetTARGETSiOS Deployment Target下的PROJECT设置为7.1或以下。 Your Base SDK can be set higher, but this means you will have to make sure that you are either not using features or classes that are unavailable in earlier versions of iOS, or do a version check and adapt your program accordingly. 您可以将Base SDK设置得更高一些,但这意味着您必须确保没有使用iOS早期版本中不可用的功能或类,或者进行版本检查并相应地调整程序。 For example, UIAlertController was introduced in iOS 8, and will crash a device below that if it is invoked. 例如,iOS 8中引入了UIAlertController ,如果调用该设备,它将使低于该设备的设备崩溃。 So you might want to do a version check and use good old UIAlertView if the iOS device version is below 8. An issue like this is the most probable cause of your crash. 因此,如果iOS设备版本低于8,则可能需要进行版本检查并使用良好的旧UIAlertView 。此类问题是导致崩溃的最可能原因。

Also, if it's the first time you're using this device for development, don't forget to set it up by going to Window -> Devices , selecting your connected device, and pressing Use for development . 另外,如果这是您第一次使用此设备进行开发,请不要忘记通过以下方法进行设置:进入“ Window -> Devices ,选择连接的设备,然后按“ Use for development

If you don't have the iOS 7.1 SDK and don't see it as a iPhone 4S (7.1) in the simulator selection, you need to download it by going to Preferences -> Downloads . 如果您没有iOS 7.1 SDK,并且在模拟器选择中没有将其视为iPhone 4S (7.1) ,则需要转到Preferences -> Downloads

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

相关问题 如何在Xcode中调试间歇性缓慢的iOS iPhone应用程序加载时间? - How to debug intermittent slow iOS iPhone app load times in Xcode? 如何将Xcode应用程序部署到iPhone? - How to deploy an Xcode app to iphone? 为最新的 iPhone 构建 Xcode iOS 应用程序(如何在不更新 Xcode 的情况下使 Xcode 部署到最新的 iOS?) - Xcode iOS app build for newest iPhone (How to make Xcode to deploy to the very latest iOS without updating Xcode?) XCode 3.2.5:将调试版本部署到iPhone iOS 4.2.1失败 - XCode 3.2.5: Deploy Debug Build to iPhone iOS 4.2.1 is FAILING 我可以使用(故事板)将iphone应用程序部署到使用xcode 4.3开发的ios4或更低版本吗? - Can I deploy iphone app to ios4 or lower that is developed in xcode 4.3 using (Storyboards)? 如何在ios模拟器中部署应用(Xcode 6.0.1) - How to deploy app in ios simulator(Xcode 6.0.1) 如何使用XCode 5在iOS7上调试Cordova应用 - How to debug an cordova app on iOS7 with XCode 5 如何使用 Xcode 13.3 将 React-Native 应用程序部署到我的 iPhone? - How to deploy React-Native app to my iPhone using Xcode 13.3? 如何使用带有 Browserstack 的 Xcode 调试 iOS 应用程序? - How to debug iOS application using Xcode with Browserstack? 如何使用没有Apple开发者帐户的Delphi Seattle将iOS应用程序部署到iPhone? - How to deploy iOS app to a iPhone using Delphi Seattle without Apple developer account?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM