Andrew
Andrew

Reputation: 7873

Put files in bundle into specific folder locations on iOS app

The files inside of my app bundle are arranged into folders, but when I check the file layout of the bundle, it seems these files are all added to the same directory, and not sorted by folder as I have them in XCode. How can I make sure they're added to the device in the same folder structure?

Upvotes: 1

Views: 1333

Answers (1)

SwiftArchitect
SwiftArchitect

Reputation: 48514

The folders created in Xcode using "Group" or "Group from Selection" (yellow folders) are not true Folders, but Groups. They are only a visual way to organize your sources.

To make true folders (blue), create them on disk (using, say, the Finder). You can then import them into Xcode using the option "Create folder references for any added folders".

In short:

  1. Groups (yellow). Not related to the actual file/folder layout
  2. Folders (blue). Direct representation of the OS hierarchy

Upvotes: 7

Related Questions