ホームボタン押下以外のアクションでアプリを終了させる。というかクラッシュするだけ

受託開発の摩訶不思議な世界では我々の想像も及ばない意志決定がなされます。
具体的にいうと連日もの会議を重ねた上「iPhoneアプリを特定のユーザーには実行させたくない(ダウンロードはなぜかできる)のでアラートを出して終了させよう。ホームボタン押さないでいいしむしろ便利」みたいな提案が自信満々にあがってきます。

そういうのをどう実装するのかすら調べてなかったのでちょっと考えてみました。
たぶん最小のコードで以下のようなかんじです。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  
  UIAlertView* alert = [[[UIAlertView alloc] initWithTitle:@"アプリを強制終了" 
                                                  message:@"いmあすぐ終了してください!!" 
                                                 delegate:self 
                                        cancelButtonTitle:@"Yes" 
                                         otherButtonTitles:@"No", nil] autorelease];
  [alert show];
  
  [self.window makeKeyAndVisible];
  return YES;
}

#pragma mark UIAlertViewDelegate
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
  [[NSThread mainThread] exit];
  //exit(0);
  //[[UIApplication sharedApplication] release];
}

何かしらの経路でEXIT させればいいようです。
アプリ実行環境で保護されてるのでたぶんプロセス一覧には初期化されたした状態で残るんじゃないかなぁ(サスペンドサポート切ると消える?)。

ちなみに上のコードだとYesでもNoでもクラッシュさせるのでプロダクトコードにコピペする際には気をつけてください。

参考
http://stackoverflow.com/questions/355168/proper-way-to-exit-iphone-application