iPhone模拟器安装在我的计算机的哪个位置?
我一直在试图找到我在模拟器中运行的测试应用存储的位置。
iPhone模拟器安装在我的计算机的哪个位置?
我一直在试图找到我在模拟器中运行的测试应用存储的位置。
模拟器:~/Library/Application Support/iPhone Simulator/
您可以在Mac OS X中从该目录浏览模拟器文件。
针对Xcode 4.4的更新:虽然iPhone模拟器仍在同一位置,但Apple在以下位置添加了iPhone模拟器的快捷方式:
/Applications/Xcode.app/Contents/Applications
请注意,新版本的Xcode现在可以在Mac App Store中获取。因此,之前随安装程序提供的所有内容现在都被打包到Xcode.app
中。
因此,iOS模拟器二进制文件位于此位置:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/
模拟器中安装的应用程序以及其他配置文件仍然在此处。~/Library/Application Support/iPhone Simulator/
这是从Xcode 4.3.1的发布说明中提取的摘录。
Xcode 4.3.1有何新变化
Xcode现在以应用程序的形式分发,而不是安装程序。这个变化使得Xcode可以直接从Mac App Store更新。
从 Xcode 6 和 iOS 8 开始,您将在此找到它:
~/Library/Developer/CoreSimulator/Devices/{cryptic number}/data/Containers/Data/Application/{cryptic number}/
或者你可以从以下代码执行中获取:
NSLog(@"Documents Directory: %@", [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]);
Xcode 6 -> /Users/{你的用户名}/Library/Developer/CoreSimulator/Devices/{设备ID}/data/Containers/Data/Application/{应用ID}/
或者在Xcode控制台中打印出来
#if TARGET_IPHONE_SIMULATOR
NSLog(@"Documents Directory: %@", [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]);
#endif
实际的模拟器应用程序本身位于/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator。
要在模拟器中查找您应用程序的最新安装版本,您可以使用以下命令:
find "/Users/$USER/Library/Application Support/iPhone Simulator" -type d -name 'YourAppName.app' -print0 | xargs -0 ls -td | head -1
别忘了用你的应用程序名称替换YourAppName!
在 Xcode 6 中,iOS 模拟器应用程序位于此位置:
/Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app
随着Xcode 6中CoreSimulator的引入,每个模拟设备现在都有自己的数据。之前的版本中,所有设备对于每个iOS版本共享相同的数据。
设备位于~/Library/Developer/CoreSimulator/Devices。 日志位于~/Library/Logs/CoreSimulator。
请注意,~/Library/Developer/CoreSimulator/Devices//data/Library/Logs是一个符号链接到~/Library/Logs/CoreSimulator/。
CoreSimulator将在首次使用时(以及安装旧的模拟器运行时后)创建一组初始设备。您可以从Xcode.app内部或使用'xcrun simctl create'或'xcrun simctl delete'命令行添加或删除新设备。
在X-Code 4.2中
iPhone模拟器的照片存储在
/Users/user_name/Library/Application Support/iPhone Simulator/5.0/Media/DCIM/100APPLE
~
д»Јжӣҝ/Users/INSERT_YOUR_USER_HERE
пјҢеӣ жӯӨи·Ҝеҫ„еҸҳдёәпјҡ~/Library/Application Support/iPhone Simulator/
гҖӮ - progrmr~
。 - BesiDeveloper/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
)如https://dev59.com/v3I_5IYBdhLWcg3wAeHl所述。 - abernier