Backing up your WhatsApp messages using iCloud

Its a safe assumption that most of us use WhatsApp for our everyday communication. In fact, it is one of the most widely used methods of communication.

People use it for all kinds of things: Staying in touch with friends, family. Collaborating with people on an office project, conducting team meetings, communicating with a client. This means that our conversations are of utmost importance to us. So one should take care & back these messages up on a regular basis. The big advantage with backup is that one can even restore past conversations from the backup when the user switches from one iOS device to the other.

Use the following steps to backup your messages to iCloud

  1. First make sure you have turned on iCloud.

  2. Open Settings > iCloud

  3. Sign in with your Apple ID

  4. Switch to Whatsapp

  5. Click on Settings

  6. Click on Chat SettingsIMG_0063

  7. Click on Chat BackupIMG_0064

  8. Here you can set the auto backup feature or manually take a backup.IMG_0071

  9. Thats it, your Whatsapp messages are now being backed up.

While restoring the process is straightforward.

  1. Make sure you are signed into iCloud.

  2. Install Whatsapp.

  3. Enter your Phone number to verify.

  4. Enter the Code sent via SMS to your phone.

  5. You will be asked whether you want to restore your previous chats from iCloud.IMG_0067

  6. Just click restore.IMG_0068 IMG_0069 IMG_0070

  7. All your previous conversations should come up now.

File types in OS X

This Article is for those new to the Mac or for those who have questions about the different file types in OS X. The lists below aren’t complete and in many cases may require the user to install additional Apple software or third party tools.

File Extensions

The table below lists some of the commonly encountered file types. Note that in certain situations, like creating & extracting from zip files, the related application is not directly invoked.

Common extensions in OS X

Common extensions in OS X

 

The table below shows some of the popular third party file types that once can access on OS X. Note many of them may require users to install 3rd party applications to open/edit the files. Do note that the list below is not a complete list.

Popular file types

Popular file types

 


 

Showing File Extensions

Here are the steps to show file extensions.

1) Look at the Application running. Make sure the Finder Application is running by viewing the upper left hand corner of the screen.

1

2) Click on Finder

2

3) Click on Preferences

4) Click on the ‘Advanced’ Tab. Look at the selection for File Extensions.

4

5) Make sure the checkbox to show file extensions is selected.

5

Managing all your data on your Mac

One of the single most important aspects of using a computer is Data Management. In this article I will be going over the various features available & steps that you can take to manage your data in a safe, secure & efficient way.

TimeMachineBACKUP

It happens ever so often that we are faced with a situation where we need a file to which we no longer have any access to. The reasons may be varied: lost computer, damaged or lost hard drive, accidental deletion. While there are applications that do retrieve lost files, they only work if the storage media is available & do not guarantee 100% recovery. The best solution to this is to backup your data.

The most common approach used is to manually copy the file onto an external storage. While this is easy, it can be tedious for the user & is error prone.

One of the easiest solutions is to use a backup tool called Time Machine. This is built right into OS X. You don’t need to install anything new. Just connect the hard drive where you would want to store all your backups. The OS will periodically backup all your data every hour as long as your backup drive is connected to the Mac. Many a times you are prompted to choose an external drive for backup, but that pops up only when you connect a new hard drive or a hard drive which isn’t used for backup.Once you have this activated you can then navigate back in time (just as you would expect from a time machine) and look for a file that you have lost.

Steps to Backup using Time Machine:

1) Connect the Hard drive you want to use as a backup destination.

2) Click on System Preferences > Time Machine to customise your backup.
TimeMachine

3) Click on Options to select the folders to exclude from Time Machine Backups.

TimeMachineOptionsThere are other third party tools which you could use if you wish. Retrospect and Carbon Copy Cloner are 2 of the many 3rd party tools available for this.

icloudDriveSYNCHRONISATION

In todays world most of us are using more than one device for our daily activities. This means that we would like to have most of the information on all the devices. This can be achieved through various applications that are available to manage our portables such as smart phones & tablets. But by far the easiest approach is to take advantage of Cloud Services.

