summaryrefslogtreecommitdiffstats
path: root/Classes/PicCastAppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/PicCastAppDelegate.m')
-rw-r--r--Classes/PicCastAppDelegate.m45
1 files changed, 45 insertions, 0 deletions
diff --git a/Classes/PicCastAppDelegate.m b/Classes/PicCastAppDelegate.m
index ab242ec..f44c6eb 100644
--- a/Classes/PicCastAppDelegate.m
+++ b/Classes/PicCastAppDelegate.m
@@ -32,6 +32,16 @@
@synthesize navigationController;
+//- (void)initialize {
+// [[NSUserDefaults standardUserDefaults]
+// registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys:
+// NULL, @"facebookToken",
+// NULL, @"facebookExpirationDate",
+// NULL, @"twitterToken",
+// [NSNumber numberWithBool:NO], @"haveSearched",
+// nil]];
+//}
+
#pragma mark -
#pragma mark Application lifecycle
@@ -110,6 +120,41 @@
*/
}
+#pragma mark -
+#pragma mark CustomSheeyit
+
+//+ (void) prompt:(NSString *)title withMessage:(NSString *)message andButtonTitle:(NSString *)buttonTitle withDelegate:(id)delegate {
+// UIAlertView *prompt = [UIAlertView alloc];
+// prompt = [prompt initWithTitle:title message:message delegate:delegate cancelButtonTitle:buttonTitle otherButtonTitles:nil];
+// [prompt show];
+// [prompt release];
+//}
+//
+//+ (void) prompt:(NSString *)title withMessage:(NSString *)message andButtonTitle:(NSString *)buttonTitle {
+// [self prompt:title withMessage:message andButtonTitle:buttonTitle withDelegate:self];
+//}
+//
+//- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
+// return [facebook handleOpenURL:url];
+//}
+
++ (NSString *) getDatabasePath {
+ NSString *databaseName = @"PicCastSqlTable.db";
+
+ NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ NSString *documentsDir = [documentPaths objectAtIndex:0];
+ NSString *databasePath = [documentsDir stringByAppendingPathComponent:databaseName];
+
+ NSFileManager *fileManager = [NSFileManager defaultManager];
+
+ if(![fileManager fileExistsAtPath:databasePath]) {
+ NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:databaseName];
+ [fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil];
+ }
+
+ return databasePath;
+}
+
#pragma mark -
#pragma mark UITabBarControllerDelegate methods