在XCode中重置Mac应用程序 [英] Resetting mac application in xcode

查看:52
本文介绍了在XCode中重置Mac应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Xcode中重置可可应用程序?当我从Xcode运行应用程序时,将保存所有用户默认设置.我想重置(删除)我的应用程序以创建一个具有新设置的新应用程序,然后按首次运行的方式运行该应用程序.

How can I reset a cocoa application in Xcode? When I run my application from Xcode all user default are saved. I would like to reset (delete) my application to create a new one with new settings and run as it would be run first time.

我找到了一种方法-我将应用程序的名称更改为其他名称,然后将其重新启动.但是我该如何使用旧名称呢?

I found one way - I change a name of my app to a different one and it is started as new. But how can I do this with an old name?

推荐答案

您可以使用 defaults 命令行工具删除所有设置,您只需要应用程序的捆绑包ID(您可以可以在您的 Info.plist 文件中找到),例如如果您的捆绑包ID是"com.foo.barApp",则可以从终端外壳程序运行它:

You can use the defaults command line tool to remove all the settings, you just need the bundle id of your app (which you can find in your Info.plist file), e.g. if your bundle id is "com.foo.barApp" then you can run this from a terminal shell:

defaults delete com.foo.barApp

这篇关于在XCode中重置Mac应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