If you have an iPhone &/or an iPad which you use along with your Mac then the best service for this is iCloud. However if you use a mix of platforms such as Android or Windows for your smart phones & tablets then using any third party service such as Google Drive, Drop Box, OneDrive will help you ensure that your information is available via the cloud across all devices.

Steps to turn on iCloud Services on your Mac:

1) Click on System Preferences > iCloud.

2) Sign in with your iCloud ID & password.

3) You should come to the iCloud panel where you can configure different iCloud Services.

iCLoud

4) Select the different content you want managed under iCloud.

SECURITY

This is one area which is increasingly gaining more importance. An important aspect of data management is keeping your data secure. While there is no such thing as a completely secure computer, one can definitely take steps to make sure that one’s information is kept as secure as possible.

ACCOUNT PASSWORDS: This is probably your first line of defence. Having a good strong password goes a long way in securing your data. There is a nice built in tool that evaluates & rates the passwords that you create, called as password assistant.

Password Assistant can be found on any screen within the Mac that prompts for a Password. Like the screen shot below when we are creating a new user for the Mac.

The key icon is to be clicked to launch Password Assistant.

The key icon is to be clicked to launch Password Assistant.

The Password Assistant itself gives you a lot of options when it comes to choosing your password type.

Use the drop down to select the password type.

Use the drop down to select the password type.

 

 

 

 

 

 

KEYCHAIN ACCESS NOTES: Keychain access is a builtin application that manages your secrets such as passwords, keys & certificates. There is also an option to save a note. Information within the note is saved in an encrypted way thereby securing it.

ENCRYPTION: This is the most secure way of saving information. There is a builtin encryption feature called FileVault which encrypts all the data on your system. There are 3rd party tools that can do this for you too: GPGAES Crypt, PGP to name a few.

Once can use a combination of the 3 or all 3 depending on the level of security required. It is also a good idea to keep your backup secure. Securing your computer but not the backup is a bad idea.

STORAGE

Yet another common issue that a lot of us face. Most computers that have come in over the past few years offer very large built in storage space & in most cases it is sufficient. But with the growing number of photographs, movies & songs we often find that space on our computers isn’t sufficient. This is not an easy problem to solve.

A simple approach is to keep only those things we require on the Mac. Also using cloud services to store information that we don’t need to access frequently is a good idea. Compressing data using zip files is also a good approach. But a better option, especially for large amounts of data, is to compress them into ReadWrite disk images. External storage can also be considered for placing extra data.

One area where storage management is not looked at but is equally important is related to the backup drive. Overtime as your backup drive fills up it starts removing older backs (in case of Time Machine). To ensure you have as long a history of backups, make sure that you only backup those things that you need. For example there isn’t a pressing need to backup all the OS files & applications, one can reduce the backup size by eliminating unnecessary items from the backup.

iOS Device guide for App Developers

Developers making iOS Apps regularly come across situations where they need to find out the dimensions of the screen or the icons. This guide should give a better idea about the same.

iphones

iPhone 5S/SE iPhone 6/6S/7/8 iPhone 6+/6S+/7+/8+ iPhone X
Display Points

320×568

375×667

414×736

375×812

Pixels

640×1136

750×1334

1242×2208

1125×2436

Display Points to Pixels Ratio

1:2

1:2

1:3

1:3

Pixel Density

326 ppi

326 ppi

401 ppi

458ppi

App Icon Size in pixels

120×120

120×120

180×180

180×180

Aspect Ratio

16:9

16:9

16:9

19.5:9

ipads

  iPad Mini 2,3,4 iPad Air/iPad Air 2/iPad Pro 9.7” iPad Pro 10.5 iPad Pro 12.9”
Display Points

1024×768

1024×768

1112×834

1366×1024

Pixels

2048×1536

2048×1536

2224×1668

2732×2048

Display Points to Pixels Ratio

1:2

1:2

1:2

1:2

Pixel Density

326 ppi

264ppi

264ppi

264ppi

App Icon Size in pixels

152×152

152×152

167×167

167×167

Aspect Ratio

4:3

4:3

16:9

16:9

 

 

 

Cloud Services Demystified

A lot of us use cloud services. Here we will talk about some of the popular services & how to use them to maximise your advantage.

