Database access in iPhone development

When developing iPhone applications which require data to be stored, nine out of ten times I will use a SQLite database (which uses a file as your database). The best way I’ve found to set this up is when you run your application, check if the database file already exists. If it doesn’t, create a copy of the default one in your project and then in the future use this file (which is now located within the application directory).

This can be an issue for developers when debugging as it’s not always clear exactly what is in the database after you have ran your code and one good way to see this is to simply open the SQLite file. When developing to the iPhone Simulator this file is easily accessible as the app you build is kept in this directory: /Users/username/Library/Application Support/iPhone Simulator/iOS version/ApplicationsiPhone Backup ExtractorHowever when building to a device, it’s not quite as simple to get at the file. This is because you can’t access the application directory on the device directly, so the first step is to download the iPhone Backup Extractor. This awesome tools allows you to extract all application data from backups that iTunes makes from your iOS devices (included within this data is your SQLite database and all other files).

Once you’ve downloaded it, we need to make sure that encryption is turned off on your device backups (as this is not supported). Plug your device in and open up iTunes. Select your device under Devices and scroll down on the summary tab to the options and untick “Encrypt iPhone backup” if it is selected. Now we need to make a backup to get the latest data off your device, so right click on your device (in the left bar) and select “Back Up” to do this.

Extract the iPhone Backup Extractor app from the download you got earlier and run the file. Press the button labelled “Read Backups” and select your device from the list given (if you do not see your device here you probably haven’t backed it up – or encryption could be turned on in your backups). It will then ask you to choose from a list of application names (which are listed using their “Bundle ID”). This should look something like this:

iPhone Backup Extractor – Read Backup

Notice that you can see every app’s “Bundle ID”! Find the app you’re debugging and click the button labelled “Extract”. You will then be prompted to give a location to extract too. So choose somewhere (this doesn’t really matter too much as chances are you will delete it after you’ve debugged anyway), and then click “Extract Here”. A finder window should appear showing you a copy of all the files from your device backup which you can now use to debug!

Application Loader – How to switch accounts

When submitting your iPhone applications to the AppStore you are now required to use Application Loader rather than uploading your application build through iTunes Connect like in the old days! While the validation techniques have improved, you still cannot use multiple accounts within the app. This is probably not a requirement for many iPhone developers, but if you need to do this there is a way around it:

First make sure Application Loader is closed and then navigate to:
“/Users/username/Library/Preferences/” You should see some plist files in here starting with com.apple.*. When you login on Application Loader it creates a plist file in here which is used to log you in the next time you open it. So all we need to do to sign out is rename this file! The file you’re looking for is called:
“com.apple.itunes.connect.ApplicationLoader.plist” If you have many accounts (or at least, clients with accounts) one thing I have found useful is to amend the file with a memorable name on the end whilst it’s not in use. Then all you have to do to log in is remove that from the account you wish to login as and then fire up Application Loader!

Finder showing plist files.
Edit: So it turns out, there is a built in way to do this! On the top menu, if you press Window, then Run Setup Wizard, it will reset the login process that Application Loader uses. It’s not exactly the most elegant solution and doesn’t allow you to automatically login to different accounts by remebering passwords so for the time being I’ll be sticking to the method described above!

Group Meeting – Agenda and Notes

Affiliation Agreement /Fixtures Policy Update

At a recent meeting held in London it was proposed that Events should have 3 year Affiliation Agreements which in effect would be 3 year fixed contract. This is in place of the current One year Rolling Agreement. This was proposed on the grounds that it would be more attractive to events. It has since been argued that this would give the executive the ability to cancel or not renew contacts at will. The effect would be to create so many problems that the BEOA representatives felt it was not an acceptable proposal.

At a subsequent meeting the proposal was withdrawn. The Affiliation Agreement will largely be the same for 2011 with minor changes only and there will be a major update for 2012.

At a later meeting with MES, AS and PC went through the main points of the fixtures policy and had no problems with the majority of the proposals amending one or two minor points but made the point that the statements were so general that they could be steered whichever way one wanted.

At the same meeting, BE have said that they retain the right to insert into the calendar a “Feature Event”. It is not known under what circumstances this will take place and procedure to ensure events that are already in the calendar do not suffer as a result.

Website

Concern was raised that, to many events that do not have problems and which are run by experienced organisers, BEOA is irrelevant. It is thought that the BEOA website should have a revamp with a view to make it more interactive for organisers.

The recent case where Adele was able to intervene on behalf of The Bovington event should be used as an example of how we are able to help every level of event whether large or small when they have a problem

Jo Carr agreed to see what could be done for the initial cost of £400-£500. The format of the site should allow a nominated user (a member of the committee) to be able to post items on the site.

BEOA Report Forms

Adele & Pete have produced a BEOA report form for organisers to be able to report on BE employees at their event. This has been shown to Mike E-S who had some reservations; in particular the reporting on Stewards who are not employees.

It was decided that we should proceed with the report form in an informal and internal way so that short comings of certain individuals could be identified and then raised with BE.

Radios at X-country Fences

There has been a recommendation from the Sports Committee that there should be a Radio at every X-country Fence. Although only a recommendation, Stewards are within their rights under the rules to pressurize organisers to carry out the recommendation. This can add considerable cost. John Colson agreed to investigate, based on 2010 data, what the extra cost might be.

BEOA AGM 28 th November

Because of the fact that there are elections to the Board this year, BE are insisting that the BE AGM will start at 11.00AM and will continue through with election results etc till after lunch. It was agree that we should have our AGM as follows:

0915 Coffee with something to eat

0930 AGM

1000 Open Discussion perhaps with topics proposed

Volunteer Incentive Scheme

Jo has received no comments from her paper. It was agreed that she should send it to Renee so that it can link in with her ideas.

Nutwell Court was very short of helpers and Renee was asked to activate her helpers list. This she did with fantastic success. Points like this could be highlighted to organisers via the new website.

Support from ERA for Events

ERA has offered to give some financial support a few events in the year. The criteria for which events they will be is a yet not decided. However it will be based on quality and the fact that due to circumstances outside their control the event concerned are in need of support to survive. The support will either be the cash to build a fence or to sponsor a section.

Withdrawals / Entries / Refunds

This was discussed at length. It was agreed that the key issue with competitors was the refunding of entry fees when a withdrawal was replaced at an event. The whole argument as to whether a “Wait List “is run or not only confuses people and obscures the situation. What is required is transparency. It was agreed that the whole subject should be dealt with in a measured way with changes recommended for 2012. In the meantime a simple change to the following rules of 2011 will help to simplify the situation and increase transparency:

2.20 (ii)Line 3 to read Withdrawals by competitors who have been replaced will receive a full refund of the entry fee(plusVAT if applicable) subject to a £10 deduction..

Annex 3 Para 6 Line 5/6 delete from the Wait List

Pete Collins agreed to take these through the Sports Committee ASAP for inclusion for 2011