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.
Question posted in Xcode
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
5
Answers
It’s a "feature."
You don’t need it anymore. From the Release Notes:
So, instead of inside
Info.plist
, edit properties likeNSCameraUsageDescription
here:The first time you add/edit, Xcode will automatically generate a new
Info.plist
file that’s kind of synced1 withCustom 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, whileApplication requires iPhone environment
will appear in both. I have no idea how Xcode determines this.Want
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
toInfo.plist
.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.Generate Info.plist File
to NoInfo.plist
fromCopy Bundle Resources
(select, then press the - button).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.Here is a link to a raywenderlich tutorial: https://www.raywenderlich.com/19611194-multiplatform-app-tutorial-swiftui-and-xcode-12
The sample projects uses
Xcode 12.0-compatible
(objectVersion = 54) project format, created with theMulti Platform
app template. I borrowed the plists from this project. Until the sample project is revised, it’s nice to have a reference project (structure) for comparison.Xcode 13.3.1, macOS Monterey(12.0.1)
Here is the most simple solution which work for both swiftUI and Storyboard projects, if you are not able to find info.plist and want to add target properties like Privacy – Camera Usage Description and things like we can add in older Xcode version. Here is the solution…
Target > Info
see the image below for reference
This also applies to Xcode 14. To be brief, a few pieces of information about this change:
https://useyourloaf.com/blog/xcode-13-missing-info.plist/
https://youtu.be/mml9ZI81VKA
a change to the "standard" info settings, Xcode actually
automatically creates an info.plist file in your project navigator. You can then add more custom settings in the info.plist file.
It’s a little tricky to discover how to add/edit values (using Xcode 14):
[Update: adding an entry this way will ALSO create a plist file. It will simply be empty.]