resourcePath not working Xcode
问题 I have created a sqlite database containing data for my app, and dragged it into the supporting files group in Xcode. When I try to access it using: NSString *bundlePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"database.db"]; It does not read the file. However if I put in the full file path: NSString *bundlePath = @"Users/xxxx/Apps/App/database.db"; The app works fine. I printed out the file path from: NSString *bundlePath = [[[NSBundle mainBundle] resourcePath