LoginSignup
4
5

More than 5 years have passed since last update.

終了時の状態を保存しない設定

Last updated at Posted at 2013-05-03

10.7以降でSaved Application Stateを勝手に作られて邪魔

だけどNSProcessInfoで、

  • – automaticTerminationSupportEnabled
  • – disableAutomaticTermination
  • – enableAutomaticTermination

を呼び出すと10.6とソースコードの互換性の問題が・・・
と言うときに、Infor.plistに、

info.plist
    <key>NSSupportsAutomaticTermination</key>
    <false/>

または、Xcodeの
Custom OS X Application Property
の中に

key type Value
NSSupportsAutomaticTermination Boolean NO

という項目を追加すると、ソースコードを記述せずに、Saved Application Stateをdisableできる。

お勧めしないが、他の人が作ったアプリもこれで強制的にSaved Application Stateを無視させることも出来なくは無い。

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5