How to deploy project with iOS base SDK 6.1 to device with iOS 7

被刻印的时光 ゝ 提交于 2019-11-28 17:17:38
karim

Find and download old SDK. Older SDKs are found here, https://developer.apple.com/downloads/index.action?name=Xcode

I have copied the xcode.app directory as Xcode_4.6.3.app. Now you can test and debug in both xcode versions. You have to run them from the corresponding folders or create shortcuts in your desktop. When I build from command line i give the parameter as iPhoneOS6.1 instead of iPhoneOS7.0

This worked great for me in Xcode5 and iOS. Go to into Xcode5's SDK dir. Add a symbolic link to the old SDK like this:

ln -s /Applications/Xcode_4.6.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk iPhoneOS6.1.sdk
rakmoh

In Xcode 5 toolbar, for your target you will see your device listed twice (you also mentioned this in your question ). For some weird reason one is building with iOS 6.x appearance and the other with iOS7 appearance. Trying building/running on one of the device from this list. If you still see the iOS7 appearance, click the stop in the toolbar, select the other device and build again.

I am not seeing any crashes in Xcode 5, so you may want to reinstall if it is crashing a lot for you.

Firstly, you will need to copy and paste the iOS 6.1 SDK from a previous version of XCode. I believe other people have given instructions on how to do this.

Then, assuming you intend to continue development for iOS 6 (for example, without breaking the iOS 6 UI, and you don't intend to use new APIs), do this:

  • XCode should recognize 2 devices every time you plug in an iOS 7 device to your computer
  • Run the application on both of them (they are the same device actually, but one of them will be running the application iOS 6-style, and the other one will try to update it to iOS 7-style)
  • Remember the one running the app iOS 6-style (for me it's the topmost), and do Product > Archive on that device

This should keep on allowing you to build your applications with the iOS 6 style UI, at the same time allowing you to use Xcode 5. I would recommend starting a new development branch exclusively for UI changes to get your app's UI iOS 7 compatible.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!