简体   繁体   English

源代码与编译代码

[英]Source Code vs Compiled Code

I am noticing something I've never seen before, and I'm hoping someone can clarify exactly what's going on. 我注意到以前从未见过的东西,希望有人能弄清楚到底发生了什么。

I put iOS 6 on my development device and then downloaded my app from the App Store. 我将iOS 6放在开发设备上,然后从App Store下载了我的应用程序。 That app was created in an older version of Xcode without the iOS 6 SDK. 该应用是在没有iOS 6 SDK的旧版Xcode中创建的。 It runs fine on my device when I go get it. 当我拿到它时,它在我的设备上运行良好。

However, I now have Xcode 4.5 with the iOS 6 SDK. 但是,我现在拥有带有iOS 6 SDK的Xcode 4.5。 I open my old Xcode project, which has the same exact source code used to build the app in the app store - no changes to the code whatsoever. 我打开了旧的Xcode项目,该项目具有与在应用商店中构建应用相同的确切源代码-无需更改任何代码。 When I run this project again on my iOS 6 device, from Xcode, the app is buggy and does not at all behave as expected. 当我在Xcode的iOS 6设备上再次运行该项目时,该应用程序存在问题,根本无法达到预期的效果。

I know the source code is the same, so is this a result of different compiled binaries due to different SDKs? 我知道源代码是相同的,这是由于不同的SDK而导致的不同编译二进制文件的结果吗?

There is a developer beta of every major version active for months before public release for reason. 出于某种原因,每个主要版本的开发人员beta版本在公开发布前的几个月中都处于活动状态。

A lot has changed with Xcode 4.5. Xcode 4.5发生了很多变化。 iOS SDK 6.0 has many changes (iOS Developer Program required to open link), armv6 support (architecture used by iPhone 3G and older models) is gone, compiler has some new features and so on. iOS SDK 6.0进行了许多更改 (打开链接需要使用iOS开发人员计划),armv6支持(iPhone 3G和更旧型号使用的体系结构)已消失,编译器具有一些新功能等等。

In short, it's normal that code requires some maintenance when tools change. 简而言之,当工具更改时,代码需要一些维护是正常的。

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

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