Re: SQLITE file not Being Copied to App Package
Re: SQLITE file not Being Copied to App Package
- Subject: Re: SQLITE file not Being Copied to App Package
- From: Alex Zavatone <email@hidden>
- Date: Sat, 24 Aug 2013 08:05:54 -0400
Have you added it to the build target in the Build Phases: Copy Bundle Resources section?
On Aug 24, 2013, at 8:00 AM, Roy Wagner wrote:
> I have added an SQLITE file (mydb.sqlite) to my XCode4.6.3 Supporting Files folder (and tried it elsewhere in the app), but when I run the app, the sqlite file not being copied to the app "package" folder. I have made sure that the sqlite is "Copied" to the app and checked that the file is in the apps external folder. I have tested the code using another file in my Supporting Files folder; e.g. "Icon.png" (pathForResource:@"Icon" ofType:@"png") and that file IS found and copied. I have tried different "ofType" entries, even just @"", and leaving off that parameter to no avail. I have tried running it with both the simulator and on a device (iPad).
>
> Why is the sqlite file not being copied?
>
> if ([fileManager fileExistsAtPath:filePath] == NO) {
> NSString *resourcePath = [[NSBundle mainBundle]
> pathForResource:@"mydb" ofType:@"sqlite"];
>
> NSLog(@"resourcePath: %@", resourcePath);
> }
>
> 2013-08-24 07:46:12.520 WalkGuide4e[29500:c07] resourcePath: (null)
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden