I\'m running into what seems to be common error, in that Xcode can\'t seem to find my \'Info.plist\' file.
I\'ve checked the answers to these two StackOverflow ques
As answered by @narner (answer marked as correct), yes it can make code work. But here is something better to solve the problem.
My suggestion is that instead of delete tests targets, better if we change the path of info.plist under tests target.
Simple steps:-
In project, click on the project file -> ProjectNameTests(under targets) ->Build settings->Packaging->Info.plist Here you change the path of file.
Real Project Example with screenshots showing another way to solve this issue.
Using Swift 4 and Xcode 9.
1-look at the Xcode build error problem as shown in the picture in the 'Step 1 Visual Description' and it will tell you which Sub Folder in your Xcode Project the file belongs in. In my case it is the NVActivityIndicatorViewExample/Info.plist. Step 1 Visual Description
2-But you can also see where the Info.plist file is supposed to be by going to the 'Build Settings' section in your Xcode projects 'Target' area as shown in the picture in the 'Step 2 Visual Description'. When you're there look in the 'Packaging section' and click on the 'Info.plist file' row to have a pop up view show you which folder the file is supposed to be in. Step 2 Visual Description
3-Find your Info.plist file, open it up as a source code file by right clicking on it. Look at the Step 3 Visual Description for help.
4-Copy the code and delete the Info.plist file. Look at the Step 4 Visual Description for help.
5-The find the folder inside your project where the Info.plist file is supposed to go according to your build setting then right click on that folder and click on 'New File'. Look at the Step 5 Visual Description for help.
6-Make sure you're in the section for the kind of App (iOS in this case) you're building, go to resources and select 'Property List'. Look at the Step 6 Visual Description for help.
7-Type in "Info" as the file name with no extension, make sure the Group and Target are selected for your application and click "Create". Look at the Step 7 Visual Description for help.
8-Open the newly created Info.plist file as "Source Code", paste the previous XML code you copied from the deleted Info.plist file, save, and the run your app. (You can also build and clean the project if you want.)
The answers above did not apply to my case.
This is what I have discovered.
Some weeks ago I dowloaded to my Downloads folder a github objective c library for my project. I then added that librabry with "Add Files to..." and the library worked just fine.
I regularly delete old files and folders from my Downloads. It happens that I deleted the folder that contained the objective-c library! Therefore, Xcode was complaining that it could not find a "Info.plist" that was in that folder. I went to the Trash bin, restored the folder and now it's all good!
Next time I add files to my folder I will make sure the files get copied into the project.
This Apple doc was of great help: https://developer.apple.com/library/ios/qa/qa1649/_index.html
Good luck
This is what works for me:
This Worked for me:
Hope this helps someone :)
Search "info.plist" using ctrl+sht+f in your project.
Tap on the results and you will find it as a field under Build Settings.
Ensure that it contains the correct path to your info.plist file as in the project hierarchy.