Fix duplicate working copies in Xcode with SVN - ios

I have an Xcode project I am working on with several other people. Everything has been going fine until recently source control (SVN) has shown up with two working copies on my computer. One of them is the actually project (what I want) but the other one has become the Asset Catalog somehow. How do I fix this?

Check in all your changes, and try to clean up working copy if still it doesn't work delete the working copy and check fresh repo code.

Related

After changing file locations, project can't recognize some of my classes

First off, I know this is a config issue because my code was building and running just fine before I synced my project to GitHub. Xcode's internal source control seems to be having trouble recognizing some of my files and I'm getting Use of unresolved identifier... errors where these files' initializers are in use, and were working before. I'm running the latest versions of Xcode and OS X, and these are the steps I was taking before and after the issue started...
BEFORE:
After several rounds of implementation and committing with the default local repository, I built and ran the app multiple times with no issues.
I created a new repository on GitHub, committed (w/push to remotes) and everything made it to GitHub just fine and was building and running in the simulator.
In order to organize the repository (to match the 'groups' I had created in Xcode) I did some brief research and then added nested directories to my project folder. I re-opened Xcode and repaired the file paths. Some took, but several kept showing ? (although I could still access the code just fine) and I got the corresponding Missing Files... warnings.
Because I couldn't get the new hierarchy to work (the files w/?s, not being recognized, were not able to be committed to GitHub), I tried to move the files back. This worked for most, but for a few (which seem to be the effected files) I had to rename them, recreate a new file and then paste their contents over (this is where I think the problem lies). I was able to commit everything to GitHub (even the problem files went up) but all the warnings remained.
To clear out the warnings I attempted to run my tests, and that's when the Use of unresolved identifier... errors popped up, and of course the build failed.
AFTER:
I verified all the paths and target memberships were correct.
When that didn't work, I built an entirely new project (although I did add it to the same workspace; not sure if that matters) and copy/pasted all my code over to new files. I didn't drag / reference the files and I didn't link the new project to GitHub. When I went to build, same errors in the same places...
I exited the workspace and opened the new project separately. Still no joy.
Any help or points in the right direction would be much appreciated.
EDIT:
After some help, I tried deleting the reference and dragging the file in manually but that didn't resolve the issue.
I also checked Build Phases -> Compile Sources and everything was listed fine with no compiler flags. I removed and re-added from Compile Sources, issue persists.
You can try removing referencer for the missing class file in Xcode,then add same file to folder (right click add file ) from physical workspace location this might help.
After rebuilding an entirely new app a third time, with all new files, I copied the files over and this time everything seems to be working fine. Had to repair a bunch of provisioning issues to make sure it worked (maybe that was part of the problem, but I doubt it), but everything is back to normal with the app. The only thing I did differently this time was not adding the new project to the same workspace.

Get lost Xcode binary from archive in organizer?

Alright, so I had been having issues with this and never resolved them, finished my app and published it before this caused major problems -
I have pods installed for my Xcode project so I had been working off a workspace. I had always backed up in the past by copy pasting my project folder then renaming, however more recently something happened that cause every change to my workspace to affect all previous versions.
I tried everything - saving to external hard drive, github, etc but I just ended up going on working on the workspace and making sure I didn't screw anything up. Along with this issue whenever I clicked on the Xcode project that is in the project folder, none of my new code would be there.
That Xcode project version was from several months back and the only way to see my new code was to click on the workspace. I asked a question about this but no one had an answer.
A week ago I finished the app, archived and uploaded to App store. It is now published, however I want to update so today I went to my workspace and the project file above the pods file was RED meaning not there.
I have no idea why this would have happened. Dragging the Xcode project i the folder to the workspace again, just runs the very old version.
I need to get my binary back and solve this problem. Im desperate. I have this:
One of the export options is save for development and such.. Is there a way to get my binary back from this archive? How can I fix this problem?

XCode Copy Files build phase skips files sometimes

I followed this excellent tutorial to set up to build a framework I'm building for an iOS app.
http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/
I have everything working pretty well except for one little detail. Sometimes, it can take several attempts at building the project before all the header files are copied into the final framework.
Occasionally I'll hit "Build" and the Headers folder for the framework is completely empty at the end. Sometimes it will have 90% of the headers, but not all. Once in a while I get lucky and they all seem to be there.
What would cause this and how do I correct it?
Update:
So far my only solution is to just keep rebuilding the framework and eventually it copies all the headers the way I expect it to. Still looking for a better answer though.
One of the workaround I use to get around this problem is dirty (i.e. double-click open file, press spacebar & delete key on keyboard and save/Cmd+s) all the 'add copy files' before I build (Cmd+B).
Another workaround - Build the project twice and on second build, the files get copied.
Anyone have real cause/solution of this issue?

Xcode Archives a Previous Version

This question seems related to XCode Build and Archive for Enterprise Distribution builds old archive but the answers have not worked for me;
We have an iOS application that is distributed using the Enterprise Distribution method. This has been updated regularly for the past year by issuing a new IPA and having users delete and reinstall the app. Lately when I archive and distribute the app it installs correctly, but it is a previous version from a few days ago with none of the recent changes. These are things as simple as text labels and alerts with the wrong text.
I've done everything I can think of, including:
Confirming it builds and runs correctly in the simulator and when building directly to an iPhone. Everything works great in these cases.
Cleaning the project.
In the Organizer, deleting all archives and removing the project.
Manually deleting the DerivedData folder.
Renaming the IPA and updating the distribution plist to ensure that the file isn't somehow being cached on the web server.
Deleting the entire project and doing a fresh checkout from SVN.
Even when I do all of these things together, so that I've completely removed the project from my computer and Xcode and re-archived it with a fresh checkout of the source files, it still archives an outdated version. Where could this be coming from? Should I just reinstall Xcode completely?
Since you have deleted and checked that your build files are clean from old rubbish, I would have a look at the actual source files and the project and make sure you are actually making your changes on the right place.
Right click on the files that you are working on in your project and select "Show in Finder" and see where they are actually located. Maybe they are in a different location than you would expect?
Do the same with the files under "Compile Sources" in your target, and make sure they are the same files and at the same location as the ones you have been editing.
It could be that if you at some point has fiddled around with your files and projects that you actually imported the wrong files and that you are editing different files than the ones included in your build. It happened to me once, I had to re-import lots of files to my project to get it working again.
The network was caching it! The wireless network in my office is serving up a cached version of the IPA from yesterday, while an external network downloads the latest copy just fine. It's embarrassing that I never thought to check this, but I suppose the solution is often obvious in hindsight.
Thanks to Jake and Mike for the suggestions; I'm sure they will be helpful to others who come across this question.

Why is Xcode 4 not running my latest build?

I was originally working from my desktop on a project. I then decide to continue working on the same project over at a friend's house. I come home and decide to use the newest project (on a different folder even) open the project I run it and it shows the same thing I had before... for some reason it appears nothing got updated.
Any ideas why this is occurring?
You might try cleaning the project (Command-Shift-K) to see if that helps. I usually have to do this when I don't change code and only change a resource such as a xib or image file.

Resources