What is Cloud?

Cloud Service is a technology that makes your data available across multiple devices. Depending on service provider this may even be cross platform. This is great as in todays day & age most of us make use of at least 2 smart devices. A common confusion amongst a lot of users is that cloud is a backup technology. This is not strictly true. As I mentioned earlier, when you enable cloud services they ensure that your data across all devices is the same. So if for example, you delete a file on one device, it is deleted across all the devices. It is not possible to go & retrieve the file back from the cloud. To protect yourself from such problems you should look into a cloud based backup technology.

What are the advantages?

There are numerous advantages with cloud based solutions.

  1. Firstly, your data is immediately accessible across multiple devices without your manual intervention.
  2. Storage management especially handling portable storage drives is no longer required.
  3. It is highly cost effective. In most cases the data that we consume is fairly small. The free version for most of the services does provide at least 2Gb of data. In most cases there is the option of purchasing additional storage space if needed.
  4. Its easy to use, with no major technical requirements.
  5. Most of the providers support multiple platforms & devices.

Common Cloud Service Providers & services offered

googleDrive

Google Drive: The google drive is a free account that every user gets along with their gmail account. With unto 15GB free storage this is an ideal option for those who want to store large amounts of data. It is also an ideal option for those who wish to share files & collaborate with other users. Works best when used within the Google ecosystem.

WebLink: drive.google.com


onedrive

Similar to google drive. Microsofts OneDrive allows you to store files on the cloud. This comes free with your existing hotmail.com or outlook.com accounts.  Works best when used within the Microsoft Ecosystem.

WebLink: https://onedrive.live.com/about/en-us/


dropbox

Yet another popular cloud storage & sharing service. While it has limited capacity of 2Gb it has the advantage of being accessible across multiple platforms. The storage capacity does increase for shared collaborative accounts.

WebLink: http://www.dropbox.com


evernote

Evernote is a popular app for storing information on the cloud. Apart from just offering cloud services for documents it also has a lot of other built in features such as card reader, calendar, notes that makes it a very popular app. The fact that it runs on almost all the most commonly used platforms only adds to its value. There are paid options available but they are for additional features rather than more storage explicitly.

WebLink: https://evernote.com


icloudDrive

This is Apple’s cloud solution primarily for OS X & iOS devices. Just like Google drive it ensures that the data across your OS X & iOS devices is the same. The fact that it is accessible via the web make it useful. This service is not available on all the platforms barring the desktop version of Windows for which a free download is available. Works best when used within the Apple ecosystem.

WebLink: http://www.icloud.com


Owncloud

Unlike the other services available this one is OpenSource. It has numerous advantages that make it a very attractive option, especially for businesses thinking of providing cloud services to their employees.

The main advantage is the fact that you can configure & host your own cloud services (as the name says). This means that you have control over the amount of space allocated for users & importantly security.

Apart from that there are native apps available along with a web portal to access all your data from almost all devices anywhere. This means that it is very easy to deploy without the headache of compatibility issues.


The following table gives a basic comparison on what all is offered, note that there maybe more services provided which I may have skipped, the table only highlights the most important points.

Cloud Services Comparison

Cloud Services Comparison

Clarifying Swift & Objective-C

swiftApple made a surprising announcement at the recent WWDC held between June 2-6 2014. While everyone was looking forward to the launch  of the new OS for both the Mobile as well as Mac platforms, Apple also announced a new programming language for developers. SWIFT.

It was described as Objective-C without C. Over the past few months I have gone over the features of the language & even converted many of the apps into Objective-C. While the initial learning curve is there, it is a fairly easy language to pick up. I will be going over a few interesting features of the language in this article. But what I will also be touching upon is the future & relevance of Objective-C.

Reduction in Lines of code: One of the first things that you will notice once you start programming in Swift is the reduction in the number of lines of code. Swift does away with the long syntax which you find in Objective-C. This makes the code look a lot more compact & less intimidating.

Lets take the example of creating an object in Swift & compare the syntax with that of Objective-C

Objective – C version: NSString *myString = [[NSString alloc] initWithString:@”This is a string”];

