Delete app from OSX simulator in Xcode

随声附和 提交于 2019-12-10 02:06:23

问题


How do i delete an app from the OSX simulator like on the iOS simulator?? I want to delete an app due to the change of Core Data xcdatamodeld but i can't find a way. Thanks in advance


回答1:


As playitgreen mentioned in one of the comments, the way to delete data relating to your OSX app is by removing the folder/.storedata file from:

~/Library/Application Support/<YOUR OSX APP BUNDLE NAME>/

for example:

~/Library/Application Support/com.yourcompany.yourapp/

All credit to playitgreen




回答2:


On MacOS Mojave 10.14.4 and on other MacOS as well the folder has changed and now the app is in the following location:

~/Library/Containers/com.yourcompany.yourapp/




回答3:


Specifically for Catalyst apps in macOS 10.15 (Catalina) and Xcode 11.2.1.

I tried right-clicking on the app's icon in the dock and then Options -> Show in Finder. I deleted all the files there and ran again from Xcode. The files returned and the app still had the data from before.

In ~/Library/Containers I found a folder called maccatalyst.<my_apps_bundle_identifier>. I deleted the files contained there and when I reran the app from Xcode the files returned and original data was gone. So that seems to be the way.

~/Library/Containers/maccatalyst.<app_bundle_identifier>




回答4:


There are 2 solution:

  1. When running the app press CMD + SHIFT+ H (simulates a home button press), then you can remove it by long press like on the phone

  2. Remove the appropriate app foler from ~/Library/Application Support/iPhone Simulator/<ios_version_that_you_use>



来源:https://stackoverflow.com/questions/22590285/delete-app-from-osx-simulator-in-xcode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!