开发者

Where can i find info.plist file?

I am reading an iOS dev book and in it saw a reference to a info.plist file used as part of an Obj-C project. Unfortunately, the book did not explicitly say where the file may be found?

Where is this file located? How c开发者_StackOverflow社区an i gain access to it as part of Xcode?


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.


The app I was developing had some custom settings and in my case the Info.plist file was in a different place.

Here is how I look for it. (the safest way)

In xCode:

  • Click on the project (name)
  • Click "Build Settings"
  • Look for Packaging group
  • Inside packaging group you will find your Info.plist file

In JetBrains AppCode:

  • right click on project (name)
  • click on "Project Settings"
  • Select your Project in the above frame
  • Look for "Info.plist File"


Info.plist location

[Info.plist]

Build Settings -> Info.plist File(INFOPLIST_FILE)

When you create a new Bundle(Application, Framework, Tests), Xcode automatically save it into a place which you can find simply in Build Settings. But sometimes it is not so simple to find it, for example using CocoaPods

During refactoring or others situations the Info.plist path can be changed and Xcode do not automatically change Build Settings and you get

Build input file cannot be found: 'some_path/Info.plist' (in target 'SomeTarget' from project 'SomeProject')

You can fix it finding a file and modifying settings

File -> Open Quickly -> Find the correct one -> Reveal in Project Navigator -> update Info.plist File in the Build Settings


If you are using flutter the path is project-name\ios\Runner\Info.plist


for those that like myself are building an Ionic project and have to add privacy permission keys, make sure you add them in the right .plist file. The best way to find it is to use Xcode search. I share a screenshot with a circle around the right Info.plist you need to modify. Modifying the other one in the library folder will still result in errors about privacy. Hope this screenshot helps because I have lost a lot of time on this issue.

Where can i find info.plist file?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