Swift version: var myString : String = String(“This is a string”)

As we can see, there is a great deal of simplicity that comes along. Reduction in the number of lines of code is of great importance to software developers. This means more compact code & improves readability. However, this comes at a price. While Objective-C code was more elaborate & did use many more lines of code it was far easier to understand by simply reading through it. In case of Swift the code will have to be complemented with details comments about what it does.

Single File: Another new feature there in Swift is the lack of header files. People coming from a Java background would find this familiar. The declaration of classes & implementation of its functions is done in .swift file now. This removes the necessity of having to import various header files. In case, certain frameworks need to be used all that needs to be done is to import that framework at the top of the file.

import framework

Replace the keyword framework with the name of the framework you wish to include.

Mixed Language Programming: Unlike Objective-C, Swift does not work well with other languages. In fact, Swift only works with Objective-C. So if you have any API’s or pieces of code that you have written in C or C++, you will have to create Objective-C wrapper classes for that C/C++ code so that you can incorporate it into your project.

This means that Objective-C is not going to be deprecated any time soon. Also, it will be equally important to learn Objective-C & can’t be ignored by people.

COMMON QUESTIONS:

– I already know Objective-C should I also learn Swift?
There is no pressing need to immediately learn Swift, though it would be a good idea to learn it anyways. None of the apps you have already made will stop working. However, you may come across code written in Swift or would need to incorporate programs written in Swift, so having knowledge of the same would be a good idea.

– I don’t know Swift or Objective-C which should I learn?
Again, as in the previous question knowing both is a really good idea. If you are confident that you will be making apps using Swift only, then you can learn just that for starters. If you feel that there is a good chance of having to read/modify or write Objective-C code then learning Objective-C before Swift makes more sense.

CONCLUSION: Swift is a very easy to use language & will sit nicely on familiar eyes. A lot of the code that will be written in the coming apps will definitely use Swift. However, this does not mean the end of the road for Objective-C. Nor does it mean that Objective-C will become redundant or obsolete. A developer can choose to use any of the languages to make the app. It will be nice for a new developer to first learn Objective-C & then move on to Swift as it will give the user a more all round understanding of the entire development framework .

 

iOS Developer Programs Explained

Most people who first venture off into App Development focus their efforts on the design of the App & its implementation. However, when the time to publish the app comes along then there are questions as to which developer program he/she should opt for.

Developer programs are online accounts created by Apple for the developer community. Each developer can register their own account from where they can manage the distribution of their apps, the collection of payments for purchase of apps or items within the app. The different programs offered are meant to cater to a specific audience set.

There are 4 different types of developer programs.

  • Free Membership
  • iOS Developer Program
  • Enterprise Developer Program
  • University Developer Program

Free Membership

This is the simplest program. Anyone can enrol for this & there is no cost involved. To sign up simply go to developer.apple.com & register. This is the perfect program for those looking to start iOS App Development. It gives the member full access to the latest guides, sample codes & information about the different classes & frameworks used for the current publicly available version of iOS.

iOS Developer Program

The iOS Developer Program is the paid version of the program. It costs $99 a year & is meant for those who wish to distribute apps on the App store. Apart from distribution it also gives the user options to test it on their own device. All the benefits from the Free Membership are also made available here.

Enterprise Developer Program

The Enterprise Developer Program is another paid program. It costs $299 a year & is meant for organisations who wish to distribute apps within the organisation to their own employees. The big difference between this program and the regular iOS Developer Program is the fact that in the Enterprise Program you have full control over how your apps are distributed to your employees & have to take care of the hosting as well as distribution aspects. The apps made by an organisation do not go onto the app store & are not verified by Apple.

University Developer Program

The University Developer Program is a free developer program meant for Universities or colleges. This program allows such educational institutes to test the apps made by students as part of the official curriculum. Limited distribution amongst students is also permitted. The program lacks the ability to perform large scale distribution or distribution on the App store.

The table below illustrates the different  facilities made available to different account holders.

devProg

For more information related to the D-U-N-S Number:

Making a case for OS X Server

