1

iDevice [iPod Touch、iPhone、iPad] からデータ/アプリケーションをリモート消去する方法は?

考えられる解決策は次のとおりです。

  1. iPod で「iPod を探す」を設定する
  2. サーバーを呼び出して、デバイスが盗まれたと報告されているかどうかを確認しますか? はいの場合は、exit(0) 関数を呼び出して、データとアプリを消去します。

2 番目の解決策を使用して、アプリからデータを消去しました。そのために次の2つの方法を使用しました。

-(NSString *)getDatabasePath {
    NSArray *subDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[self applicationAppSupportDirectory] error:nil];
    NSString *path = [[[self applicationAppSupportDirectory] stringByAppendingPathComponent:[subDir lastObject]]
                      stringByAppendingPathComponent:@"xyz.sqlite"];

    return path ;
}
-(void)deleteDatabase {

    NSFileManager *manager = [NSFileManager defaultManager] ;
    NSError *error = nil ;
    NSString *databasePath = [self getDatabasePath];

    if ([manager fileExistsAtPath:databasePath]) {
        [manager removeItemAtPath:databasePath error:&error] ;
    }
    debug(@"%@",error);

    if (error) {
        [Utility showAlertViewWithTitle:@"Error" andMessage:error.localizedDescription];        
    }
}

-(void)deleteApplication {

    exit(0);
    NSString *appPath = [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] ;
    NSLog(@"%@",appPath);

}

アプリケーション フォルダを削除しましたが、まだアプリケーション ロゴが iDevice に残っています。これは私のアプリを一掃する正しい方法ですか? Apple はこれで私のアプリを拒否しますか? app フォルダーを完全に削除しても、appLogo がまだ存在するのはなぜですか?

4

1 に答える 1

0

Apple は、exit(0) の使用を許可しません。ただし、おそらくユーザーデータを消去できますが、その後もアプリケーションを使用できることを確認する必要があります (つまり、アプリケーションを最初の起動時の状態に戻します)。

盗まれた部分を報告するには、独自の Web UI などを作成する必要があります。これは、Apple が現在、サードパーティ アプリ内からそのような iCloud 情報にアクセスすることを許可していないためです。

于 2013-07-20T08:50:13.543 に答える