问题
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:
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
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