1

我不小心删除了我的 uikit 和基础框架。它在 Xcode 中不存在。我知道我可以通过构建阶段添加它,但是我在哪里可以得到这些框架?谢谢

4

3 回答 3

2

我建议您使用App Store 上提供的新版Xcode 4.3.x。这将直接安装到您的/Applications文件夹中。所以重新安装比以前基于安装程序的版本要容易得多:

  1. 删除/Applications/Xcode.app
  2. 从 AppStore 再次安装 Xcode 。

这应该可以解决您的问题,因为上述框架驻留在此处(在 App 包内):

 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/
于 2012-07-10T18:18:59.460 回答
2

只需重新安装 Xcode。应该以正确的方式和正确的位置嵌入 uikit 和基础框架。

只是做了一些研究,如果你卸载/重新安装它会更好。谷歌上有多个版本的基础框架,你不想通过开发者工具添加它们

~/行尾

于 2012-07-10T17:48:00.440 回答
2

烦人的是,每次 Xcode 升级时,那些系统框架都会移动到一个新文件夹中。

实际上,我们可以在 lldb 中使用 image 命令来告诉你框架在哪里:

(lldb) image lookup -name "removeFromSuperview"
....
....
22 matches found in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore:
        Address: UIKitCore[0x00000000004a6b73] (UIKitCore.__TEXT.__text + 4866259)
        Summary: UIKitCore`-[UISegment removeFromSuperview]        Address: UIKitCore[0x00000000006267d9] (UIKitCore.__TEXT.__text + 6438201)
        Summary: UIKitCore`-[UICalloutBarButton removeFromSuperview]        Address: UIKitCore[0x000000000062924a] (UIKitCore.__TEXT.__text + 6449066)
.....

现在我们可以看到,UIKit.framework 位于/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore

于 2020-07-27T10:56:21.003 回答