Has anyone figured out how to add/edit values in the Info.plist
of Xcode 13 yet? I see they moved the Info.plist
from the navigator pane... but although I can find it, I'm not sure how to edit it.
plist is gone. It's not a bug. According to the Xcode 13 release notes: “Projects created from several templates no longer require configuration files such as entitlements and Info.
Right click on the folder you want to add it to and choose "New file…" This will bring up a blank file with columns for Key, Type and Value. Choose any of the presented options, you'll be overwriting it anyway. Now change the Key to "Apple".
Xcode supplies an information property list file when you create a project from a template, as described in Create a project. By default, Xcode names this file Info. plist and adds it to your project as a source file that you can edit. Xcode creates one information property list for each target in the project folder.
You don't need it anymore. From the 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)
So, instead of inside Info.plist
, edit properties like NSCameraUsageDescription
here:
Project -> Targets -> Info -> Custom iOS Target Properties
The first time you add/edit, Xcode will automatically generate a new Info.plist
file that’s kind of synced1 with Custom iOS Target Properties
. Xcode will later merge them for you.
[1]: They’re not fully synced. Some properties like NSCameraUsageDescription
will only appear in Custom iOS Target Properties, while Application requires iPhone environment
will appear in both. I have no idea how Xcode determines this.
Info.plist
back, completely?You might want all of your app's properties in one place. Or maybe you don't trust Xcode with the merging. I spoke with an Apple engineer at WWDC21 about this... here's how to get the classic Info.plist
back.
Info.plist
Project -> Targets -> Info -> Custom iOS Target Properties
to Info.plist
.Copy | Paste |
---|---|
Note: Currently you can only select and copy 1 row at a time. If you want to save some time, here are the default contents in XML format. To use this, right-click Info.plist
-> Open As -> Source Code, then paste.
Info.plist
in the attributes inspector.Project -> Targets -> Build Settings -> Info.plist File
Generate Info.plist File
to No
Info.plist
from Copy Bundle Resources
(select, then press the - button).Project -> Targets -> Build Phases -> Copy Bundle Resources
Yep, that was a lot. But whether you want classic Info.plist
or not is up to you — both are fine and won't change your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With