Almost everyone is aware of the OS running on Apple Computers. Its called OS X & each version gets a name from a location in California (they used cat names earlier). But what is little know is about the Server that is also made available from Apple. Its called as OS X Server. Not only is it little know but it is also under utilised. I am going to make a case for using this product as compared to some of the other solutions that are available out there.

Installing

Firstly, lets talk about getting hold os OS X Server. Earlier there used to be a dedicated version of the OS which was made available for the server. But starting OS X 10.7 (Lion) that approach was discontinued. If you wanted an OS X Server, you would have to first upgrade your Mac to the consumer version of the OS & then install the Server.app. All you have to do This greatly simplified the whole process of setting your Mac up as a server.

The big advantage with this is that you no longer need to purchase a separate “server” version of the OS.  The other big advantage is that all the services being offered by the server are no located in a single application, in a nice collected manner.

Requirements

Typically most servers require an advanced hardware configuration to run. This is also the case for OS X Server. The recommended products for this would be the Mac Pro or the Mac Mini Server. The Mac Mini Server is a Mac Mini that comes with the Server App included as a part of the setup. This is a product configured to be used as a server. While the 2 products mentioned above are ones used most frequently as a server, you are not limited to them. Any Mac with a minimum of 10GB storage space & 2GB of RAM can run OS X Server. Though in reality you would need much larger specs than the ones mentioned above.

Services Offered

The OS X Server works best in an all Apple product environment. However, it also works well in mixed environments too. Especially when it comes to managing Macs & iOS Devices while taking advantage of other services being offered. In fact, a solution commonly used is the “Magic Triangle” which allows you to used an Active Directory Server along with OS X Server.

Basic Networking Services

Basics Networking Services such as DNS, DHCP, VPN are easily available & configured. Most of them don’t require a lot of configuring to do. Also the Caching Service & Software Update services can also be easily configured for managing the bandwidth usage in the organisation.

Collaboration & Communication

As a part of the collaboration & communication services provided you have the ability to host your own Mail service, Messages service, Website service, Wiki service, Calendar & Contacts Service.

Sharing

The file sharing service & ftp services are available for users to more easily share files & folders across the network.

Management

From a device management point of view there are plenty of services available. You have the Netinstall service which allows you to remote install OS X over the network or allow clients to boot using an image which is hosted on the server. Then there is the Open Directory Service which allows the management of various user accounts over the network. These users accounts then work along with the Time Machine service, which allows you to back up a Mac onto the server itself. Finally, the Profile Manager service works along with the domain users to provide device management for the different devices (OS X & iOS Devices).

Tools

Server App

LINK:https://itunes.apple.com/in/app/os-x-server/id714547929?mt=12
This is the main app that you will use to configure the different services that your server will be offering. The advantage with the app is it also allows you to remotely administer your server using the app itself.

Workgroup Manager

LINK:http://support.apple.com/kb/dl1698
The Workgroup Manager is a utility which can be downloaded from Apple’s support page. This application was used to create users & groups & apply managed preferences to them for earlier versions of the server. It is possible to create users & groups for the current version of the server using this app.

System Image Utility

This tool is required to create the different types of NetInstall images which are used for mass deployment. All OS X computers come with this application preinstalled.

Directory Utility

This utility also comes built into the OS & is used while binding your Mac to a Directory Service.

Apple Remote Desktop

LINK:https://itunes.apple.com/in/app/apple-remote-desktop/id409907375?mt=12
This is a very powerful tool. Available on the Mac App Store as a paid app. This tool allows you to remotely monitor & administer all the Macs within your organisation. It has many report generation tools to help in the management of your Macs.

Apple Configurator

LINK:https://itunes.apple.com/in/app/apple-configurator/id434433123?mt=12
This is another application available on the app store. This is a free app to configure different iOS Devices. It is used to perform a manual configuration of the devices.

Ticket Viewer

The Ticket Viewer Application is a built in application that is used to help in examining tickets used under kerberos.

Recovery Disk Assistant

LINK:http://support.apple.com/kb/dl1433
A free tool that is available online which allows an administrator to create an external bootable recovery drive to perform various troubleshooting tasks. OS X: About Recovery Disk Assistant

Disk Utility

