无法使用 iOS 4.3.5 设备在 Xcode 4.1 中构建源代码
我一直在 Xcode 4.1 中使用 iOS 4.3.5 的 iPhone 进行开发。没有版本不匹配的问题就很好了。今天,我连接了另一部具有相同版本 iOS (4.3.5) 的 iPhone,但我无法在该设备上构建源代码。主办方窗口说,
“Hee's iPhone”上的 iOS 版本与任何版本都不匹配 支持通过此安装进行开发的 iOS 版本 iOS SDK。请将设备恢复到列出的操作系统版本 如下,或更新至最新版本的 iOS SDK;这是 可以在这里找到。
我知道如果我更新 Xcode 或降级 iPhone 就会解决这个问题。但是,我想知道是否还有其他选择。我真的很想知道为什么有些设备很好但其他设备却不行。
I have been developing in Xcode 4.1 with iphone of iOS 4.3.5. It was fine without a version mismatch problem. Today, I connected another iphone which has the same version of iOS (4.3.5) and I could not build source code on to the device. The organizer window said,
The version of iOS on “Hee’s iPhone” does not match any of the
versions of iOS supported for development with this installation of
the iOS SDK. Please restore the device to a version of the OS listed
below, or update to the latest version of the iOS SDK; which is
available here.
I know it will be solved if I update Xcode or downgrade iPhone. However, I want to know other options if there are any. I really wonder why some devices are fine but others are not.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将适用于 iPhoneOS/iPhoneSimulator 平台的其他 SDK/符号放入其中:
我所做
的就是下载旧的 xcode 和新的 beta xcode,将它们安装到类似 /Developer-3.2.3/ 的位置,然后从以下位置对上面的文件夹进行符号链接/别名/Developer-3.2.3 到 /Developer。
这让我的 4.1 xcode 在 iOS5.0 手机上进行测试!上面的目录路径可能不准确,因为我是用手机写的,但它们与此接近。当我回到我的计算机时,我将确保这些目录是正确的。
对于模拟器版本,它将是:
编辑(回到我的计算机):
这是我的开发人员目录的样子:
为了做到这一点,您需要安装具有不同 iOS SDK 的不同版本的 Xcode。为了实现上述目的,我只安装了 Xcode 3.2.4、3.2.4、4.1 和 4.2(测试版)。我使用 4.1 作为我的主
/Developer
目录。将每个 Xcode 安装到单独的位置后,您可以通过以下方式将符号/SDK 目录从非主 Xcode 安装符号链接到主安装路径:
在主
/Developer/Platforms 中对每个 SDK/Symbol 目录进行符号链接后/iPhoneOS.platform/DeviceSupport
和/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
目录,打开 Xcode,你应该能够查看您的设备并使用它来测试构建等。编辑 2(命令解释):
ll
是我为ls -l 制作的
命令:别名
ln
(符号链接)是创建快捷方式/别名的命令。 (非常基本的)语法是:这是
ln
手册页这是
ls
手册页You can put additional SDKs/Symbols for the iPhoneOS/iPhoneSimulator platforms inside:
and
What I do is download old xcode and new beta xcode, install them to something like /Developer-3.2.3/, then symlink/alias the folders above from the /Developer-3.2.3 to the /Developer.
This lets my 4.1 xcode test on an iOS5.0 phone! The directory paths above might not be exact as I am writing this from my phone but they areaomething close to that. When I get back to my computer I will make sure those directories are correct.
For the simulator versions it would be:
Edit (back at my computer):
Here is what my Developer directories looks like:
In order to do this, you need to install the different versions of Xcode that have different iOS SDKs. To achieve the above, I only installed Xcode 3.2.4, 3.2.4, 4.1, and 4.2 (beta). I use 4.1 as my main
/Developer
directory.Once each Xcode is installed into seperate locations, this is how you would symlink the Symbols/SDKs directories from a non-primary Xcode install to your main install path:
After symlinking each SDK/Symbol directory in your main
/Developer/Platforms/iPhoneOS.platform/DeviceSupport
and/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
directories, open up Xcode, and you should be able to see your device and use it to test builds, etc.Edit 2 (commands explained):
ll
is analias
I made for thels -l
command:ln
(symlink) is a command to create a shortcut/alias. The (very basic) syntax is:Here is the
ln
man pageHere is the
ls
man page