Using group and file references to imitate a real folder in Xcode
I have the following directory structure:
- container
- app
- index.html
- ...
- ios
- mobile.xcodeproj
- Mobile
- www # imaginary folder (or could be a real, empty one)
- android
- ...
app
contains files shared among an Android and iOS application. I'd like to add a imaginary folder to my xcodeproject so that files in app
look like they really are in www
inside the ios
directory (../app
should look like ./www
).
I need to exclude certain files in the app directory, thus I can't simply use a symlink and add that folder, because then I can't selective exclude certain files.
The reason why I'm going through this trouble is that PhoneGap searches for the file index.html inside the www directory, which don't exist in my case so I need to somehow fake its existence.
Anyone know how to 开发者_高级运维solve this? My guess is to setup folder groups and add file-references, but I can't get it to work properly. Also, let me know if I should elaborate on something.
Note that when you create a group, you can then specify where the root folder of that group is with Xcode. In Xcode 4.x, click on the group icon on the left pane. Open the rightmost pane and click on the top icon that looks like a document. You'll see "Identity" underneath is "Group Name", "Path", then another entry with no label that has a window-like icon to the right. Click on that icon to set which folder the group aligns with.
精彩评论