<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Abstractec &raquo; Abstractec</title>
	<atom:link href="http://www.abstractec.co.uk/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abstractec.co.uk/wordpress</link>
	<description>iPhone and Android Development</description>
	<lastBuildDate>Mon, 23 Apr 2012 09:39:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Office365 Support</title>
		<link>http://www.abstractec.co.uk/wordpress/office365-support/</link>
		<comments>http://www.abstractec.co.uk/wordpress/office365-support/#comments</comments>
		<pubDate>Sun, 22 Apr 2012 09:08:10 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[Enterprise App Store]]></category>
		<category><![CDATA[MDM]]></category>
		<category><![CDATA[EAS]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/?p=302</guid>
		<description><![CDATA[This is just a quick post to say that we&#8217;re well on our way to adding Office365 support into the Abstractec Enterprise App Store! More details soon!]]></description>
			<content:encoded><![CDATA[<p>This is just a quick post to say that we&#8217;re well on our way to adding Office365 support into the Abstractec Enterprise App Store! More details soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/office365-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Bit of a Tidy Up</title>
		<link>http://www.abstractec.co.uk/wordpress/a-bit-of-a-tidy-up/</link>
		<comments>http://www.abstractec.co.uk/wordpress/a-bit-of-a-tidy-up/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 11:55:55 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/?p=294</guid>
		<description><![CDATA[You may have noticed that we&#8217;re having a bit of a spring clean on the site and migrating some of our old posts across to the new format. Once this is complete, we&#8217;re probably going to kill off the old blog, but the final decision hasn&#8217;t been made yet.]]></description>
			<content:encoded><![CDATA[<p>You may have noticed that we&#8217;re having a bit of a spring clean on the site and migrating some of our old posts across to the new format. Once this is complete, we&#8217;re probably going to kill off the old blog, but the final decision hasn&#8217;t been made yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/a-bit-of-a-tidy-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>01/11: Self-Signed Certificates</title>
		<link>http://www.abstractec.co.uk/wordpress/0111-self-signed-certificates/</link>
		<comments>http://www.abstractec.co.uk/wordpress/0111-self-signed-certificates/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 22:31:02 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/?p=291</guid>
		<description><![CDATA[If you&#8217;re talking to a server or service over HTTPS. This isn&#8217;t a problem for servers where the SSL certificate have been signed by a trusted authority, but on occasion, these certificates are self-signed. By default all browsers complain if a certificate has not been signed by a trusted authority and the iPhone is no &#8230; </p><p><a class="more-link block-button" href="http://www.abstractec.co.uk/wordpress/0111-self-signed-certificates/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re talking to a server or service over HTTPS. This isn&#8217;t a problem for servers where the SSL certificate have been signed by a trusted authority, but on occasion, these certificates are self-signed. By default all browsers complain if a certificate has not been signed by a trusted authority and the iPhone is no different. This is a little tricky when an application is communicating with a server as you don&#8217;t want to be asking the user whether or not they want to continue with the request as you just want to get on with it.</p>
<p>The method I am going to describe allows you to accept the self-signed certificate without adding a &#8216;pem&#8217; file to the keychain and uses the CoreServices Framework.</p>
<p>First up, we have to create a CFHTTPMessageRef reference using the CFHTTPMessageCreateRequest from CoreServices.</p>
<pre>
    CFHTTPMessageRef request = CFHTTPMessageCreateRequest(
        kCFAllocatorDefault,
        CFSTR("POST"),
        (CFURLRef) [NSURL URLWithString:@"https://--your site url--/"],
        kCFHTTPVersion1_1);
</pre>
<p>Next up, we need to grab the stream for this request of type CFReadStreamRef.</p>
<pre>
    CFReadStreamRef stream = CFReadStreamCreateForHTTPRequest(kCFAllocatorDefault, request);
</pre>
<p>Now, with for this stream, we need to tell the iPhone to not bother if presented with a self-signed certificate.</p>
<pre>
    CFMutableDictionaryRef securityDictRef = CFDictionaryCreateMutable(kCFAllocatorDefault,
        0,
        &amp;kCFTypeDictionaryKeyCallBacks,
        &amp;kCFTypeDictionaryValueCallBacks);

    if (securityDictRef != nil) {
        CFDictionarySetValue(securityDictRef, kCFStreamSSLValidatesCertificateChain, kCFBooleanFalse);
        CFReadStreamSetProperty(stream, kCFStreamPropertySLLSettings, securityDictRef);
        CFRelease(securityDictRef);
    }
</pre>
<p>And there we go. Essentially we&#8217;re telling the CFReadStreamRef we do not want the certificate chain validated. We also have the option of using kCFStreamSSLAllowsExpiredCertificates for allowing expired certificates through, kCFStreamSSLAllowsExpiredRoots to do the same for expired roots and KCFStreamSSLCertificates to add in a certificate of your own. For more details, check out the &#8220;CFStream Socket Additions&#8221; documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/0111-self-signed-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>20/11: UITableViewCell and XIB / NIB</title>
		<link>http://www.abstractec.co.uk/wordpress/2011-uitableviewcell-and-xib-nib/</link>
		<comments>http://www.abstractec.co.uk/wordpress/2011-uitableviewcell-and-xib-nib/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 22:29:28 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/?p=289</guid>
		<description><![CDATA[This article was originally posted on our old blog and has been migrated here to keep everything in one place &#160; The UITableViewCell is great for laying out information to be displayed in a UITableView (obviously), but there doesn&#8217;t seem to be a simple way of getting the NIB you have created within the Interface &#8230; </p><p><a class="more-link block-button" href="http://www.abstractec.co.uk/wordpress/2011-uitableviewcell-and-xib-nib/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><em>This article was originally posted on our old blog and has been migrated here to keep everything in one place</em></p>
<p>&nbsp;</p>
<p>The UITableViewCell is great for laying out information to be displayed in a UITableView (obviously), but there doesn&#8217;t seem to be a simple way of getting the NIB you have created within the Interface Builder and your UITableViewCell. Thankfully, it&#8217;s quite simple.</p>
<p>Create your UITableViewCell</p>
<pre>

@interface MyTableViewCell : UITableViewCell {
    IBOutlet UILabel *exampleLabel;
}
</pre>
<p>And add a layoutSubviews method within the implementation section; ie -</p>
<pre>
- (void)layoutSubviews {
    exampleLabel.text = @"This is my example!";

    /*
        You may also have a little more control over your font here also
    */
    exampleLabel.font = [UIFont boldSystemFontOfSize:12.0];
}
</pre>
<p>Now, create a new empty XIB file and call it whatever you want &#8211; I will use MyTableViewCell to match the Obj-C class. Open this XIB up using Interface Builder and look at the two items in the doc window: File&#8217;s Owner and First Responder. In the inspector, change the File&#8217;s Owner class to be UIViewController if this isn&#8217;t already set. From the library, drag a Table View Cell into the doc window after the First Responder. Change the class of this new Table View Cell to be MyTableViewCell. Now associate the main view with the Table View Cell by clicking on File Owner and then on the Connections Inspector on the entry for &#8216;view&#8217;, drag a line from the empty circle at the end of this line onto the &#8216;My Table View Cell&#8217; entry in the doc window.</p>
<p>OK, now let&#8217;s set up the label. Double click on the &#8216;My Table View Cell&#8217; entry in the doc window. Drag a label from the library into the view of &#8216;My Table View Cell&#8217; that should have been opened. Within the outlets group in the connections inspector for the table view cell, drag a line from the circle at the end of the &#8216;exampleLabel&#8217; line onto the label we just added to the table cell. Save the view.</p>
<p>That&#8217;s all great, but we haven&#8217;t yet told our code how to load up the XIB for this table cell view yet. We need to have a view controller conforming to the UITableViewDelegate and UITableViewDataSource protocols (which we won&#8217;t go into here). Within the &#8216;- (UITableViewCell *)tableView:(UITableView *)TableView cellForRowAtIndexPath:(NSIndexPath *)indexPath&#8217; method, we need to create our UITableViewCell implementation.</p>
<pre>

- (UITableViewCell *)tableView:(UITableView *)tableView
         cellForRowAtIndexPath:(NSIndexPath *)indexPath {
	static NSString *MyIdentifier = @"MyTableViewCell";

	MyTableViewCell *cell =
            (MyTableViewCell *)[inTableView dequeueReusableCellWithIdentifier:MyIdentifier];

	if (cell == nil) {
		UIViewController *c = [[UIViewController alloc]
                        initWithNibName:@"MyTableViewCell" bundle:nil];

		cell = (MyTableViewCell *)c.view;
		[c release];

                // code here to set whatever values in MyTableViewCell
	}

	return cell;
}
</pre>
<p>Obviously this is a pretty basic example, but the code follows the same principle for all other elements you may wish to add to your UITableViewCell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/2011-uitableviewcell-and-xib-nib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>03/03: Linux, Apache, PostgreSQL and Subversion</title>
		<link>http://www.abstractec.co.uk/wordpress/0303-linux-apache-postgresql-and-subversion/</link>
		<comments>http://www.abstractec.co.uk/wordpress/0303-linux-apache-postgresql-and-subversion/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 22:26:20 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/?p=286</guid>
		<description><![CDATA[This article was originally posted on our old blog and has been migrated here to keep everything in one place.  Another update that&#8217;s slightly off the &#8216;Seam&#8217; topic, but it&#8217;s useful information anyway. This post is going to take you through installing Subversion (SVN) onto Linux (Ubuntu 8.10 server) and use a database running under &#8230; </p><p><a class="more-link block-button" href="http://www.abstractec.co.uk/wordpress/0303-linux-apache-postgresql-and-subversion/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><em>This article was originally posted on our old blog and has been migrated here to keep everything in one place. </em></p>
<p>Another update that&#8217;s slightly off the &#8216;Seam&#8217; topic, but it&#8217;s useful information anyway. This post is going to take you through installing Subversion (SVN) onto Linux (Ubuntu 8.10 server) and use a database running under PostgreSQL 8.3 for authentication.</p>
<p>First up, install Ubuntu. I&#8217;ll leave that one up to you to figure out, but I did not install the LAMP server option, just the PostgreSQL option as I don&#8217;t need MySQL on this server.</p>
<p>From this point, we need to update our repositories for apt-get.</p>
<pre>
sudo apt-get update
</pre>
<p><em>You can just run a sudo su to just log in as root</em>.</p>
<p>Once that has completed, it&#8217;s time to install the SVN server, apache, libapache2-svn and the libapache2-mod-auth-pgsql modules</p>
<pre>
sudo apt-get install subversion
sudo apt-get install apache2
sudo apt-get install libapache2-svn
sudo apt-get install libapache2-mod-auth-pgsql
</pre>
<p>and give apache a nudge to restart with the modules</p>
<pre>
/etc/init.d/apache2 restart
</pre>
<p>OK, so let&#8217;s do some work with PostgreSQL. First we need a database to store the SVN access details in. This database will have two tables, svnuser and svngroups. The first table will store the details of the user; login name, password, first name, surname and an email address along with an ID.</p>
<p>Let&#8217;s create the database and the user for that database. Using psql as the postgres user:</p>
<pre>
create database svnusers;
create user svnuseradmin with password '&lt;your password&gt;';
grant all privileges on database svnusers to svnuseradmin;
</pre>
<p>Now quit psql and check that the above user works.</p>
<pre>
psql -U svnuseradmin -W -h 127.0.0.1 svnusers
</pre>
<p>You&#8217;re probably wondering why I&#8217;m specifying the loopback IP address as the host of the target database. Well, if you have a look at your pg_hba.conf file (under /etc/postgresql/8.3/main) and scroll to the bottom of the file, you will see that there are different rules for authenticating users connecting to the database depending on where they come from. By specifiying the IP address, you force PostgreSQL to perform MD5 authentication with the password you enter when trying to login rather than expecting ident or sameuser to work. If you don&#8217;t want to do this repeatedly, then change &#8216;ident sameuser&#8217; to &#8216;md5&#8242; and restart PostgreSQL using /etc/init.d/postgresql restart.</p>
<p>Now you&#8217;re on the database, let&#8217;s set up our two tables.</p>
<pre>
create table svnuser(
    login varchar(20) primary key,
    password varchar(60) not null,
    firstname varchar(100) not null,
    surname varchar(100) not null,
    email varchar(255) not null);

create index svnuser_login_idx on svnuser (login);

create table svngroups (
    login varchar(20) not null constraint svngroups_login_fk references svnuser (login),
    svngroup varchar(50) not null);

create index svngroups_login_idx on svngroups(login);

alter table svngroups add constraint svngrousp_login_svngroup_unique unique (login, svngroup);
</pre>
<p>Now, we are going to have a group for the admins who will have access to every project and one group per project. Let&#8217;s create a admin first.</p>
<pre>
insert into svnuser values (
    '&lt;your username&gt;',
    md5('&lt;your password&gt;'),
    '&lt;your first name&gt;',
    '&lt;your surname&gt;',
    '&lt;your email address&gt;');

insert into svngroups values ('&lt;your username&gt;', 'admin');
</pre>
<p>OK, let&#8217;s set up repository. I have placed the repositories under /var/svn so move to that directory after you have created it. Once there, let&#8217;s set up the repository as root.</p>
<pre>
svnadmin create test
</pre>
<p>Now, I want to be able to log into this repository using the user we have just created over HTTP (using WebDAV) so let&#8217;s do that.</p>
<p>Still as root, cd to /etc/apache2/mods-available and move dav_svn.conf and dav_svn.load to /etc/apache2/mods-enabled, then copy 000_auth_pgsql.load to /etc/apache2/mods-enabled/auth_pgsql.load. You can use the contents of dav_svn.conf to work out what&#8217;s going on, but I usually clear this file and start from fresh.</p>
<p>Add the following to the file:</p>
<pre>
&lt;Location /test/svn&gt;
  DAV svn
  SVNPath /var/svn/test

  # Turn BASIC auth off and point it at a blank file,
  # or you get a whole bunch of garbage in the logs
  AuthBasicAuthoritative Off
  AuthType Basic
  AuthName "Test SVN Repository"
  AuthUserFile "/dev/null"

  Auth_PG_hash_type md5
  Auth_PG_host localhost
  Auth_PG_port 5432
  Auth_PG_user svnuseradmin
  Auth_PG_pwd &lt;your password&gt;
  Auth_PG_database svnusers
  Auth_PG_pwd_table svnuser
  Auth_PG_uid_field login
  Auth_PG_pwd_field password
  Auth_PG_grp_table svngroups
  Auth_PG_cache_passwords on

  Auth_PG_grp_user_field login
  Auth_PG_grp_group_field svngroup

  Require group test admin
&lt;/Location&gt;
</pre>
<p>And restart apache.</p>
<p>Now, from a remote machine and using a browser go to:</p>
<p>http://&lt;your server hostname or IP address&gt;/test/svn</p>
<p>You should be prompted to enter a user name and password for authentication so enter the username and password you inserted into the svnuser record and then you will see the 0 revision of your test repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/0303-linux-apache-postgresql-and-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>28/10: JBoss Tools on a Mac!</title>
		<link>http://www.abstractec.co.uk/wordpress/2810-jboss-tools-on-a-mac/</link>
		<comments>http://www.abstractec.co.uk/wordpress/2810-jboss-tools-on-a-mac/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 22:22:50 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/?p=283</guid>
		<description><![CDATA[This article was originally posted on our old blog and has been migrated here to keep everything in one place.  Well, in response to Max&#8217;s comments on the RHDS entry, I&#8217;m currently working using JBoss Tools on the Mac! Here are the steps taken to get this working: 1) Download the latest version of &#8220;Eclipse IDE &#8230; </p><p><a class="more-link block-button" href="http://www.abstractec.co.uk/wordpress/2810-jboss-tools-on-a-mac/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><em>This article was originally posted on our old blog and has been migrated here to keep everything in one place. </em></p>
<p>Well, in response to Max&#8217;s comments on the <a href="http://www.abstractec.co.uk/blog/index.php?itemid=17#c">RHDS entry</a>, I&#8217;m currently working using JBoss Tools on the Mac!</p>
<p>Here are the steps taken to get this working:</p>
<p>1) Download the latest version of &#8220;Eclipse IDE for Java EE Developers&#8221; from the eclipse website<br />
2) Download the latest <a href="http://download.jboss.org/jbosstools/builds/nightly/latestBuild.html">nightly build of JBoss Web tools</a><br />
3) Download the version of Seam you&#8217;ll want to use and a version of JBoss AS also from <a href="http://labs.jboss.com/jbossseam/download/index.html">here</a> and <a href="http://labs.jboss.com/jbossas/downloads/">here</a>- I&#8217;m using Seam 2.0.0CR2 and AS 4.2.0-GA as they were on my machine<br />
4) Unzip AS and Seam into locations that suit you and make a note of where you&#8217;ve saved them<br />
5) Unzip Eclipse<br />
6) Unzip JBoss Tools and drag the contents of the features and plugins folders into the plugins and folders directories in your fresh Eclipse folder created in the previous step.<br />
7) Point Eclipse in the direction of your downloaded JBoss Seam and JBoss AS locations when starting a new project.</p>
<p>And get to work.</p>
<p>Or at least that&#8217;s the theory. Unfortunately, I&#8217;m being plagued with crashes during operation of this. If I don&#8217;t start up JBoss AS and stay away from the JBoss JSF editors, then it&#8217;s OK, but then what&#8217;s the point in using the JBoss Tools? I&#8217;ve spent more time restarting when Eclipse has either fallen over in a heap or hung solid than I&#8217;ve actually done any coding so far, so it&#8217;s all been a bit disheartening.</p>
<p>Never the less, I&#8217;ll keep plugging away. I do seem to have some success if I only have one of the JBoss editors open and don&#8217;t start up the JBoss server, after this, I have to resort to editing JSFs by hand, or stopping the whole thing and starting up again. I have upped the heap size to 1.7Gb but it doesn&#8217;t seem to make a whole lot of difference too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/2810-jboss-tools-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with UIAccessibility</title>
		<link>http://www.abstractec.co.uk/wordpress/working-with-uiaccessibility/</link>
		<comments>http://www.abstractec.co.uk/wordpress/working-with-uiaccessibility/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 09:56:59 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/?p=246</guid>
		<description><![CDATA[One of our current clients is a large media organisation based in the UK. As part of their remit, they have to ensure that their content reaches as many people as possible on as many media outlets as possible. As such, this means that their content has to be made available to people with disabilities, &#8230; </p><p><a class="more-link block-button" href="http://www.abstractec.co.uk/wordpress/working-with-uiaccessibility/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>One of our current clients is a large media organisation based in the UK. As part of their remit, they have to ensure that their content reaches as many people as possible on as many media outlets as possible. As such, this means that their content has to be made available to people with disabilities, including partially sighted folks.</p>
<p>We have been working to ensure that one of their iOS apps provides the necessary accessibility functionality using UIAccessibility.</p>
<h2>Where to Begin?</h2>
<p>The first port of call with UIAccessibility is to open up Interface Builder. For the majority of the items within your NIB you can set the Accessibility options by selecting the element, tapping on the Identity inspector (alt+cmd+3) and then scrolling down to the &#8220;Accessibility&#8221; pane.</p>
<div id="attachment_247" class="wp-caption alignright" style="width: 188px"><a href="http://www.abstractec.co.uk/wordpress/wp-content/uploads/2012/02/Screen-shot-2012-02-18-at-11.02.33.png"><img class="size-medium wp-image-247" title="Accessibility in IB" src="http://www.abstractec.co.uk/wordpress/wp-content/uploads/2012/02/Screen-shot-2012-02-18-at-11.02.33-178x300.png" alt="" width="178" height="300" /></a><p class="wp-caption-text">Accessibility options in Interface Builder</p></div>
<p>From this pane, you can select a number of options for your element. The first of which is whether or not this element will be exposed to a user using accessibility. It is possible to &#8216;hide&#8217; elements if they are confusing to users with accessibility especially blind users. This may sound harsh, but there are some elements that might be almost impossible to make work as their layout might be so visually oriented that simply adding accessibility labels will just make the experience confusing for such a user. You should always strive to provide an alternative experience in this instance, but time pressures may dictate this is a job for the &#8216;next release&#8217;.</p>
<p>Just don&#8217;t forget about it!</p>
<p>So, let&#8217;s go through rest of the elements.</p>
<p>The Label is what is announced using voiceover when the user lands on the UI element. If we have a label of &#8220;name input&#8221; then voiceover will say &#8220;name input&#8221;. The Hint should be used to describe to the user what they will get when actioning this element. So, for a shopping type app with an &#8216;add to basket&#8217; option I would consider using:</p>
<ul>
<li>Label: add to basket</li>
<li>Hint: adds this item to the basket</li>
</ul>
<p>The traits section allows you to set how the element behaves or how it should be treated. The <a title="UIAccessibility Protocol Reference" href="https://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIAccessibility_Protocol/Introduction/Introduction.html">UIAccessibility Protocol Reference</a> is the best place to find the descriptions of these traits, but they are mostly self explanatory.</p>
<h2>Think About What Makes Most Sense</h2>
<p>The important thing to realise is that apps are very rarely static. This means that you will have to programmatically assign values to the UI elements at runtime. As such, it is also important to realise that what makes sense on screen does not always make sense using voiceover.</p>
<p>Say for example you have a list of UILabels that are generated dynamically based on the content of an NSArray where the array contains alternating &#8216;heading&#8217; and &#8216;value&#8217; objects; eg.</p>
<pre>[NSArray arrayWithObjects:@"Width", @"23cm", @"Height", @"15cm", nil];</pre>
<p>Which would then display the following:</p>
<ul>
<li><span style="color: #ff6600;">Width</span></li>
<li>23cm</li>
<li><span style="color: #ff6600;">Height</span></li>
<li>15cm</li>
</ul>
<p>Visually, you can (pretty much, although this is a crude example) work out that &#8217;23cm&#8217; has some correlation with &#8216;Width&#8217;. And if you were cycling through the elements using voiceover you could probably work out that because &#8217;23cm&#8217; would follow &#8216;width&#8217;, that the width was 23cm (although 23cm would be announced phonetically rather than as &#8217;23 centimetres&#8217;, but we&#8217;ll revisit this later). However, if you have a fairly complex UI layout, it is possible that iOS will cycle over the elements in a seemingly random order meaning that you may get the &#8216;width&#8217; announcement, then the accessibility label of another element, then &#8217;23cm&#8217;. Obviously, this is confusing for the user.</p>
<p>One solution to this is to disable the accessibility of the heading element and modify the accessibility label of the value element. In our example, this means we would perform the following:</p>
<pre>headingLabel.isAccessibilityElement = NO;
valueLabel.accessibilityLabel = [NSString stringWithFormat:@"%@, %@", heading, value];</pre>
<p>Meaning that for our example here, voiceover would announce &#8220;Width, 23cm&#8221; which is a much better experience.</p>
<h2>Phonetics</h2>
<p>As mentioned previously, Voiceover will read what it&#8217;s given. It doesn&#8217;t know what you mean by &#8216;cm&#8217; and will simply read out &#8216;cm&#8217; to the user. It does not know that you mean &#8216;centimetres&#8217;. This means that you should really give careful consideration to what you are adding in to your accessibility labels and how they will be perceived when read out. In our above example, we should  set our value to &#8217;23 centimetres&#8217; rather than &#8217;23cm&#8217;. This will give a better experience to our users and make the meaning of the data clear.</p>
<p>This is equally important for times. Given 03:00 voiceover will read &#8216;zero three zero zero&#8217; which is meaningless. Roman numerals also. For 2012, the Roman numeral string is &#8216;MMXII&#8217; which, when read out is &#8216;em em eks eye eye&#8217;.</p>
<p>For times, consider using NSNumberFormatter using the NSNumberFormatSpellOutStyle format to produce a string that spells out the time. Again, consider splitting the hours and minutes into separate elements so that 23:00 has some meaning. I like to have this produce a string of</p>
<pre>11 o'clock, PM</pre>
<p>But your needs may vary.</p>
<h2>Ch-ch-ch-ch-changes</h2>
<p>If you have a UI that is non-standard and uses UIViews as a sort of overlay rather than pushing another UIViewController using a UINavigationController, then you need to tell the user that the layout has changed. And you should also let iOS know!</p>
<p>iOS does a reasonable job of working out which elements should be accessible if the view has changed, but it needs to be told using the following code:</p>
<pre>UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, nil);</pre>
<p>Usually this will sort out which UI elements can be cycled through when using voiceover but if you are changing the layout in such a way where this is necessary, then you should also announce to the user using voiceover so they know that something has changed using.</p>
<pre>UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification,
        @"&lt;description about what has changed&gt;");</pre>
<p>Finally in this section, if you are purposefully hiding an element (by completely removing it from the view for example) for any reason you should really listen for the UIAccessibilityVoiceOverStatusChanged notification and modify your UI to reflect the current status of voiceover. You can check the status of voiceover with the</p>
<pre>UIAccessibilityIsVoiceOverRunning()</pre>
<p>function.</p>
<h2>Start From Scratch</h2>
<p>It&#8217;s always easier to add in UIAccessibility while the UI is being created. Retr0-fitting this in later is often painful. There may be times when you simply cannot convey any useful meaning to the user with your current design. In this case, you should consider having a view that you use when voiceover is running. The stock UITableView with headings is great for accessibility as it gives you a great number of accessible elements for free (the headings are particularly useful) and is relatively simple to implement.</p>
<h2>Conclusion</h2>
<p>UIAccessibility is baffling at first. There&#8217;s no two ways about that. If you have to add accessibility into an existing app, then you have pain ahead of you if the design is non-standard or uses any &#8216;tricks&#8217;; especially custom alert views and elements that are revealed by horizontally swiping on a UITableCell.</p>
<p>Apple&#8217;s stock components do a reasonably good job with voiceover, but there&#8217;s always room for improvement in terms of thinking about your data and how it sounds when read out by a computer or iOS device.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/working-with-uiaccessibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS MDM Guide</title>
		<link>http://www.abstractec.co.uk/wordpress/ios-mdm-guide/</link>
		<comments>http://www.abstractec.co.uk/wordpress/ios-mdm-guide/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 11:32:19 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[MDM]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/?p=236</guid>
		<description><![CDATA[Quite a bit of the work we have undertaken recently involves the MDM Protocol used to managed iOS devices. It&#8217;s a fairly simple protocol to use, but there is not a great deal of information on the internet so we&#8217;ve put together a few hints that might help you with your MDM implementation. This document &#8230; </p><p><a class="more-link block-button" href="http://www.abstractec.co.uk/wordpress/ios-mdm-guide/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><span id="more-236"></span>Quite a bit of the work we have undertaken recently involves the MDM Protocol used to managed iOS devices. It&#8217;s a fairly simple protocol to use, but there is not a great deal of information on the internet so we&#8217;ve put together a few hints that might help you with your MDM implementation.<br />
<a href="http://www.abstractec.co.uk/wordpress/wp-content/uploads/2012/01/Screen-shot-2012-01-22-at-11.20.03.png"><img class="alignright size-medium wp-image-237" title="Screen shot 2012-01-22 at 11.20.03" src="http://www.abstractec.co.uk/wordpress/wp-content/uploads/2012/01/Screen-shot-2012-01-22-at-11.20.03-300x130.png" alt="" width="300" height="130" /></a></p>
<p>This document expects you to have a copy of the &#8217;Mobile Device Management Protocol Reference&#8217; document from Apple (from this point, called the MDM Reference). As this document is covered by NDA, this page will not detail elements contained within the MDM document from Apple.</p>
<p>Description of the fields in the iPhone Config Util:</p>
<div></div>
<div>
<ul>
<li>Server URL &#8211; the URL the device will connect to when it recieves an APNS message via Apple</li>
<li>Check In URL &#8211; the URL the device will connect to during MDM enrolment</li>
<li>Topic &#8211; the push queue the device will listen to. This MUST be in the format of com.apple.mgmt.&lt;unique identifier&gt;</li>
<li>Identity &#8211; a p12 certificate, this is used when the device signs the responses to the commands sent by the server</li>
<li>Sign Messages &#8211; sign the messages from the device to the MDM server using the identity certificate</li>
<li>Check out when removed &#8211; when the MDM profile is removed send a &#8216;check out&#8217; message to the MDM server</li>
<li>Access rights &#8211; what the device is allowed to query.</li>
<li>Use Development APNS Server &#8211; whether or not to use Apple&#8217;s development APNS server</li>
</ul>
</div>
<p>If you use the development APNS server, you will have to configure your server send the APNS push messages to the &#8216;sandbox&#8217; APNS URL.</p>
<p>&nbsp;</p>
<p><em>The process flow is as follows</em>:</p>
<p>The user obtains the configuration profile from somewhere (website/email) and installs it, the device then talks to the server (to the check-in URL if configured) and upload XML; the &#8216;Authenticate&#8217; and &#8216;TokenUpdate&#8217; documents detailed in the &#8216;Mobile Device Management Protocol Reference&#8217; document.</p>
<p>The PushMagic and UnlockToken from the TokenUpdate document should be retained and associated with the UUID for later use. The contents of PushMagic is required to send an APNS message to the device to instigate the MDM process. Once you have the PushMagic, you create a JSON string as per the MDM Reference, this should be signed as per a normal APNS request. There are a number of APNS libraries available to assist with this and the MDM Reference details the steps you will need to take to export your MDM certificate.</p>
<p>Once the device has received the APNS message, it will send an XML document to the URL defined in &#8216;Server URL&#8217; in your configuration profile. This document is detailed on page 12 of the MDM Reference. From this point, you can send back a single MDM command if there is one for the device. If the command was correctly formatted and accepted by the device, then it will send back a command response. The response is dependent on the command and these are detailed in the MDM Reference.</p>
<p>If there are no more MDM commands for the device, then the server should respond with an empty response.</p>
<p><strong>Some more points</strong></p>
<p>You should be using a HTTPS server for your MDM communication. If you are, life will be <em>considerably</em> easier for you and your users if you use a signed certificate from a Verisign or other signatory. iOS requires a few more steps to use a self-signed SSL certificate or a certificate signed by a private CA.</p>
<p>Keep the iOS console open while you are testing your server, it will help immensely. Use the iPhone Config Util or Xcode to view the console.</p>
<p>MDM configuration cannot be installed within a profile that limits removal. If you have the &#8216;General/Security&#8217; setting configured to anything other than &#8216;Always&#8217; then iOS will reject your profile.</p>
<p>Now, unfortunately we cannot be more specific on the details on a blog, however our team are available for MDM consultancy where we can go into more details. Feel free to get in touch using the comments or our <a title="Contact us" href="http://www.abstractec.co.uk/wordpress/contact-us/">contact us form</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/ios-mdm-guide/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>iOS 6 Wishlist</title>
		<link>http://www.abstractec.co.uk/wordpress/ios-6-wishlist/</link>
		<comments>http://www.abstractec.co.uk/wordpress/ios-6-wishlist/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 16:12:34 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/ios-6-wishlist/</guid>
		<description><![CDATA[It&#8217;s probably going to be a while off, but we are thinking of things we would like to see in iOS 6 that would be cool or make our lives a little easier as app developers. Download Manager We see this working as an iOS level background service. Your app gives the manager a URL, &#8230; </p><p><a class="more-link block-button" href="http://www.abstractec.co.uk/wordpress/ios-6-wishlist/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s probably going to be a while off, but we are thinking of things we would like to see in iOS 6 that would be cool or make our lives a little easier as app developers.</p>
<p><strong>Download Manager</strong></p>
<p>We see this working as an iOS level background service. Your app gives the manager a URL, asks that it is downloaded and the manager takes care of this and sends a local notification to the app when the download is complete. The user will be able to set preferences for the download manager in &#8216;Settings&#8217; to set whether they want to download via 3G (disabled by default), whether they want multiple downloads to take place at once, whether to send a notification in completion and so on. </p>
<p><strong>Apple TV Apps</strong></p>
<p>This would be a game changer. Being apple to run apps on the TV would make the Apple TV an absolute must-have device. </p>
<p><strong>UI Themes</strong></p>
<p>Having a style sheet type scenario for apps would cut down on a bunch of boilerplate code to set colours and text styles. It would also mean that white label apps would be quicker to turn around for subsequent releases.</p>
<p>So, just three for now but what do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/ios-6-wishlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS Multitasking Misconceptions</title>
		<link>http://www.abstractec.co.uk/wordpress/ios-multitasking-misconceptions/</link>
		<comments>http://www.abstractec.co.uk/wordpress/ios-multitasking-misconceptions/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 08:21:06 +0000</pubDate>
		<dc:creator>JohnHaselden</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://www.abstractec.co.uk/wordpress/?p=231</guid>
		<description><![CDATA[There&#8217;s a fantastic blog post over at Frasier Speirs&#8217; blog regarding iOS multitasking and what it actually means. http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a fantastic blog post over at Frasier Speirs&#8217; blog regarding iOS multitasking and what it actually means.</p>
<p><a title="http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html" href="http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html">http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.abstractec.co.uk/wordpress/ios-multitasking-misconceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

