How to get a shorter path to a file of my Xcode project

I have to share my OS X app, all the paths I have used for files used by project are linked to my username and the structure of my computer.

Is there a way to have paths related to my project so that once my project is shared the user may not get in troubles caused by ‘file not found’.

I would move the used files of the project, into the project but then I don’t know how to let this happen:

actual paths, what I use now:

/Users/???username???/XCode/projectName/fileName.txt

what I would like to use in my code:

function(path: fileName.txt)

how don’t know how to make the paths this short, not caring about the users directories since the files I’m going to use are all inside my project.

I am very confused. Thank you.


Source: ios

Leave a Reply