Skip to content

Instantly share code, notes, and snippets.

View forrestgrant's full-sized avatar

Forrest Grant forrestgrant

View GitHub Profile
@albertodebortoli
albertodebortoli / gist:2204433
Created March 26, 2012 10:55
Copy file from bundle to documents directory in iOS
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.filename = @"file.ext";
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDir = [documentPaths objectAtIndex:0];
self.filePath = [documentDir stringByAppendingPathComponent:self.filename];
[self createAndCheckDatabase];