Hi i'm new to iOS development. There are many situations that we have to config our Info.plist. Most of the tutorial tell me to modify the Info.plist in my navigator panel. Just like this one (Info.plist).
However, modify this file doesn't work for me. Then i found another solution. Project -> Target -> Info, and you can find a "Custom iOS Target Properties". You can also set your property list here, and this work just fine for me.
So i'm wondering what's the difference between these two Info.plist? Since most of the tutorial point to the first one (which doesn't work for me), I think there must be something wrong. What should i do to make it work again? Thank you very much.
The Info. plist file contains critical information about the configuration of an iOS mobile app—such as iOS versions that are supported and device compatibility—which the operating system uses to interact with the app. This file is automatically created when the mobile app is compiled.
What is a plist file? A plist or property list is an XML file containing data in form of key-value pairs. Just line a dictionary in the Swift, so it's a list of values associated with keys. In Xcode, you can open the plist's XML structure by right-clicking on a property list file, then choosing Open As → Source Code.
The file is in the project but elsewhere, and in another format right now. To discover it click on the name of your project in the Navigator, then click your Target and, at last, click on the Info tab and you will get the Custom iOS Target Properties menu… the good old Info. plist!
They're same, the Info.plist is the resource, and the 2nd one just refer to it. If you tried to delete the Info.plist file from your project, you cannot see the "Custom iOS Target Properties" you mentioned anymore, it'll show sth like:
Information from info.plist not available. File may not exist at specific path.
I think you must did sth wrong in Info.plist that lead your setting won't work.
Btw, make sure the target's info.plist refer to the right one that you want. Cause generally, we'll have Dev, Beta, etc schemes for our project, and they own different plist files as well.
So make sure the INFOPLIST_FILE refer to the right one in settings:
Info.plist
is equal to Custom iOS Target Properties
[About]
Build Settings -> Info.plist File
points to a necessary file(path location)Custom iOS Target Properties
after changing Info.plist
. You can restart Xcode as a variantIf 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