Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8704251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:03:21+00:00 2026-06-13T03:03:21+00:00

I want to open a database.sqlite3. Firstly, I need to get a path. But

  • 0

I want to open a database.sqlite3. Firstly, I need to get a path. But I don’t know how to get this path.

I need a relative path.

enter image description here

EDIT: I don’t want to use NSBundle. It get a very long path.

I want to use /Users/Voloda2/Projects/facebook/database.sqlite3 Is it possible to get a relative path?

EDIT2: I often change my database. I use Navicat for this operation. If I use NSBundle I have one problem. git did’t indexed my database because it didn’t lies in project folder. Thus I need to lay my database to project folder.

straight path is /Users/Voloda2/Projects/facebook/database.sqlite3

relative path something like this ../database.sqlite3

Relative path is a path relative to project folder.
Is it possible to get a relative path? May be it didn’t possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:03:22+00:00Added an answer on June 13, 2026 at 3:03 am

    Assuming you’re making a regular OS X/Cocoa app, Xcode will copy the database file to the app bundle. So, you can use the NSBundle class to obtain its path easily:

    NSString *databasePath = [[NSBundle mainBundle] pathForResource:@"database" ofType:@"sqlite3"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a sqlite database that I want to open using sqlite3.exe. Now I
I have a database in one activity that I want to open in another
I want open a path to vim from Screen's copy-mode by Ctrl-A f similarly
In this database there is a table called Menu. I want to print this
Now I find ploblem again. I want get data in db to listview. but
Hello I have a Sqlite3 database created in my computer and I want to
i want to save some text into my database with foloowing code. But i
I want to provide access an sqlite database in Objective C. I don't want
I still need your help. I have this piece of code that doesn't want
all i want to create the header file for database like this. it contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.