iDevice [iPod Touch、iPhone、iPad] からデータ/アプリケーションをリモート消去する方法は?
考えられる解決策は次のとおりです。
- iPod で「iPod を探す」を設定する
- サーバーを呼び出して、デバイスが盗まれたと報告されているかどうかを確認しますか? はいの場合は、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 がまだ存在するのはなぜですか?