The following code works in the debugger and running it out of Xcode. tmpsourcec gets an actual path. However the moment i build it for release the path becomes //10.5/... instead of the path it gets out of xcode. Am I forgetting to include anything?
Code:
- (NSString *)Color: (NSString *)ColDvr
{
tmpsourcec = [[fileManager currentDirectoryPath] stringByAppendingString:@"/10.5/Xerox Phaser 7760GX.gz"];
NSRunAlertPanel(@"Directory Path", (@"The path is %s",tmpsourcec), @"Ok", nil, nil);
dvrchk = [fileManager fileExistsAtPath:sourcecolor];
if (dvrchk == NO)
{
[fileManager copyPath:[[fileManager currentDirectoryPath] stringByAppendingString:@"/10.5/Xerox Phaser 7760GX.gz"] toPath:@"/Library/Printers/PPDs/Contents/Resources/Xerox Phaser 7760GX.gz" handler:nil];
}
dvrchk = [fileManager fileExistsAtPath:sourcecolor];
if (dvrchk == NO)
{
ColDvr = @"no";
return ColDvr;
} else {
ColDvr = @"yes";
return ColDvr;
}
}