Home > Mobile >  Xcode 13 nib file changes not reflected in build
Xcode 13 nib file changes not reflected in build

Time:05-30

I am working on a 10 year old Xcode project in Xcode 13.4. Even though the project is old, it has been updated to modern project settings and APIs. There are no warnings, no errors and the compiled app works fine.

However changes made to the MainMenu.nib file are not reflected in the app after compiling. The user interface shown is an old version.

When I delete or rename the nib file the app no longer works, which proves the nib file I am working with is the real actual nib file the app uses.

When I change image asset files that are used in NSImages in the nib, the new images are correctly shown in the app, but any other changes are not shown.

I have tried (to no avail):

  • Clean build
  • Delete everything in DerivedData
  • Restart Xcode
  • Restart entire Machine (Mac mini M1)
  • Replacing the nib file with a copy of it
  • Replacing the entire project with a copy of it
  • Changing localization, removing all localizations
  • Changing "Strip NIB files" build settings
  • Changing "Main nib file base name" and renaming the nib file
  • Deleting everything related to the nib file from the project and then adding the nib again
  • Disabling the NIB encoder as stated in the Xcode release notes
  • Deleting everything below "/var/folders" that contains DeveloperTools and my project name.
  • Creating a new NIB file and copy/pasting everything using Interface Builder

Any help would be appreciated.

CodePudding user response:

Finally I found the solution: open the nib file in the Finder, right-click, select "Show Package Contents".

Delete all files named keyedobjects-*.nib but leave keyedobjects.nib.

Build and run.

  • Related