Empty Settings Bundle in Xcode 4.2

前端 未结 4 1077
一向
一向 2020-12-09 14:49

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

4条回答
  •  北海茫月
    2020-12-09 15:42

    I'm having exactly the same problem. It seems there's a bug in XCode4. Here's what I did that gets you a Settings bundle at least.

    (1) In XCode, select CMD+N to add a new file.

    (2) From the drop-down, select Resource (as per the 'instructions' that don't work).

    (3) Instead of selecting 'Settings.bundle' - select 'Property List'.

    (4) Name your property list Root.plist and save it in a new directory called 'Settings'.

    (5) Now CMD+N again and select Strings File.

    (6) Call the new strings file 'Root.strings' and save that in the 'Settings' directory as well.

    (7) Now, in your directories and files list on the left, highlight both of the new files and press delete (TRUST ME HERE!).

    (8) On the delete menu, select 'Remove References Only'.

    (9) Now go to Finder and rename the 'Settings' directory to 'Settings.bundle'

    (10) In XCode again, ALT+CMD+A to add a new file to your project and select the 'Settings.bundle' object from the navigator.

    You will now have a working 'Settings.bundle' BUT the two files will be uninitiated, so you'll have to build them yourself from scratch.

    This has worked for me twice now and hopefully, this bug will be fixed in the next maintenance release of XCode4. Hope this helps. V.V.

提交回复
热议问题