xCode 4 and SVN subversion server IP address change

imageRecently we needed to change IP addresses on our SVN subversion server. We have blogged before about the SVN xCode Tips here.

What we did now though was to change the IP address of the SVN subversion server after we had already configured the connection to the server on our Mac computers.

The change process was surprising to us, and here is why.

1. We fully expected to have to much around with the entire connection thing. We were ready to refer to our above blog and re-establish connections.

2. When we fist established the new IP, and verified that it had propagated to the updated DNS listings etc, we found that xCode did not connect.

By chance we were short of time. So we rebooted the computers, and tried again. Still verifying that the IP resolved correctly etc. No joy!

With time constraints that day, we put it down and came back it it a day later.

It worked!


We effectively did nothing, and it just worked!

The strange thing was that the expiry and update of the original IP had passed when we first tested. So it should have worked first time.

We can only guess that for some reason the time between updates of the IP stored by xCode, must be longer than the TTL record of the DNS server (or something). In any case, just cool your heels for some time, and wait to see what happens.

Apple or Android app development

It’s funny, that when we tell people we are now developing Apps for the iPhone and iPad, we get a response… “What about Android” They have a bigger market than Apple.

While technically the Android is gaining ground fast, it would appear that owners of Android products don’t actually use them!

Here is an extract of some data from Google Analytics about the use of iPhone, iPad and Android devices. on 15 March 2011.

image

Notice that there is one category for Android devices. If you lump the iPhone and iPad devices into one, you get a massive    1345 vs 153.  or a whopping 11% for Android. Now if you were us and developing for a market. Would you go for the 11% market that Android has?

So Android lovers, either get on your mobile devices and browse / buy like crazy, or accept that fact that your device is less used in the real world than you would like!

xcode 4 with subversion SVN server–Tips

As newly anointed Xcode developers, and now with the release of Xcode 4. We found our team working on trying to get connected to a new subversion (svn) server at the same time we were trying to discover some new features of Xcode 4.

Talk about challenging.

Actually this was the first time with anything Apple we have not had a great experience. Loads of talk etc on the net about what a pain in the bum it all is.

For those who don’t know. Subversion is a code storage system that allows check in / check out of developer Xcode to a server. There are services online that you can pay monthly to for the use of a SVN server. We wanted to host it on one of our own servers.

The setup was not easy and required the setup of a new Linux server, then the setup of the SVN code to turn it into an SVN server.

What became confusing was when we needed to get Xcode to talk to the darn thing. Here is the important things you need to know.

First Contact

Just like the movie from when I was a kid, “First encounter”  is a big deal! Big enough to heap your mashed potato into a big mountain!

1. Open Xcode and select Window / Organiser.

2. Select Repositories

3. Bottom left, click the +

4. Add the details of the SVN server. Like this: svn://www.servername.com/directory (this should be the details for your SVN Server).

5. Where asked for Trunk Branches and Tags (leave empty for now).

 

Now we nee to use the “Terminal” program to make a connection to SVN.

1. Create a test.txt file with some simple message in it. Save it in your documents folder on your mac.

2. Open Terminal

3. Type “svn import /Users/yourname/Documnets/test.txt svn://www.servername.com/directory -m “initial import” –username yourname

Note:

the path “/Users/yourname/Documnets/test.txt” should be a path to any single dummy test.txt file. The idea is that we are uploading a single file to establish a connection.

The: svn://www.servername.com/directory is the path to your SVN server

“initial import” is only a tag line. Not needed

–username yourname = This is your SVN user name. Ensure you use a double dash username.

EG: our code looks like this:

svn import /Users/spascoe/Documents/Temp/test.txt  svn://www.interactivewebs.com/interactivewebs -m “test import”

4. You will be prompted with your existing user for your user password. At this point, if your mac user name does not match the configured SVN user name. Just hit enter. It will then prompt of a user. Type the new SVN user name, then enter. Then the configured SVN pass and enter.

5. You will likely see something that says. “svn://www.servername.com/directory already exists” – Ignore that!

6. Close Xcode

7. Open Xcode again and return to the Optimizer / Repositories and with luck, your server will list on the left hand side, and show the ROOT and any folders on the SVN server.

8. Click back on the server name in the left hand column.

9. Type in the names of the Trunk Branches and Tags folders. We chose to use these names to make it easy. They need to be setup on the SVN server by the administrator. They ARE case sensitive.

10. The text.txt file can be deleted from the server through Xcode if desired.

11. Close the terminal session.

Thoughts

Sometimes not all views refresh correctly. We suggest closing Xcode and opening it again to get things visible that you know should be there.

If you need to change user names, and or passwords. Then you will need to enter the terminal again and upload something using the method above.

We don’t understand exactly why, but it appears that Xcode will remember the authentication of the terminal session, and caches the authentication properties some place. Without the terminal session upload, you will never get it working!