Before you say that this is a minor problem and was discussed a million times here and on other forums, I want to say that I went through all of them and tried to implement each of their solutions but with no luck. I either missed some very small detail or there is something wrong with my project in general. Hope you might help.
The problem: After I've changed the location of "Info.plist" my project shows black screen.
Or I get the following errors:
What I've already tried:
- In "Target membership" checked or unchecked the box with the project name
- In "Targets" - "Build settings" - "Info.plist File" changed location to "Personal Quiz/Supporting files/Info.plist" plus tried all the other possible paths.
- In "Targets" - "Build Phases" - "Copy Bundle Resources" - deleted and add "Info.plist
- In File "Info" - "File Inspector" - "Location" changed to "Absolute path", "Relative to group", "Relative to project" and mirrored chosen path path to "Build settings"
- In simulation - "Device" - "Erase all content and settings"
- "Command Shift K" to clean the project
- Tried to read apple developers book
- Tried to implement some code
- Tried some other actions that I can't even recall
As a result I either have a black screen or errors above. What am I doing wrong?
CodePudding user response:
It might be the occurrence of multiple info.plist files. So the solution is:
Go to your Bundle settings
-> Open Target
-> Open Build Phases
> Expand Copy Bundle Resources
and remove info.plist
from there.
Now try to run your project. I hope it fixes your problem.
Note: Also check the path of your info.plist file
Copy the path by selecting info.plist file
-> Goto File Inspector
-> Location:
select Relative to project
-> And copy that path
Now go to your Bundle settings
-> Open Build Settings
-> In Packaging
edit Info.plist File
-> And paste the path which you copied earlier.
CodePudding user response:
Have you tried deleting the Derived Data
already created and then Clean build (CMD Shift K)
?
To delete the derived data
, Goto Xcode Preference(CMD ,) > Locations > DerivedData path