Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Empty Settings Bundle in Xcode 4.2

I'm trying to create a settings bundle for my iPhone application.

However, if I create one, it becomes empty, no root p-list, no disclosure, nothing.

I've restarted everything and am running out of ideas.

Anyone know of this?

like image 462
Andreas Eriksson Avatar asked Aug 23 '11 14:08

Andreas Eriksson


2 Answers

Click on the Settings.bundle file in the left window -> From main menu choose View -> Utilities -> Show FileInspector. Then change fileType to "applicationBundle" = the two missing files will show again under the Settings.bundle.

like image 51
Yedy Avatar answered Sep 21 '22 00:09

Yedy


For those that can't change the filetype, because it doesn't appear, follow these steps:

  1. Go to your project directory in finder.
  2. Create a folder called "Settings."
  3. Open Text Edit (or any other text editor for that matter)
  4. Type in:

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"   "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!--    Root.plist    Preference settings for MyApp --> <plist version="1.0">     <dict>      </dict> </plist> 

    4a. Change "MyApp" to your app-name

  5. Save as "Root" in the settings folder
  6. Rename the file to "Root.plist"
  7. Rename the "Settings." Folder to "Settings.bundle"
  8. Add the "Settings.bundle" file to Xcode and you should be good to go :)
like image 27
JomanJi Avatar answered Sep 21 '22 00:09

JomanJi