William Jockusch
William Jockusch

Reputation: 27335

debug version of iphone app running under simulator -- programmatically locate own project file?

I am working on an app whose debug version will be used on the simulator by different people, including some who will edit metadata that control the appearance of the app. I want to have a mechanism for editing and reloading said metadata without rebuilding the app. To do that, the app will need to find the plist file in question. Not the version of the plist that is inside the iphone simulator. Rather, it needs to find the version that is used to build the app. Rather than asking users to point out where the file in question is located, can the app determine that information programmatically?

Finding the project file would be good enough, because the plist will always be in the same location relative to the project file.

Upvotes: 1

Views: 277

Answers (1)

Vertex
Vertex

Reputation: 271

In Xcode you can add your own field to info plist and use ${SRCROOT} as value Xcode will automatically change it to path of your current sources path on build. Then you can obtain it from your application.

Upvotes: 1

Related Questions