This is a built in utility that is used to maintain different storage devices. It allows you to partition & format various drives.

Why to use the OS X Server

There are many reasons why an OS X Server would make a good option.

  • Cost: The cost of OS X Server itself is low. The hardware for running OS X Server would ideally be the Mac Mini which starts around $999 (including the Server App itself). If you already have a Mac with you, you just need to purchase the Server App for $20. This is ideal for organisations on a budget.
  • Simplicity: The Server is very easy to configure. Many of the services being provided are extremely easy to configure & maintain. From an administrators point of view, it involves providing basic information & a few clicks.
  • Features: The Server provides many basic services used everyday & many administrative options that combine the power of modern day servers with the simplicity needed.
  • Works well along with other Servers such Windows Server.

Ideal Situations to use OS X Server

The OS X Server is ideal for small organisations which use Mac or iOS Devices. The low cost & simplicity makes it an ideal choice for such organisations. Also if you are an organisation which uses a lot of Macs & iOS Devices then managing them is a lot easier with OS X Server, here again the cost & simplicity ensures that it is a viable option.

The server may not be a good choice for organisations with a very large user base or very few Mac/iOS devices. While other computers can easily work with OS X Server, other Servers may prove much better for such scenarios.

Here are some points to consider while deciding whether to use an OS X Server.

  • Does your organisation use a lot of Macs &/or iOS Devices?
  • Do you need to perform various administrative & configuration tasks on your Apple devices?
  • Is your user base small? Approximately 10 – 150 odd employees?
  • Do you need to provide very basic services without worrying too much about platforms being used? (Especially if directory services are not required).

If the answer to a combination of questions above is Yes, then the OS X Server might be the right choice for you.

Below are a list of some scenarios where the OS X Server might be ideal

  • Small Medium Enterprises
  • Schools & Educational Institutions
  • All Mac & iOS Environments
  • Home

Conclusion

The OS X Server is best if you are predominantly using Apple computers & mobile devices. The ability to manage them & configure them is best served by the Server app. However, for larger organisations this may not be the only criteria. The server can work along with windows server, however, most Apple computers & mobile devices can also work with other solutions.

If cost is a major consideration & simplicity is a must then the OS X Server is a good bet. If you are looking for a feature heavy server which offers a wide variety of services with lots of room for customisation then this might not be the right solution.

All in all the Server App is a very good app. It will definitely be something work considering when you are managing the IT infrastructure.

Configuring an SVN Server on OS X on your Local Network

The following post walks through the steps required to setup a simple SVN server to share files with users on the network. Note: Familiarity with Terminal Commands is required. Please go through the following blogs: Terminal Commands, Terminal Commands 2, Terminal Commands 3

Note:

The following steps illustrate the process of setting up an SVN server for a simple scenario. It can be easily scaled to handle multiple computers & users. In a real world situation you would have to deal with stronger authorisation procedures & larger networks.

 

Requirements for this demo

  • 3 Apple Computers running OS X Mavericks
  • All 3 computers should be on the same network
  • Knowledge of Terminal commands

 

Pre-setup steps

1.Decide which computer you want to setup as the SVN server. Change the hostname of the computer to SVN Server.

2.To change the hostname open System Preferences > Sharing > Click on Computer Name > Enter SVN Server.

3.Create a Share Point where you will be hosting the server. For this exercise we will be creating a separate partition & will be sharing it with other users on the network.

4.To create a new partition open Disk Utility > Select the Disk entry (not the volume entry) > Click on Partition Tab > Select the Partition you want to further partition >  Click on the ‘+’ sign > Specify the name, size & format for the partition (for this demo we will use SVN, 10 GB, Mac OS Extended Journaled) > Click Apply

5.Access authorisation for this share point will be via a sharing only user. Create to users called Employee1 & Employee2. Give them a password emp1 & emp2 respectively.

6.To create sharing only users open System Preferences > Click on Users & Groups > Click on ‘+’ sign to add new user (If necessary authenticate as an admin user to unlock) > From the drop down select Sharing User > Provide the login credentials specified above.

7.Repeat the above step for the second user.

