Cound not check out svn with xcode 5 and Xcode Crashes if enable svn - iphone

I am not able to setup SVN in X-Code 5. Iv tried these steps:
1) Goto-Xcode-Preferences-Accounts-Add Repositories (clicking "+" sign).
2) Enter the url path of the project https://ipaddress:8578/svn/comapny_name/projectname/iphone/
3)Enter the credentials. At this point of time i get this error message
Xcode has modified the URL.
Xcode repository accounts represent the root of the repository.
Subpaths can be checked out from the checkout window.
the Repository was added successfully with the base path https://ipaddress:8578/svn/comapny_name/
When i checkout the project it shows authentication warning as i dont have the permission to access the base path https://ipaddress:8578/svn/comapny_name/
but i have permissions to access the project folder https://ipaddress:8578/svn/comapny_name/projectname/iphone/
My question
1) how can i checkout the project from the project folder
I tried to checkout from terminal by providing the full path of the folder and i got it successfully but the problem is when i open the project xcode crashes with out any warning
( i think its due to difference in the svn paths) i checked by disabling the svn then no crash
2) how can solve this

I have the same issue
I haven't fixed it directly
But there is an alternative to update your local working copy
Open the terminal
Navigate to your SVN directory
And type the command svn update
In my case, the output:
Updating '.':
...
...
Updated to revision 208064
And XCode 5 updates with the new file directly

Related

Target location for project " " already exists, can not move project

