Does anyone know where bbtouch stores its preferences? It doesn’t seem to be in a user specific location as it carries through different user accounts. Whatever settings I used before have left it in an unusable state, I’d like to get a fresh start. A spotlight search for bbtouch doesn’t turn up anything outside of the opentouch project folder.
I’m betting the answer is in here but I can’t figure it out:
#import "BBApplicationSupport.h"
@implementation BBApplicationSupport
// access to the app support folder
// if it doesnt exist it makes it
+(NSString*)applicationSupportFolder
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory();
// got the app support directory, now check to make sure there is a folder for us
NSString * dir = [basePath stringByAppendingPathComponent:@"BBTouch"];
if (![[NSFileManager defaultManager] fileExistsAtPath:dir isDirectory:NULL]) {
[[NSFileManager defaultManager] createDirectoryAtPath:dir attributes:nil];
}
return dir;
}
// this only returns a valid string if the path exisits, otherwise you get a nil
+(NSString*)pathForApplicationSupportFileWithName:(NSString*)name
{
NSString * directory = [BBApplicationSupport applicationSupportFolder];
NSString * filePath = [directory stringByAppendingPathComponent:name];
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) {
return filePath;
}
return nil;
}
@end
