summaryrefslogtreecommitdiffstats
path: root/Classes/PicCastAppDelegate.m
diff options
context:
space:
mode:
authormatt handler <matt.handler@gmail.com>2011-04-24 21:00:46 -0400
committermatt handler <matt.handler@gmail.com>2011-04-24 21:00:46 -0400
commit663d25e5160e97eefed1444bac0b4ac964f3368e (patch)
tree530aa0ecb4c34704de7c5f51873056b4e0748d35 /Classes/PicCastAppDelegate.m
parenta14cc19fb021a74be4c2d756eab040c95b3a487e (diff)
downloadpiccast-app-663d25e5160e97eefed1444bac0b4ac964f3368e.tar.gz
piccast-app-663d25e5160e97eefed1444bac0b4ac964f3368e.zip
still a bit off from a solid state... added fmdatabase, updated acidcow parser with a formate, added some standard stuff to piccast app delegate, created a section dictionary, did some serializing to/from db for topics, added a bunch of logic to topic view controller, added db table
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