Where is Info.plist in Xcode 13? (missing, not inside project navigator)
It's a "feature."
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.
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.
- Create a new "Property List" file (File -> New -> File)
- Name it
Info.plist
- Copy and paste the existing values from
Project -> Targets -> Info -> Custom iOS Target Properties
toInfo.plist
.
Copy | Paste |
---|---|
Xcode can't open Info.plist -- error says there is no such file
That the file exists in your Xcode project folder isn't enough. Have you verified the file is properly referenced in your application target's build settings so it's properly copied into the app bundle? It's not quite the same as a standard resource (ie, it's not made a member of the target in the set of target membership check boxes) but rather a build setting because of its importance in a properly-formatted bundle.
Navigate to the project (select it in the Project navigator), select the application target in the list of targets, then click the Build Settings tab. Under the Packaging section, make sure the "Info.plist File" is properly set to the location/file name.
How to tell Xcode where my info.plist and .pch files are
Found it.
It was in the settings for the Target.
- Choose Target in the Groups and Files pane on the left.
- Right-Click and choose Get Info
- Search for "Info.Plist" and type in the filename for the correct plist file into the property of the item named "Info.Plist File".
- Then search for "Prefix" and find the item named "Prefix Header".
- Change it's property to the name of the correct .pch file that you are using.
I think these different "Info" windows are confusing. You have to make sure the right file is selected in the Groups and Files pane before selecting "Get Info", and it's hard to tell if what you're doing is actually making changes to the Info.plist file, or where your changes are being saved.
Info.plist is absent from left column (but present in FInder)
You should add your Info.plist
manually because you need to set folder reference.
Simply ->
Open your
Info.plist
directory in Finder,Drag and drop your
Info.plist
to XCode's left column (Project Navigator)
I hope it will work for you.
Enjoy!
Opting out of Dark Mode with iOS 15 using Xcode 13
For anyone else who lands here using Xcode 13. Here are the steps
- First, click on your project.
- Click on "Info"
- Click on the "+" on any Key to open a new K,V pair and add "Apperance" -> set value to "Light"
- Double check it exists in "Build Settings" under Info.plist Values under "User Interface Style" -> Light
Where can i find info.plist file?
The Info.plist
file is by default located in the root folder of your application's bundle, it's derived from the {ProjectName}-Info.plist
file in the Xcode project. By default it's listed in a group called Supporting Files
.
Could not find a valid GoogleService-Info.plist in your project
Remove the Google-Info.plist
file from your project and try to add it from your project folder's option menu.
EDIT:
this is how you remove a plist file
Xcode 10 Error: Multiple commands produce
How to regenerate an iPhone Xcode info.plist file
Here's a clean info.plist for you. Don't forget to replace xxx.yyy, and rename xib file (if required)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>Icon.png</string>
<key>CFBundleIdentifier</key>
<string>xxx.yyy.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
</dict>
</plist>
Related Topics
Compile Error in Swift 4 on Parameter Passing
Iboutlet and Ibaction in Swift
How to Use an Nsattributedstring with a Scrollview in Swiftui
Select() from Linq in Swift 3.0
Urlsession.Shared.Datataskpublisher Not Working on iOS 13.3
Cllocationcoordinate2D Can't Be Instantiated
In Swift 3, What Is a Way to Compare Two Closures
Swift: Print Decimal Precision of Division
In Xcode 6.1. 'Uiimage' Does Not Have a Member Named 'Size' Error
How to Stop Timer in Text View
Navigationview Pops Back to Root, Omitting Intermediate View
How to Have Two Alerts on One View in Swiftui
Self' Used Before All Stored Properties Are Initialized
How to Make #Selector Refer to a Closure in Swift
Swift 3 Error:Argument Labels '(_:)' Do Not Match Any Available Overloads
Swift Equivalent to _Attribute((Objc_Requires_Super))
Determining If Swift Dictionary Contains Key and Obtaining Any of Its Values