8.Now that we have our users ready we should go ahead & setup the newly created partition for sharing.

9.Open System Preferences > Sharing > Click on File Sharing in the service list, make sure the checkbox is checked > Click the ‘+’ sign under ‘Shared Folders’, add the newly created partition > Under the ‘Users’ list add the newly created sharing users Employee1 & Employee2, remove all other users except Admin > Give the admin user, Employee1 & Employee2 Read-write access & Everyone No Access.

10.Create a folder called ImportFolder in the Documents folder.

cd ~/Documents 

mkdir ImportFolder

  11.  Now that we have prepared the server computer, test the new shared folders from the other 2  computers (which will be used by Employee1 & Employee2).

 

Setting up the svn server

Perform these steps on the SVN Server machine

  1. Create a folder called SVNRepository in the newly created partition: mkdir SVNRepository
  2. Run the command to give admin privileges: sudo chgrp -R admin /Volumes/SVN/SVNRepository/
  3. Create the svn repository. For this exercise lets call the repository as DocumentsRepository.   svnadmin create /SVN/SVNRepository/DocumentsRepository
  4. The next few steps involve configuring the settings for your server.
    1. Enter the /SVN/SVNRepository/DocumentsRepository folder cd /SVN/SVNRepository/DocumentsRepository.
    2. Enter the conf folder. cd conf
    3. Edit the svnserver.conf file.
      1. Edit the following elements in the file, make sure that there is no white space before the line.
      2. anon-access = read //this means no authentication is required to read
      3. auth-access = write
      4. password-db = passwd
      5. Save the file.
    4. Edit the passwd file.
      1. Edit the following elements in the file.
      2. Under users add the following users.
      3. employee1 = password1
      4. employee2 = password2 (Note: For a real world implementation make sure that you use stronger authentication methods for your server.)
      5. Add as many users as you wish.
      6. Save the file.
  5. Start the svnserver (as root) using the following command: sudo /usr/bin/svnserver -daemon -root /SVN/SVNRepositories
  6. Navigate to the folder where all your data is located
    1. cd ~/Documents/ImportFolder
    2. Run the import command to add the files to your repository.
    3. sudo svn import . file://SVN/SVNRepository/DocumentsRepository/ -m “Initial Checkin”
  7. This has setup your svn server with some initial data in it.
  8. Now we perform a sanity check to make sure that all is working well.
    1. cd ~/Documents/
    2. mkdir Test (This is the folder where we will check-out the files from the server)
    3. svn co svn://<ip address of your server>/DocumentsRepository
    4. This should check-out all the files from the repository into your folder.
    5. Check to make sure that all the files were checked out.
  9. If all went ok, then you server is up & ready.

 

Testing the svn process from the 2 different computers

We are now ready to test this on different computers.

  1. Make sure the computer for Employee1 is on the same network.
  2. Open Finder & Browse for the Network partition being shared by the server.
  3. Mount the shared volume in Finder. Authenticate using Employee1’s sharing user credentials if necessary.
  4. Open the Terminal application.
  5. Navigate to the Document’s folder: cd ~/Documents
  6. Create a project folder: mkdir Project.
  7. Navigate to the Project folder: cd Project.
  8. Now we run the command to checkout files into your folder: svn co svn://<ip address of your server>/DocumentsRepository.
  9. Browse through the newly checked out files.
  10. Let us try adding a file to the repository.
    1. Create a new file using TextEdit.
      1. Open Text edit.
      2. Type “This file was created by Employee 1”.
      3. Save the file as Employee_1_Report in the ~/Documents/SVNRepository/DocumentsRepository folder.
    2. Now run the command svn add Employee_1_Report.
    3. Lets commit the changes to the repository: svn ci —message “Adding new file” Employee_1_Report
    4. If prompted to authenticate enter the details you specified in the passwd  file employee1 as the username & password1 as the password.
  11. Now you have added a file to repository from your client machine.
  12. Repeat steps 1 – 9 for Employee2 from a different machine.
  13. Verify that files added from one machine appear on the other.
  14. Thats it. You now have a working svn-server on your local area network.
  15. You can try adding & editing files to check if the changes reflect on both the computers.