I am trying to submit my app to the app store. I have looked at a half a dozen questions similar to this one yet none have helped.
Here is the error:
Things I know. The file exist and had the correct path in the Build Settings.
It also exist in Finder.
Here is what is inside of the info.plist
Any idea what I am doing wrong? I cleaned and build cleaned the project. Even restarted my computer.
EDIT
Here is what the build log looks like when I search for .plist
The file is found in the project file
EDIT 2
Here is what the build file looks like.
EDIT 3
here is a photo from inside the app
Have you tried making sure the project has added the info.plist file on the backend? Sometimes, when you create a project, some of the files decide not to be added to the project on their own.
In this image example, I haven't opened by main.storyboard file yet, so it's red (indicating it "doesn't exist"). To fix this, you press the + button and add the file from your project:
This may not show up the info.plist file, however. As you can see in the second picture, it allows me to add in the info.plist file, but my main.storyboard file is currently unavailable.
If this is so, you'll have to select the 'Add Other' button. It'll bring up a finder window and you can select the file directly.
If this doesn't work, comment the results, please.
EDIT: IT WON'T ALLOW ME TO ADD THE IMAGES BECAUSE OF MY LOW REPUTATION ON THIS ACCOUNT
Related
After cloning my Github repo, everything runs fine except the build fails because of this error "Reading data: The file "Info.plist" couldn't be opened because there is no such file."
I have tried every possible solution I could find, including deleting the file and creating a new one, deleting it from the Copy Bundle Resources, adding it to the Build Settings, etc. I have followed these posts among others on all of the solutions but nothing has worked. Error: The file “Info.plist” couldn’t be opened because there is no such file, Info.plist Utility Error: "Info.plist couldn't be opened because there is no such file"
I would really appreciate someone's help in finding a solution to this problem, and if you need any more information, please let me know.
Edit: Also for some reason when I looked in the project it's not the newest version that I had committed to Github. I was wondering how I can clone an exact commit? I was trying to look at this post but I'm not exactly sure where to find the remote address?
It's going to be pretty difficult to debug this without having a look at your project, if all fails you might consider making a copy, remove all source files and share that shallow copy on a public repo.
Otherwise, on top of what #Asperi had already said, be sure to:
Clean build folder before each try you make to fix this (Command+Option+Shift+K), just in case
Open the build logs (see below) and using the search (Command+F) look of an entry that starts with ProcessInfoPlistFile. Check if there's something wired with the path there, check if the file pointed by that path is missing, if it has the right project name etc
If you're building multiple targets, be sure to check if each has a valid .plist, not just the main one.
Open yourprojectname.xcodeproj/project.pbxproj in a plain text editor (e.g. write open yourprojectname.xcodeproj/project.pbxproj in terminal) and search for Info.plist, be sure that each entry has a valid path (the path specified there actually exists)
Update: Although it is not important how the info plist file is named physically in your project, because Xcode renames it always into Info.plist during product bundle creation phase, but to avoid confusing among community, let's assume that your info plist is named Info.plist.
Check the followings:
1) Is Info.plist present in file system after clone?
2) Is correct related path is set for Info.plist in project Build Settings (INFOPLIST_FILE tag)?
3) Is Info.plist file not damaged - opened by Xcode as a document (Info tab in project settings should show it as well)?
Note: Info.plist should not be added in target's Resources, it is copied by Xcode from mentioned above INFOPLIST_FILE (and renamed if needed into Info.plist!)
The following applies to the question, comments and answers here:
Info.plist should be capitalized — if not it could easily explain your problem.
NOTE: Several comments and answers are using lowercase info.plist,
this just adds fuel to the fire. It's best to be specific (especially when
it comes to this), because that minor detail can make a huge
difference.
The answer awarded the bounty is absolutely false information. The following excerpt comes directly from the documentation previously linked:
Important: In the sections that follow, pay attention to the capitalization of files and directories that reside inside a bundle. The NSBundle class and Core Foundation bundle functions consider case when searching for resources inside a bundle directory. Case mismatches could prevent you from finding your resources at runtime.
Source: https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html#//apple_ref/doc/uid/TP40009254-SW1
When I created my project, I called it "Project1". Then, later I've changed it to "Project2" from the Xcode. I changed all "Project1" to "Project2", but now, when I compile my project, it looks for files in Project2/Project1/myFile.swift and I get the next error:
<unknown>:0: error: no such file or directory: '/Users/myusername/Copy/Projects/Project2/Project1/myFile.swift'
I need to make that it will look at
/Users/myusername/Copy/Projects/Project2/myFile.swift
without Project1 in the path.
How can I solve this problem? Also, I changed from Xcode Identity and Type section Location of my project.
Today I had the same problem when I renamed the folder containing the Xcode project and some parent folders of it.
In my case there where a .swift file shown with it's name in red in the list of files of Xcode (Navigator area). I think that this means that Xcode was not capable to find that file.
I selected that file (actually it's not a real file but a representation of it).
Then, in the File Inspector (Utility area), I clicked on the Folder icon and chose the file on Finder.
This worked for me.
Renaming projects in xcode in one of the most annoying things in iOS development. I assume you want to rename your app. I faced this problem once and figured out a simple, clean way to do it.
Go back to the point where everything worked.
Open project in xcode and click on the project icon in the project structure( first file)
Go to the info tab
Search for Bundle Name. Most probably it will automatically be set to $(PRODUCT_NAME) which is a shell variable that will set your app name the same as the project name.
Set it to whatever you want your app name to be
Done
Note : If you use custom URL Schemes this might produce an error when redirecting.
ALWAYS use git or some other SVN in your projects. This will come in handy in this kind of situations
Change you folder name in you finder "Project1" to "Project2"
Remove "myFile.swift" file from project (copy on Desktop)
Restart Xcode. Copy "myFile.swift" in project select "Copy file to folder" hope this will help.
Basically I can't add Localizations from the project > info > Localizations section.
When i try to do so, i can see the languages and select the one I want. But when the "Choose files and reference language..." screen appears it is completely empty. When i press finish nothing happens as well.
My goal is to localize the app name, so i have to add the InfoPlist.strings files to the languages I need.
If i try just selecting the file and pressing the localize button i get a prompt asking me to select the language, if i try any of the languages shown there i get this message error:
“Info.plist” couldn’t be moved to “ja.lproj” because either the former
doesn't exist, or the folder containing the latter doesn't exist.
I even tried manually adding the .lproj folders and adding the files there but the app name doesn't change. I suspect that it is because the project is configured to look for those in a different place.
This project was originally created with cocos2dx so it came with many things preconfigured, that was a long time ago with an old version of cocos2dx, so i suppose the folder structure has something to do. Still i don't know where to fix to at least be able to add more localizations.
The solution I found was to first create the "InfoPlist.strings" manually as a file inside the project directory. Then add the file from xcode. Then clicked on localization and select at least 1 language. Then i could add/remove localizations from my project settings.
I'm sure there is something messed up in the project file but I have not been able to find it (it's a legacy project new to me).
If I remove the reference to info.plist in the project, then it will successfully import and export, which is a workaround, but not ideal (obviously, although it's easy to revert).
I have searched for duplicate info.plist files and there are none that I can see (there actually are for the watchkit extension and app, but those are named differently anyway).
The actual name of my info.plist is like myapp-info.plist, but it is correctly named in the build settings--the project builds fine.
I have googled the heck out of this and can't find any other reports so I'm really stuck. Next step is to burn an Apple tech support request and when I do, I'll report back, but I thought I would ask the SO community first.
Thank you!
I had this same error. To fix it, I had to localize the *-info.plist file. Select the info.plist file and click "Localize..." in the File Inspector pane.
I don't know if you have solved this problem but I had the same issue. I think it happens when you change the project name and the build settings do not do its job to reflect the change. The Test info.plist refers to the same target original plist and seems to cause this problem.
Go to build settings in your project>Target>Project-name-Tests>Build Settings. Then locate Packaging>Info.plist File and change the folder to project-nameTest/Info.plist.
I hope this does the trick.
My experience was different here. I have multiple targets that all use the same code base. At some point (ostensibly due to a bad manual merge) the Info.plist setting in the Build Settings tab got set to the same value for multiple targets.
Once I straightened all of those out, I was able to export the Xliff file without any issues.
I was receiving this error message in Xcode 7.3.1 and what I did was create a new empty project in Xcode and model my info.plist files after that. This involved:
renaming my [app name]-Info.plist file to Info.plist and moving it out of Supporting Files to the main folder
going to project target (General tab) and selecting the renamed file. There should be a button for 'Choose Info.plist File'
doing similarly in the Tests folder. I don't think this step is necessary to fix the error but did it for consistency.
I was looking at this question on SO - Duplicate localized resource "/Localizable.strings" found xcode 6.1 - and I was able to export to .xliff successfully when I removed reference to the ProjectName-Info.plist file.
I re-added the file, and the project compiled successfully. You have to remove the reference again every time you want to export/import and re-add the file again.
I wasn't able to import updated .xliff files successfully, but I'm thinking on using just Localizable.strings file moving forward. I'm just happy that Project -> Editor -> Export for localization finally worked!
I am trying to add a new class to my project on xcode.
The problem is that xcode doesn't auto complete anything when typing in that class, auto build anything or anything else for that matter.
When ignoring the auto complete, and typing myself, I later try to link my xib file to my class by "pulling the strings" and when I hit enter I get the notorious error message in red saying "could not insert outlet - could not find any information on class..."
I have tried deleting the Derived Data folder, restart xcode, deleting the files of the class I was trying to add, etc. Nothing worked.
What do I do?
I think I have an issue with linking - if I try to add the interface for the xib file, which I created to have a custom table row view, in an existing file already in the project, it all works wonders.
Any one see that problem before?
Thanks!
Choose the m file in your left panel, then choose the target in the right panel.If you already add the file to the target, then in your project build settings, set the search path to your folders. May be the folder that files locate is not the real file filer, it is just a group.