I've inherited a objective c application that I don't know much about.
My task was to change the login from a normal form view type thing, to a web view that gets content from a server. This all went fine and is implemented, but things weren't working right in the localized version.
Since there are no strings used, I deleted the localized files and now it seems my nib files don't get created. It's like there is a compiler error that's not reported. I checked the resource files in the build area, and it doesn't create nib files for anything after the login view I changed.
No errors are being reported during the build. I've tried re-starting Xcode, changing the branch in git to something without these changes. Nothing seems to clear up the issue.
For anyone else that comes across something like this. What finally worked for me was completely re-cloning the project from git. It appears that some of the files in the project were not tracked and just stayed around when I changed branches. I'm not sure if this is config related file, which we commonly don't track. All I know is that re-cloning fixed the issue.
In researching the problem, other common fixes include deleting and recreating offending xib files. Simply restarting Xcode. And, deleting a variety of other project related files and directories.
Hope this helps someone.
Related
I was working on a static website and decided to change my account as I recently changed my Github username. When I say account, I mean the icon in the bottom left corner of VS Code. In doing so, 10k files were added, and all my extensions disappeared.
The staged files include App Data files that I can't clear.
My Discord is affected. I can't open it as when I do, a message comes up and says:
'update.exe' has been moved or changed. Would you like to delete the shortcut?
Although it's an issue, I essentially have to reinstall it, but the same issue may still arise, which it has as I've tried reinstalling it.
My concern is I feel I may affect other programs by trying to come up with a solution.
I'm posting this question to get help on removing the 10k files that are staged and do not affect program files/app data. When I try to commit these files, I get an error saying,
Git Fatal :pathsepc C\Users.....\getconfig did not match any files
I would think all I need to do is add these files to a gitignore file, but I would need steps if so.
I hope I've explained my problem clearly to get a solution.
Please help.
Staged files
I have a few t4 templates in my solution and at some point I renamed the the files and made some changes to them. When I did a build I got the above errors. Interestingly enough when I click on the file names nothing happens and when I hover over them to get the full name I notice that it's referencing the file name that I changed earlier. Also I've gone to all the files it could possibly be referencing and made sure that this error is not occurring in any of them.
I've tried cleaning and rebuilding, ensuring that all the projects are configured to build in the configuration manager. I deleted the file that I renamed and recreated it and the errors were still present even while the file was delete. Also I tried creating a file with the exact same name as the one referenced in the error message and it actually let me create the file, indicating that vs clearly knows that there is not file with that name so it seems to be a problem specifically with the debugger maybe?
I suspect this could be some strange behaviour with t4 templates as I feel like something like this happened before. A full restart of my machine was what solved that last time but it didn't work this time.
Ok so after hours of unsuccessfully scouring the internet I noticed that the 'CustomTool' field in the file properties had a typo in it which was causing the strange error.
I have an Xcode project using Xcode 8. I am using Swift if that helps/matters.
A few days ago after really not changing that much except a few funcs in one VC I tried to rerun my app and it had an error (I can't remember what it said unfortunately...but when I google'd it said basically that there was a file missing)
I located what the files were and just copied all changes into a blank project and deleted the file and pulled from Github a clean version and re adde the few funcs I added.
Everything was great and nice, until yesterday I noticed 2 yellow warnings.
I clicked the "Issue Navigator" and it is saying
TestApp project missing file
TestApp.debug.xcconfig is missing
Pods project missing file
pods - TestAPP.debug.xcconfig is missing
I realize that files just don't randomly disappear, but honestly I did not touch anything other than the Storyboard and the one ViewController File I am working on.
Why does Xcode keep deleting my files?
Is this project savable or do I need to start it over (is it corrupt?)
My project also is using Firebase.
xcconfig files are used to separate out build configuration information. Those errors are showing that you're missing entries corresponding to a debug build.
Nothing should be touching them. Only three possibilities come to mind:
You didn't create debug configs in the first place, but have tried to use them somehow.
Your path configurations are placing these in a directory that's getting wiped out when you clean/rebuild your app.
The project directory is under git control and you're doing something with git that removes the files.
Here's a screenshot showing I have two configs under my Pods project, one for "release" and one for "debug".
You might try setting up your project and making sure you see the debug configs listed. If so, see where they're kept and so on to diagnose what's going on. Otherwise, you just haven't created them.
My guess is that the files are not actually missing in any serious way. It's a bug related to use of git (as you say, the files came thru GitHub, so we know the project is tracked thru a git repository). The files were removed, but this is in fact not a problem. If that's right, then, as I explain at https://stackoverflow.com/a/39715083/341994, you can solve this simply by doing a git add or git commit of these files. That will cause Xcode to become happy and the warnings will go away.
I am working on an iOS app using Core Data, and after doing some stuff in the storyboard, I tried to run the app and realize that all of my Core Data models are missing except my original one. My playground is also missing, but I don't really care about that. I have no idea what happened, and really need to get those data models back. This is what I see when I look for them in the project navigator.
When I try to build the app, it builds fine, but then I immediatly get this error:
016-02-12 11:46:22.779 App Name[51990:1666336] CoreData: Failed to load NSManagedObjectModel with URL
'file:///Users/myname/Library/Developer/CoreSimulator/Devices/EC2BDB71-BE0C-46CB-B208-09C5D0FD2F3B/data/Containers/Bundle/Application/76FAF1C3-8F85-4A1A-81DE-309B984176E1/App%20Name.app/DataModel.momd/'
fatal error: unexpectedly found nil while unwrapping an Optional value
I tried undoing all my changes I made in git since the last commit, but it still can't find them. What could have happened? Is there any way I can get them back?
It's hard to say exactly what happened, but something is causing your files to disappear. It's not in any way related to Core Data or Swift playgrounds-- you've got a serious problem somewhere and it's making you lose data.
These files should be in your git repository. If you can't find them by undoing changes since your last commit, you need to dig deeper. If they were ever committed, they're recoverable, but going back to the last commit may not be enough. They should also exist in whatever system you use to back up your hard drive.
Core Data may be able to help you recover the models by other means. If you have an older compiled copy of the app somewhere, it will contain compiled versions of the data model files. Xcode can import those and re-create the old model files. You'd do this by creating a new model file, then going to the "Edit" menu and selecting "Import...".
But, all this is secondary to your real problem, which is that you're losing files and you don't know why. You could lose more files in the future. Whatever happened could happen again. You need to figure out why you're losing files and fix that problem.
I have an issue that I'm trying to diagnose with the spark view engine. For some reason when I change a partial template the output isn't being altered. Its like its been stashed somewhere. I've tried resetting IIS and deleting the .NET temporary files directory but it still doesn't seem to be noticing the changes.
I've even tried deleting the partial file to see if I can break it, but it still pulls in the same markup. Very frustrating.
I had a look in the cs file that is being built to render the view and the file reference for the partial is the one that I'm changing. So I'm sure that I'm not messing with the wrong file. I've tried re-cloning the project but still no change.
I really have no idea how this can be happening, I've tried having a look through the spark code to see if I can see anything obvious but it all points to any temporary files being stashed in the same place, and I've deleted that so back to square one.
Any help would be appreciated on this as I'm starting to doubt my sanity.
Ok so the the answer was make sure you look at files that aren't shown in the solution. At some point files had been coped but not deleted so there was another version of the partial kicking around.