xcode 找不到 UIKit.framework

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24544916/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 05:09:43  来源:igfitidea点击:

Cannot find UIKit.framework

iosxcodeframeworksuikitxcode6

提问by Josh

I am currently running Xcode 6 beta 2, and I can't find the UIKit.framework. I've looked in System/Library/Frameworks as suggested in Apple's reference page

我目前正在运行 Xcode 6 beta 2,但找不到 UIKit.framework。我已经按照Apple 参考页面中的建议查看了 System/Library/Frameworks

All the other frameworks are there, except UIKit.

所有其他框架都在那里,除了 UIKit。

Note: I have no issues importing the UIKit framework

注意:我在导入 UIKit 框架时没有问题

采纳答案by 0oneo

UIKit.framework is here /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks

UIKit.framework 在这里 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks

回答by iCaramba

In the newer Xcode versions the iPhoneOS frameworks do no longer include a binary, but include a tbd file. You can find simulator binaries at this path:

在较新的 Xcode 版本中,iPhoneOS 框架不再包含二进制文件,而是包含一个tbd 文件。您可以在此路径中找到模拟器二进制文件:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks

回答by Mihaela

New location:

新地点:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks

回答by B.R.W.

I'm guessing you already find it out, but just for the record: the UIKit.framework is available only on iOS platform. The path /System/Library/Frameworks/contains the frameworks that your Mac OS X has installed (not your Xcode).

我猜你已经找到了,但只是为了记录:UIKit.framework 仅在 iOS 平台上可用。路径/System/Library/Frameworks/包含您的 Mac OS X 已安装的框架(而不是您的 Xcode)。

The iOS frameworks that are used in iOS projects, at least when using Xcode, is the following:

iOS 项目中使用的 iOS 框架,至少在使用 Xcode 时,如下:

/Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks

/Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks

The Xcode6-Beta4.apppart of the path is the app name of your Xcode in your Applications folder, that can be somewhat different if you have another version installed. Also, the iPhoneOS8.0.sdkcan be different if you're using other SDK version (iOS 7.0, for example).

路径的Xcode6-Beta4.app部分是应用程序文件夹中 Xcode 的应用程序名称,如果您安装了其他版本,则可能会有所不同。此外,如果您使用其他 SDK 版本(例如 iOS 7.0),iPhoneOS8.0.sdk可能会有所不同。

EDIT: If the UIKit.framework is there, then you probably changed some configuration in your Xcode. The easier way to fix it is probably by deleting it and reinstalling.

编辑:如果 UIKit.framework 存在,那么您可能更改了 Xcode 中的一些配置。更简单的修复方法可能是删除它并重新安装。

回答by Jichao Wu

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore

回答by joey

Updated for Xcode 11.3:

针对 Xcode 11.3 更新:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/UIKit.framework

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/UIKit.framework