1
私はMac開発の初心者です。私はコマンドでiPhoneのバックアップを取らなければならない。これについてのサイトの説明があります(http://keepmurmuring.blogspot.com/2009/06/iphone-backup-informationnote.html)。パラメータ "System/Library/PrivateFrameworks/MobileDevice.framework/Resources/AppleMobileDeviceHelper.app/Contents/Resources/AppleMobileBackup"のスクリプトを実行しようとしました。しかし、私はこのパスにアクセスすることができず、エラー "launch path not accessible"を得ることができません。誰でもパスにアクセスして自分の仕事を完了するのを助けることができますか?Macからスクリプトを実行
NSString *_filename [email protected]"System/Library/PrivateFrameworks/MobileDevice.framework/Resources/AppleMobileDeviceHelper.app/Contents/Resources/AppleMobileBackup";
NSArray *arguments = [NSArray arrayWithObjects: @"./ambackup",
@"--backup", @"--target", @"BE1F74EEB98E14D426665D54105DE27821A6C0FE", nil];
NSTask *task = [[NSTask alloc] init];
NSPipe *pipe = [NSPipe pipe];
NSFileHandle *readHandle = [pipe fileHandleForReading];
NSData *temp = nil;
NSMutableData *_data = [[NSMutableData alloc] init];
[task setLaunchPath:_filename];
[task setArguments:arguments];
[task setStandardOutput:pipe];
[task launch];
while ((temp = [readHandle availableData]) && [temp length])
{
[_data appendData:temp];
}
[task release];