when I am trying to share my project with git repository getting exception like this
"Target location for project " " already exists, can not move project"
Writing an answer because I tried many options suggested in many similar questions but none worked. Then I did it manually with following steps that worked, and these steps will work for any Eclipse version:
Goto the Eclipse workspace in the file system and copy the project from there and paste it in some other location in your file system. This will serve as a backup.
Goto your Eclipse and then right click on the project and click delete. You can say delete from the file system because you've already taken a backup in step1.
Goto your Git repo in the file system and paste the project folder at the location you want (may be inside another folder with .project file doesn't matter).
Then come back to your Eclipse and then File->Import -> Import from Git -> Local repo -> Select the Git local repo where you've pasted the project in step 3 and then import it as usual.
As I said earlier, this will work for any Eclipse version.
This situation will happen if you already have a Project of the same name in your local git repository. Sharing a project means steps to commit your project into your local git repository and from there it as ORIGIN will be pushed to Master (Remote). (You are creating again with a new eclipse IDE, or that project was deleted from IDE but committed to local repository in the past).
Solution is simple:
Remove the project from your local git repository.
C:\Users\username\git on windows operating system. (If this not possible then next step)
Rename the project in your IDE (Better recreate a project with same code but with new Project name) that you want to share: repeat the process of sharing on Eclipse IDE.
You may optionally want to recreate after dropping the remote repository(master), if something is already pushed from last push of project, so that everything is clean. You may visit the git repository to confirm it.
In my case this was caused by an extraneous .project and related Eclipse files at the top of the git repository folder. The files were created by Eclipse due to incorrect folder specified on Import of the other projects in the repo.

SCM (SVN) Issue With Added Folders

I'm new with Xcode SCM tool. I would like to ask one question to you guys in detail.
We (Guy-A and Guy-B) working on the same SVN repository project through Xcode SCM tool.
We checked out the code and Guy-A added a folder to the project as SampleFileAdded to his local mapped version (please refer Figure1) and he added & committed to the SVN repository fine.
After that Guy-B updated / got latest version from SVN .
Here is the issue.Guy-B's project local mapped folder now contains the latest folder that Guy-A is added. However it didn't link with his Xcode folder structure.Guy-B need to drag the folder to his Xcode to link it with project.
May I know how can I avoid this step. Any help on this is appreciated.
Figure1:
Guy-A Local Machine
Guy-B Local Machine After Updated
On adding the folder to the project the project file will have been modified. It looks like somehow this was not committed, hence the problem.
Did you use File > Source Control > Commit… or select the (apparently) modified set of files and commit those? The former method will catch everything - sometimes Xcode fails to mark files as modified in the project window, and sometimes you'll even notice the count of files in the commit dialog is greater than the number listed in the dialog...
File > Source Control > Commit… should catch everything, even if it is not immediately apparent that it has. (Use an svn client, such as svnX, or svn in a terminal window to determine exactly what was/needs to be committed.)
Have Guy-A committed the project file too ? that is .xcodeproj . Please try to commit project file too then you need not to drag the folder after update.

Workflow for getting Github repository updates

There are a lot of great open-source projects on github. Most of them come with great sample apps.
Now I go through the following steps to get a repository:
Visit a github repository, e.g. https://github.com/omz/AppSales-Mobile
Click Clone in Mac to clone the project
Open GitHub app in Macbook
Right-click AppSales and select Show in Finder
Open the xcodeproj in Xcode
Modify Bundle identifier in ...-Info.plist file
Modify Code Signing Identity in the target
Compile and run
Whenever there is any update in the repository, I open the Github app and discard changes made in step 6 to 7 above, and sync. Then go though step 6 to 8.
By using the Github app, how can I keep the changes made in step 6 to 7 and also get new updates also?
Use a git client and most of the repetitive tasks you are doing now will just ... go away. Tower is a good choice, but you can always use the command line as well:
git clone https://github.com/omz/AppSales-Mobile.git
cd AppSales-Mobile/
open -a XCode AppSales.xcodeproj/
Run the project, change files, do whatever. Then when ready to get updates from upstream server just do:
git pull (or git fetch, then git merge).
Alternatively you could add the files you are changing to your .gitignore file, so that they aren't tracked by Git.

Why am I unable to retrieve commited new folder from svn with Xcode 4?

I just started to use SVN with Xcode and stumbled upon several problems. I have started to work with SVN repository that was deployed on a remote server. The project had a standard directory structure (trunk, branches, tags). I have checked out the project with Xcode, did some work, performed commit (from Xcode). The teammate checked out that version. Then using Xcode, I have added new images folder and images to svn repository, and successfully performed commit. I ensure you that the image folder and the images were successfully uploaded to SVN server, because I saw that folder and images in trunk both from Xcode organizer and from browser, when was viewing the project remote files.
Now, my teammate performed update from Xcode (via file -> source -> update) but the image folder and images have not been retrieved. Xcode 4 just showed a message that a "project is up to date". He also went to organizer, then selected the trunk of repository and pressed update button, but the same message about project being up to date was shown. After more several tries, he deleted his local project files and performed checkout, but now the images were successfully retrieved. What might be a cause of such problem?
I know that for all required tasks I might use svn terminal commands, just curious is it sufficient to use Xcode 4 without command line.
We've had several issues with Xcode's SVN and have had to resort to the command line a few times to resolve them. Sometimes restarting Xcode has been enough, but if not here's a few simple svn commands that might help shed light on the issue, execute these from your project's root folder:
To check what state your SVN is in:
svn status
To update to most recent:
svn update
To commit:
svn commit -m "A commit message"

How can I add an existing project as a working copy in XCode 4?

Today I switched from XCode 3 to XCode 4 and now I have a lot of problems with my projects, which were under version control in XCode 3. If you install XCode 4, it will remember all your repositories. The problem is, that the projects don't know, that they belong to a specific repository. The instructions of Apple are easy, but do not work:
If you have a working copy of a project that was checked out of Subversion or cloned from Git using the command line or another tool, you can add it to your Xcode SCM repository support. To do so, click the Add button (+) at the bottom of the navigation pane in the repository organizer and choose Add Working Copy.
If I choose the project directory, I get this:
The working copy could not be added because its repository could not be located.
Does anybody know what the problem is?
To avoid confusion, I want to make a few things clear: my projects were under version control in XCode 3 and it worked. I am also aware of the fact, that I could delete all my projects and check them out (I don't want to do that). I already tried to checkout a project, and then this project is automatically added as a working copy. However if I remove the reference and try to add the same (!!) project as a working copy again, it does not work either.
The key for me was quitting Xcode then following Apple's instructions exactly. In Terminal:
$ cd project_folder # project containing the .xcodeproj file
$ git init
$ git add . # note the dot after "add"
$ git commit -m 'Initial version text'
Then get back into Xcode, open the Organizer, et voilà — instant repository.
I was able to resolve this by quitting Xcode and then opening the repository organizer before opening my workspace. Then it worked and I could open my workspace with SVN integration.
In Terminal, you may get the error:
-bash: git: command not found
This is because the git tool (and svn too) are contained inside the Xcode.app bundle in XCode 4.5 or later. In order to run the contained tools you need to use the xcrun command. For example, to run the git commands mentioned in the posts above:
$ xcrun git init
$ xcrun git add .
$ xcrun git commit -m 'Initial
version text'
For more info, see this link:
http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/
What I had to do was, as Udi pointed out, close Xcode and open the organizer before opening any projects. But then I had to add the repository and it's credentials first (SVN, in this case) before following the Apple directions you (mowidev) posted. After doing this, the working copy then appeared inside the listing for the SVN repository I'd added.
That ultimately linked in the two (Xcode project source control settings with the existing working copy it was using). Anything out of order ended up with Xcode thinking it was a Git repo (that also didn't exist).