When you create a new SwiftUI project with Xcode 13 you may notice it doesn’t have an Info.plist file. What’s going on?
I wrote this post based on Xcode 13 beta 3. I’ll update it if I see changes in future beta releases
Xcode 13 Project Templates
First of all, this change only affects projects created with Xcode 13. If you open a project created with Xcode 12 or earlier with Xcode 13 it does not change the
Creating a new storyboard-based iOS project with Xcode 13 gives me a project with an
Info.plist in the project navigator:
Clicking on the file to examine the contents reveals that this is not the usual
It only has some default settings for the Application Scene Manifest, with multiple windows disabled. Where are the other settings?
The change is more noticeable if you create a new SwiftUI project. There is no
Info.plist file in the project navigator (or on disk) at all:
Note also that the SwiftUI template no longer uses a launch screen storyboard (see Dropping launch storyboards).
As far as I know this was not covered in a WWDC21 session and the only documentation seems to be the Xcode 13 beta release notes.
Projects created from several templates no longer require configuration files such as entitlements and Info.plist files. Configure common fields in the target’s Info tab, and build settings in the project editor. These files are added to the project when additional fields are used. (68254857)
The idea seems to be to create the full
Info.plist for the target at build time and only generate an
Info.plist project file for the changes you make from the defaults.
Changing The Info Settings
Some Xcode templates, like the SwiftUI template, don’t create an
Info.plist in the initial project. You can still make changes using the
Info tab of the target settings:
Once you make a change Xcode adds the
Info.plist file to the project and it shows up in the project navigator. For example, if I add some App Transport Security Settings in the Info tab:
Xcode creates an
Info.plist file containing just those App Transport settings:
We can then change the setting in either place and, in theory, Xcode keeps the two sets of settings in sync.
I say in theory because I’ve seen some problems in practise. For example, if I edit the
Info settings from the project navigator Xcode doesn’t update the settings on the
Info tab for the target to reflect the changes I made. I need to close and reopen the project for it to update. Hopefully, that’s a beta bug that will get fixed before final release (FB9397345).
To add to the confusion there are also some
Info.plist settings that only show up in the build settings for the target. These are mostly settings you change using the
General tab for the target such as the supported orientations and launch screen:
You can change these settings in the General tab, the Info tab or in the build settings (but they don’t show up in the
Info.plist file you see in the project navigator).
Packaging section of the build settings allows you to disable Xcode generating the
Info.plist file (more on that in a moment):
The Xcode 13 project format is not backwards compatibile with Xcode 12. If you create a project in Xcode 13 you cannot open it with Xcode 12. Apple mentions this in the release notes:
New projects created with Xcode 13 use a new project version. Using the new projects with an older version of Xcode requires changing the project version in the File inspector along with manual migration of the configuration settings for Info.plist and entitlements you can now specify in the target build settings. (77344653)
To make the project compatible with Xcode 12 change the project format in the Xcode file inspector:
You also need to manually migrate back to a non-Xcode generated
Info.plist or you’ll be missing settings when you build the project with Xcode 12. Copying each setting manually from the Info tab is painful. You may find it easier to start with a default
Info.plist created with Xcode 12 and add any changes to it.
Finally disable Xcode 13 from generating the
Info.plist file in the build settings: