xcode 模拟器构建路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9404422/
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-14 23:24:45  来源:igfitidea点击:

Path for simulator build

iphoneiosxcodecocoa-touch

提问by Abhinav

How do we find the location of the directory where we put simulator build? In my system the path is Library/Application Support/iPhone Simulator/5.0/Applications. What would be the path on someone else's system?

我们如何找到放置模拟器构建的目录的位置?在我的系统中,路径是Library/Application Support/iPhone Simulator/5.0/Applications. 别人系统上的路径是什么?

回答by sch

You can look for a folder called Derived Datain the Projectstab in Organizer. Xcode includes index, build output and logs there. So you can find there the built binary for the Simulator and for iOS devices. You can open this folder by right clicking on the device build and selecting Show in Finder.

您可以在OrganizerProjects选项卡中查找名为Derived Data的文件夹。Xcode 包括索引、构建输出和日志。所以你可以在那里找到模拟器和 iOS 设备的内置二进制文件。您可以通过右键单击设备版本并选择Show in Finder来打开此文件夹。

The folder you mentioned is the folder where Xcode puts the binaries that it passes to the simulator when you launch your app there. It is usually in the same location.

您提到的文件夹是当您在那里启动应用程序时 Xcode 将它传递给模拟器的二进制文件放在其中的文件夹。它通常位于同一位置。

回答by 0xDE4E15B

$user$/Library/Application Support/iPhone Simulator/5.0/Applications. Or get the path using the line:

$user$/Library/Application Support/iPhone Simulator/5.0/Applications。或者使用以下行获取路径:

NSString *outputPath = [[NSString alloc] initWithFormat:@"%@", [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]];

This line returns you the path to the Documents folder inyour app.

此行的回报,你的路径,文件夹的应用程序。

回答by mohsen

you can use Xcode Command to find it just pause your project and type po NSHomeDirectory()like below picture

您可以使用 Xcode 命令找到它,只需暂停您的项目并键入po NSHomeDirectory()如下图所示

enter image description here

在此处输入图片说明

回答by Dima Belyaev

Try this

尝试这个

NSLog(@"%@", NSHomeDirectory());

or

或者

[NSHomeDirectory() stringByAppendingPathComponent: @"Documents"];

回答by Eric

right click on the finish product and say "show in finder"

右键单击完成的产品并说“在查找器中显示”