<?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>simonguest.com</title>
	<atom:link href="http://simonguest.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://simonguest.com</link>
	<description>The only person allowed to login as &#039;guest&#039;</description>
	<lastBuildDate>Wed, 09 May 2012 15:21:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>An Objective View of MEAPs</title>
		<link>http://simonguest.com/2012/04/24/an-objective-view-of-meaps/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=an-objective-view-of-meaps</link>
		<comments>http://simonguest.com/2012/04/24/an-objective-view-of-meaps/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 20:45:01 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Neudesic]]></category>

		<guid isPermaLink="false">http://simonguest.com/2012/04/24/an-objective-view-of-meaps/</guid>
		<description><![CDATA[I recently had the opportunity to put together some research for a customer who has been interested in the MEAP (Mobile Enterprise Application Platform) space. My premise is that the market has become flooded with MEAPs (Mobile Enterprise Application Platforms, as coined by Gartner), yet most of them are fundamentally taking organizations and developers down [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the opportunity to put together some research for a customer who has been interested in the MEAP (Mobile Enterprise Application Platform) space.  My premise is that the market has become flooded with MEAPs (Mobile Enterprise Application Platforms, as coined by Gartner), yet most of them are fundamentally taking organizations and developers down the wrong path when it comes to developing mobile applications.  The problem is that MEAPs demo really well in front of the CIO… &ldquo;Wow!  You just hit F5, and your application is compiled and deployed to iOS, Android, Blackberry devices…  Where do I sign?&rdquo; &ndash; yet the reality is very different.  Namely:</p>
<p><strong>Language Abstraction</strong> – Many MEAPs have their own language that claim to be similar to Java or a flavor of JavaScript.  Even if it is the same language, there is always something new to learn.  Also, developers tend to shy away from learning any language that&rsquo;s vendor specific (APEX on Force.com anyone? ;&ndash;)</p>
<p><strong>Language Limitations</strong> – When you create a language that abstracts other languages you always end up serving only the lowest common denominator.  Often there are ways of coding styles and nuances supported in the native language that the MEAP won&rsquo;t expose because it&rsquo;s not on other platforms.</p>
<p><strong>Platform Limitations</strong> – Time has shown that platform abstraction doesn&rsquo;t work (do a search on Wikipedia for cross platform RAD tools if you don&rsquo;t believe me).  Also, platforms change quickly.  What happens if/when the next version of iOS is released?  You have to wait for your MEAP vendor to catchup before you can use any of the features.</p>
<p><strong>UI Limitations</strong> – Following on from the previous point, many of the controls that MEAPs offer also follow the lowest common denominator rule.  For example, Cocoa Touch has a neat feature called a &ldquo;Half Page Curl Transition&rdquo;.  If you abstract your UI to a MEAP vendor, how is this supported on other platforms?  Either a) it&rsquo;s not (so by default you can&rsquo;t use it on iOS), b) you can only use it on iOS (which breaks the promise of a MEAP) or c) it&rsquo;s implemented as a hack job on all platforms. </p>
<p><strong>Tooling</strong> – MEAP tooling is often Web based, or bundled as an Eclipse add-on &ndash; but in both cases it often doesn&rsquo;t fit in with the other tools that developers use today (e.g. ALM, refactoring, unit testing, etc.).  Also, many of the MEAP vendors seem to be aiming their toolsets towards business analysts.  When are we going to let this one go?  Business analysts have an important role to play in teams, but they shouldn&rsquo;t be developing UI, and they shouldn&rsquo;t be writing code.<br/>
</p>
<p><strong>Debugging</strong> – Let&rsquo;s say you create your application with a MEAP, and then it crashes 1 time in every 10 (i.e. one of those really nasty bugs to find).  What are you going to do?   a) Reach out to Apple?  I suspect they won&rsquo;t help you.  b) Search the web for other people with the same issue?  Could be difficult to find.  c) Pay the MEAP vendor even more money to investigate your issue?  Ah, that&rsquo;s the one…</p>
<p><strong>Data Abstraction </strong>– Many MEAPs offer connectors to databases, XML files, SAP, etc.  Not only are these costly, but many are just pass-through connectors, so as a developer you don&rsquo;t get any control over the connection.  Want to implement synchronization?  Want to change the formatting or query for better optimization?  Probably not going to be possible.</p>
<p><strong>Difficult to Extend</strong> – Many MEAPs don&rsquo;t extend very easily.  Found a new JavaScript library that you want to use in your application?  How about a native control that you&#8217;d like to display?  Could be tough.  Some MEAPs do offer bridging to native code – but in which case, why not just write the whole thing in native code to start with?<br/>
</p>
<p><strong>Vendor Lock In</strong> – The sum of all the above leads to quite the definition of vendor lock in.  Chances are by the time you deploy your first application you&#8217;ll be signed up with an expensive support and service agreement, with your developers working on code in a language that they&#8217;ll never be able to re-use, on a platform that won&rsquo;t go anywhere.</p>
<p>I&#8217;ve extended this into a presentation that you can find below &ndash; which cover the above points in more detail, plus outline some general alternative approaches to creating applications without the dependency on a MEAP framework.</p>
<div style="width:425px" id="__ss_12678560"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/simonguest/objective-view-of-meaps" title="Objective View of MEAPs">Objective View of MEAPs</a></strong><object id="__sse12678560" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=objectiveviewofmeaps-120424223859-phpapp01&#038;stripped_title=objective-view-of-meaps&#038;userName=simonguest" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><param name="wmode" value="transparent"/><embed name="__sse12678560" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=objectiveviewofmeaps-120424223859-phpapp01&#038;stripped_title=objective-view-of-meaps&#038;userName=simonguest" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="transparent" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/simonguest">Simon Guest</a>.</div>
</div>
<p>Based on other people&rsquo;s experience with MEAPs, am I missing anything?</p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2012/04/24/an-objective-view-of-meaps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tips, Tricks, and Recommendations for HTML5/Mobile Web Development</title>
		<link>http://simonguest.com/2012/04/12/tips-tricks-and-recommendations-for-html5mobile-web-development/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tips-tricks-and-recommendations-for-html5mobile-web-development</link>
		<comments>http://simonguest.com/2012/04/12/tips-tricks-and-recommendations-for-html5mobile-web-development/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 13:14:45 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Neudesic]]></category>

		<guid isPermaLink="false">http://simonguest.com/2012/04/12/tips-tricks-and-recommendations-for-html5mobile-web-development/</guid>
		<description><![CDATA[Over the past few months I&#8217;ve been fortunate to have worked with several customers creating Mobile Web applications for different devices. These have included an iPad based Mobile Web app for a healthcare provider, a cross-platform Mobile Web app for a commercial real estate broker, and an Android tablet solution to allow scientists to research [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few months I&#8217;ve been fortunate to have worked with several customers creating Mobile Web applications for different devices.  These have included an iPad based Mobile Web app for a healthcare provider, a cross-platform Mobile Web app for a commercial real estate broker, and an Android tablet solution to allow scientists to research experiment details from the comfort of their lab.</p>
<p>From these projects, I&#8217;ve come up with a list of tips, tricks, and recommendations that I wanted to share if you are looking to develop your own Mobile Web applications.  Hope you find them useful…<br/>
</p>
<p><strong>Understand the differences between Mobile Web and hybrid applications</strong></p>
<p>It&rsquo;s important to make an early decision on whether your application is going to be pure Mobile Web (the user accesses it through the browser on the device) or hybrid (the user launches an application with an embedded control to display web based content).  The decision to use the mobile browser or to have a dedicated hybrid application will likely be determined by the functionality the application requires.  For example, obtaining the GPS location from the device can be performed perfectly well inside the browser, but accessing the camera from a Web page needs a hybrid application to provide the functionality. <br/>
</p>
<p>In my experience there are three common features that drive developers towards a hybrid application:  1. Access to the camera.  2. Access to local contacts on the device.  3. Deployment to the AppStore/Marketplace.  The first two are to overcome limitations of what can and can&rsquo;t be accessed through the mobile browser (and is something that Mozilla is trying to tackle through <a href="https://wiki.mozilla.org/WebAPI">WebAPI</a>).  The latter one is probably the most important to understand however &ndash; as while a hybrid solution will enable the application to be published to the app stores, extreme care needs to be taken to ensure that the application will not be rejected.  This is most common with applications destined for Apple&rsquo;s AppStore (if Apple view your application as a single container for web content with no apparent native functionality, they will more than likely reject it).<br/>
</p>
<p>If you do take the hybrid approach, you really have two options to build the application &ndash; you can either set out and build a native application, embed a WebView control and then hook different events to create your own bridge between the two.  This can be very useful if you only have a small piece of Web functionality that you need to embed in your application.  Alternatively, you can consider using a framework such as <a href="http://phonegap.com/">PhoneGap</a> (now known as <a href="http://incubator.apache.org/cordova/">Apache Cordova</a>).  Using Cordova is  not without it&rsquo;s challenges (for example, with cross domain scripting and client side certificate authentication), but it can definitely give you a head start especially if the majority of your application is going to be based on mobile web content.<br/>
</p>
<p><strong>Setup a robust development and testing environment<br />
</strong></p>
<p>Setting up a robust development environment might be viewed as obvious for most of us, but tools for developing Mobile Web applications are still relatively immature, so it&rsquo;s an important area to get right before you start your first app.  In the most basic setup, you are going to need three things to be successful:</p>
<p>The first is a great IDE for HTML development.  You&#8217;ve probably got your favorite already, but a strong IDE with as much JavaScript code completion support as possible will be your friend.  Personally, I switch between <a href="http://macromates.com/">TextMate</a>, <a href="http://www.microsoft.com/visualstudio/en-us">Visual Studio 2010</a>, and <a href="http://www.jetbrains.com/webstorm/">WebStorm</a> depending on which platform I&#8217;m working with.  It&rsquo;s also interested to see where Adobe are headed with their toolset.<br/>
</p>
<p>Secondly, you are going to need a browser capable of inspecting the DOM and doing JavaScript debugging.  Personally, I use Safari for doing this, but Chrome and/or IE9 will equally provide you the tools that you need.  The important thing here is not so much the choice of the browser, but the understanding of how to breakpoint JavaScript code and inspect elements both on and off the page. <br/>
</p>
<p>Finally, you&#8217;ll need some kind of device, or device emulator.  Switching the user agent on a desktop browser will only get you so far, and eventually you are going to need to test on something representative of the device that the user will be using.  If you are developing an application that will be primarily used on iOS devices, I would certainly recommend a Mac (as the iOS simulator is very robust).  If a Mac doesn&rsquo;t float your boat as your development machine however you could consider a hosted solution such as <a href="http://www.macincloud.com/">MacinCloud</a> or simply do all your debugging using an iPod touch.  There are a few PC based utilities that claim to emulate mobile safari/iOS, but I&#8217;ve had a poor experience with all of them.<br/>
</p>
<p>For Android, I tend to avoid the emulator whenever possible (it&rsquo;s a resource hog) and instead have a selection of devices that I can use for debugging on the fly.  I&#8217;ve found that the key for Android testing is to have a selection of devices with preferably different resolutions and running different versions of the OS (e.g. a separate device running 2.1, 2.2, 2.3, and 4.0 should cover most of the current market, unless you have a need to go back to 1.6 for some reason).  If you don&rsquo;t have access to physical handsets, you may want to consider one of the testing providers such as <a href="http://www.perfectomobile.com/">Perfecto Mobile</a>.  They have a variety of devices that you can rent, covering many different platforms.<br/>
</p>
<p><strong>Use client side JavaScript instead of server side scripting<br />
</strong></p>
<p>If you&#8217;ve been developing Web applications for some time, especially enterprise facing applications, you&#8217;ll be used to having a lot of the presentation and application logic tied up in server side scripts, maybe running server-side ASP, ASP.NET, JSP, PHP, etc.  When developing Mobile Web applications however, things need to change.  While server-side scripting will of course still work for a mobile application (and might be very tempting as you start to write your first application), it quickly creates a tight coupling between your device and the server.  In the old days where you were accessing the server from a desktop browser on the same network, this wasn&rsquo;t a problem &ndash; but once you move the experience to a mobile device with a potentially patchy network connection, the last thing you want to be doing is relying on the server side for generation of pages and views.  If your mobile web application needs to do a roundtrip to the server when you hit the &ldquo;Next Page&rdquo; button, you&#8217;re going to be heading for a world of hurt.</p>
<p>The answer is to move as much (if not all) of the application logic to client-side JavaScript.  This might be a painful exercise as you translate the move from an MVC server side framework to handcrafting page navigation using client side JavaScript, but the pay off will be worth it.  If you have all of the application logic locally, together with pre-fetching as many of the pages into the DOM when your application first loads, you effectively disconnect yourself from the server side which makes performance much better and also moving to offline much easier.  Of course, you still want to communicate with the server side &ndash; who doesn&rsquo;t? &ndash; but this should be done via a set of asynchronous REST/JSON calls to bring data into the application rather than relying on the server to generate HTML for your application.</p>
<p><strong>Design for running offline<br />
</strong></p>
<p>Related to the previous point, you should also start thinking about how your application could run offline, even if you have no plans to do so.  This will put you on a good architectural path, and will also mean that your application will work if and when network connectivity is lost.  There are plenty of articles explaining how to enable offline access in HTML5 applications, so I won&rsquo;t plan to cover here &ndash; other than to say you&#8217;ll be creating a cache manifest for your application, specifying the files to go into your cache, enabling the scripts for checking the cache when your application starts, and handling control logic accordingly (e.g. when you hit that submit button, you&#8217;ll want to know whether there is network connectivity before making the call to the server!).</p>
<p>If there&rsquo;s one piece of advice that I can offer here however (and we learned this the hard way) it is to design for offline first, but implement last.  Do all of the right things to support offline in your application, but don&rsquo;t enable it until you are close to the end of your development cycle.  If you enable it too early, it can cause mayhem with the development team &ndash; as your developers could end up debugging against a version of the application that could be slightly older &ndash; or the cache doesn&rsquo;t get refreshed in the way it should.  This doesn&rsquo;t application to local storage &ndash; this is fine to access during development &ndash; I would just recommend not enabling the cache manifest until you go into UAT.</p>
<p><strong>Select the right UI framework for your needs<br />
</strong></p>
<p>Almost every other day there seems to be a new HTML UI framework released, and mobile frameworks are no exception.  At Neudesic we&#8217;ve had most experience and success using <a href="www.jquerymobile.com">jQuery Mobile</a>, but have equally done work using <a href="http://www.sencha.com/">Sencha</a>, <a href="http://dojotoolkit.org/features/mobile">Dojo</a> and others.  As all the frameworks offer slightly different combinations of controls, I&#8217;ve found one of the tricks for selecting a suitable framework is to first build out a list of the controls that you are likely to need.  For example, in one project we developed a set of paper prototypes (side note &ndash; I really dig <a href="http://www.uistencils.com/">UI Stencils</a> for this) and realized that we would be creating a multi-tabbed application, with many lists on each page.  Knowing what controls we were likely to use ahead of time made selecting the framework easier, and also put into perspective what controls we would have to build from scratch.<br/>
</p>
<p>The good news is that most of the frameworks have demo pages/sites available, so that you can check them out beforehand without having to download anything.   This can be a great way of testing the controls across a different number of devices, as well as getting a feel for the performance.  My rough order of magnitude is that HTML based mobile UI will feel around 85% of a native control &ndash; it will look similar, react similar, but you just know that there&rsquo;s this 10 &ndash; 15% gap that doesn&rsquo;t quite feel native.<br/>
</p>
<p><strong>Understand the caveats with implementing maps in Mobile Web applications<br />
</strong></p>
<p>Related to the last point, many applications have a need to display maps and pinpoints, and this will likely remain true for many mobile web applications that you might be creating.  Based on experience, there are a couple of caveats that need to be understood before you head down this path.</p>
<p>Firstly, performance on Mobile Web map controls is not to par with native controls.  Using Google Maps in Safari on iOS seems sluggish when comparing it to using MapKit in a native iOS application.  I&#8217;m not sure what optimizations have been done in MapKit to give it the performance it has, but the difference is quite noticeable.  As a result, if your application has a fundamental need to do a lot of mapping (i.e. if this is it&rsquo;s primary function) you may want to consider a hybrid approach where you navigate to native pages for the mapping as part of your application.</p>
<p>Secondly, the web control for Google Maps (and this probably applies to other mapping controls) likes to &ldquo;own&rdquo; the page &ndash; which can put it into conflict with UI frameworks such as jQuery Mobile.  For example, when you change pages in jQuery Mobile, the DIV element of your current page is set to hidden, and the DIV element of the new page to block.  If your map control is embedded on a page that gets set to hidden this can cause Google maps to have a hard time.  We&#8217;ve experienced random behavior such as the map control not updating or repainting correctly when it is brought back into focus.  This can be overcome by an event on the page load to refresh the map canvas (example below), but it&rsquo;s one of those bugs that takes a lot longer to find than it does to fix.</p>
<p><code>$(&lsquo;#mappage&rsquo;).live(&lsquo;pageshow&rsquo;, function() { google.maps.event.trigger(map, &lsquo;resize&rsquo;); });</code></p>
<p><strong>Think ahead for non-standard UI elements you are likely to need<br />
</strong></p>
<p>While frameworks such as jQuery Mobile will provide standard controls such as buttons, lists, labels, and radio boxes, your application will likely have a need for elements and controls that are non-standard.  These can include tables, grids, and image carousels to name a few.  Many of these can be created using custom controls, but before going down that path, I always try and ask myself two questions:</p>
<p>Firstly, if the control does not exist, does that mean a better UI nuance is available for the device?  For example, there are few mobile web controls for displaying datagrids on mobile devices.  Rather than force-fitting a solution that might not work well on a 3.2&#8243; screen, think about what alternative solutions could be used instead.  For example, maybe a series of cascading list controls would actually provide for a better user experience over some custom hacked-together table control.  When in doubt, try to look at how other mobile applications have used controls to represent a similar data set.  <br/>
</p>
<p>Secondly, if the control does seem to fit, but it&rsquo;s just not included in the standard UI framework that you&#8217;ve chosen, think about searching for a third party solution before re-creating something new.  This can apply to image carousels (<a href="http://www.photoswipe.com/">PhotoSwipe</a> is one of my favorite controls for doing this) as well as charting (there are several really good JS based charting controls out there).</p>
<p><strong>Make your mobile web app look and feel like it belongs with native applications.<br />
</strong></p>
<p>Why not go that extra step and have your mobile application look like it belongs with other native applications on the device?  A couple of small recommendations for this one:</p>
<p>Firstly, never show the address bar in your mobile application.  Simply use a &lt;viewport…/> tag to have your application run in full screen mode.  The user will still be able to get to the address bar, but it will be hidden from view by default.  (side note &ndash; jQuery Mobile now performs this automatically without the need to do &ldquo;scroll to&rdquo; events in JavaScript).</p>
<p>Secondly, if you are targeting iOS devices, consider using Cubiq&rsquo;s <a href="http://cubiq.org/add-to-home-screen">AddToHome</a> JS library.  This is an excellent add on that will display instructions for the user to add the application to the iOS home screen, enabling the application to have it&rsquo;s own icon and run completely full screen when launched.</p>
<p><strong>Don&rsquo;t go creating your own username and password database<br />
</strong></p>
<p>Have users sign on to your application can be very useful for security of the application and for storing preferences and other settings.  Unless you have a very strong reason however, I recommend that you avoid creating your own username and password database for your application.  Doing so can seem really easy at first, but as your application gets more popular you&#8217;ll be left with a nightmare situation of having to deal with registration issues, password resets, and all of the other administration that comes with owning your own identity provider.</p>
<p>If you are building a mobile web application for the enterprise, I suspect you&#8217;ll already be thinking about this &ndash; either hooking in to an existing Active Directory instance or other identity provider (although you&#8217;ll likely need to consider how this will work outside the firewall when your mobile users are accessing your application via a public connection).<br/>
</p>
<p>If you are building a public-facing application however, an efficient solution can be to federate with an existing identity provider.  Chances are your users already have a Google, Yahoo, or Facebook account.  Why not take advantage of this and use this sign-in information to authenticate the user for your application?  This can be done in a couple of different ways &ndash; either with a native SDK from one of the providers &ndash; or using a federated service such as Microsoft Azure&rsquo;s <a href="http://acs.codeplex.com/">Access Control Service</a>.  This is a simple service to setup, which will enable you to configure a list of providers and returns a bag of claims to your application which you can use to match up with a list of settings, preferences, etc.  There are a few caveats with this approach, especially as some of the providers return the information via a post back (which can really upset your mobile application if you&#8217;ve pre-fetched all of the pages in to the DOM beforehand).  This is something that I&#8217;ve written previously about in <a href="http://simonguest.com/2011/08/13/authenticating-with-google-facebook-and-others-from-your-jquerymobile-application/">this post</a>.</p>
<p><strong>Make your Mobile Web application perform well<br />
</strong></p>
<p>It might sound obvious, but if you want your Mobile Web application to come anywhere near to the performance of a native application, you&#8217;ll want to keep a keen eye on performance.  Generally, I&#8217;ve found there are three main causes of bad performance in Mobile Web applications:</p>
<p>First is server-side generation of the UI and round tripping (as discussed in the point on client-side JavaScript earlier).  If you are generating any of the UI on the server-side or making any synchronous server-side calls, you are more than likely to run in to trouble.</p>
<p>Second is too many CSS effects/transitions.  Many of the UI frameworks, including jQuery Mobile, include several page transitions for when the user navigates between different pages.  Unless you are exclusively targeting iOS devices, I would recommend turning all of these off.  Many of the older Android devices don&rsquo;t implement a version of Webkit that supports hardware acceleration &ndash; plus they are running on less capable hardware &ndash; so to avoid creating an application that stutters on Android devices, it&rsquo;s best to disable any transitions and effects.</p>
<p>Finally, watch out for too many registered JavaScript events (especially on the class level).  The JavaScript performance on mobile browsers can be much lower than desktop equivalents, and if you are not careful you can end up where the performance of the browser is being compromised by too many registered events.  Often this will only add 100ms to various events, but combine this with specific events (such as a button tap) that must immediately navigate to another page, any delay over 100ms might be enough that your user thinks that the button wasn&rsquo;t pressed correctly.  They&#8217;ll press it again, and before you know it you have two JavaScript navigation events that you&#8217;ll need to handle.<br/>
</p>
<p><strong>Wrapping up<br />
</strong></p>
<p>A bit of a lengthy post, but I hope that this is useful if you are heading down the path of developing Mobile Web applications.  If you&#8217;d like more information on this, or maybe to share with colleagues, I&#8217;ve uploaded <a href="http://www.slideshare.net/simonguest/top-ten-tips-for-html5mobile-web-development">this presentation</a> to SlideShare that goes through the above list in some detail.</p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2012/04/12/tips-tricks-and-recommendations-for-html5mobile-web-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Neudesic is Hiring!</title>
		<link>http://simonguest.com/2012/01/20/come-work-for-neudesic/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=come-work-for-neudesic</link>
		<comments>http://simonguest.com/2012/01/20/come-work-for-neudesic/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 15:09:39 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Neudesic]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://simonguest.com/?p=472</guid>
		<description><![CDATA[Are you passionate about developing applications for mobile devices? Do you have deep experience with either iOS, Android, Windows Phone 7, or Mobile Web? Would you like to be involved in some of the coolest mobile projects for organizations? If the answer to the above is yes, we&#8217;d love to hear from you. We are [...]]]></description>
			<content:encoded><![CDATA[<p>Are you passionate about developing applications for mobile devices? Do you have deep experience with either iOS, Android, Windows Phone 7, or Mobile Web? Would you like to be involved in some of the coolest mobile projects for organizations?</p>
<p>If the answer to the above is yes, we&#8217;d love to hear from you. We are looking for developers with mobile experience in all regions of the US. Developers that can work 1:1 with clients to help design, develop, and deliver innovative mobile applications across all platforms, with the following skills and experience:</p>
<ul>
<li>At least 7 years of experience in software development, with at least the last 2 involved in mobile application development.</li>
<li>Core competency in developing applications for one primary mobile platform &#8211; either iOS, Android, Windows Phone 7, or Mobile Web (jQuery Mobile) – with a knowledge and understanding of the other mobile platforms.</li>
<li>Strong customer facing and presentation skills – ability to lead a mobile software development project with minimal direct supervision.</li>
<li>Knowledge of enterprise application development on the Microsoft platform (WCF, XML Web Services, SQL Server, .NET Framework, IIS).</li>
<li>Experience of working in an agile environment, working with a team against an active product backlog, following TDD (Test Driven Development) approaches, and committing to daily scrums and weekly sprint reviews with customers.</li>
</ul>
<p>In return, you&#8217;ll get to work on projects with some of the smartest people in the industry, using the latest mobile technologies and tools that push your skills and knowledge to the limit. You&#8217;ll do this in a working environment that you control – you dictate how best to structure your work to get the job done. You&#8217;ll also have the opportunity to shine as a thought leader in the community – many of us at Neudesic at MVPs, RDs, speakers, and authors.</p>
<p>Want to learn more? Contact me directly at simon/dot/guest/at/neudesic/dot/com</p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2012/01/20/come-work-for-neudesic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extracting and Using Facebook OAuth Token from ACS</title>
		<link>http://simonguest.com/2011/11/11/extracting-and-using-facebook-oauth-token-from-acs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=extracting-and-using-facebook-oauth-token-from-acs</link>
		<comments>http://simonguest.com/2011/11/11/extracting-and-using-facebook-oauth-token-from-acs/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 13:23:39 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Neudesic]]></category>

		<guid isPermaLink="false">http://simonguest.com/2011/11/11/extracting-and-using-facebook-oauth-token-from-acs/</guid>
		<description><![CDATA[A couple of my previous blog posts have shown how AppFabric ACS (Access Control Service) can be used as part of the Windows Azure Toolkit for iOS to enable federated authentication with Facebook, Google, Yahoo, and other providers. I was recently asked whether it’s possible to extract an OAuth token as part of the ACS [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of my previous blog posts have shown how AppFabric ACS (Access Control Service) can be used as part of the Windows Azure Toolkit for iOS to enable federated authentication with Facebook, Google, Yahoo, and other providers.</p>
<p>I was recently asked whether it’s possible to extract an OAuth token as part of the ACS sign in process that can then be presented to Facebook’s Graph API in order to access details such as friends lists, photos, etc. In this post, I&#8217;ll cover how this can be done.</p>
<p>The first step is of course to display the authentication page. As you&#8217;ve seen in previous posts, this can be achieved using the following:</p>
<pre>WACloudAccessControlClient *acsClient = [WACloudAccessControlClient accessControlClientForNamespace:@“iostest-walkthrough” realm:@“uri:wazmobiletoolkit”];

[acsClient showInViewController:self allowsClose:NO withCompletionHandler:^(BOOL authenticated) { if (!authenticated) { NSLog(@"Error authenticating"); } else { WACloudAccessToken *token = [WACloudAccessControlClient sharedToken]; NSString *securityToken = [token securityToken]; ... }
}];</pre>
<p>In the application, this will display the federated login dialog, and prompt the user to enter their Facebook credentials.</p>
<p><img src="http://simonguest.com/wp-content/uploads/2011/11/myWPEdit_Image_1321045984.jpg" alt="myWPEdit Image" /></p>
<p>You&#8217;ll notice that the ACS client returns a cloud access token, of which a security token can be extracted. This security token is a set of claims returned from ACS. Here’s an example:</p>
<pre>http://schemas.microsoft.com/ws/2008/06/identity/claims/expiration=2011-11-11T22:00:00.3593475Z&amp;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress=me%40simonguest.com&amp;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name=Simon+Guest&amp;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier=677830765&amp;http://www.facebook.com/claims/AccessToken=AAADWLwgHWSUBABBXdxbhJB0ZBtA3VOfPSsqzKKwObAtW2rb8EGGTQ8EvnvAdNOcZAGpKfV2gSGbNg7f0gxk4BhI1rhzKEn17VLw343gZDZD&amp;http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider=Facebook-235497486506277&amp;Audience=uri:wazmobiletoolkit&amp;ExpiresOn=1321044986&amp;Issuer=https://iostest-walkthrough.accesscontrol.windows.net/&amp;HMACSHA256=bnvyPmX4/PcWhiImgVVIvSqwHpc4cfi0vI6%2b/BSDK0Q%3d</pre>
<p>If we want to make follow on calls to Facebook’s Graph API, we are going to need to present the Facebook User ID and an OAuth Token. Fortunately both of these can be extracted from the token.</p>
<p>To extract this, we first HTTP encode the token:</p>
<pre>NSMutableArray *httpEncoding = [NSMutableArray arrayWithObjects:[NSArray arrayWithObjects:@"%3a",@":",nil], [NSArray arrayWithObjects:@"%2f",@"/",nil], nil]; 

while ([httpEncoding count] &gt;= 1) { securityToken = [securityToken stringByReplacingOccurrencesOfString:[[httpEncoding objectAtIndex:0] objectAtIndex:0] withString:[[httpEncoding objectAtIndex:0] objectAtIndex:1]]; [httpEncoding removeObjectAtIndex:0]; }

NSError *error = NULL;</pre>
<p>Using a simple RegEx search we can extract the Facebook User ID:</p>
<pre>NSRegularExpression regex = [NSRegularExpression regularExpressionWithPattern:@“http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier=([0-9])” options:0 error:&amp;error];
NSTextCheckingResult *match = [regex firstMatchInString:securityToken options:0 range:NSMakeRange(0, [securityToken length])]; firstRange = [match rangeAtIndex:1]; fbuserId = [securityToken substringWithRange:firstRange];</pre>
<p>And the required OAuthToken:</p>
<pre>regex = [NSRegularExpression regularExpressionWithPattern:@“http://www.facebook.com/claims/AccessToken=([A-Za-z0-9]*)” options:0 error:&amp;error];

match = [regex firstMatchInString:securityToken options:0 range:NSMakeRange(0, [securityToken length])];
NSRange firstRange = [match rangeAtIndex:1];
oauthToken = [securityToken substringWithRange:firstRange];
</pre>
<p>Now it’s just a case of calling the Graph API using these credentials:</p>
<pre>NSString *graphURL = [NSString stringWithFormat:@“https://graph.facebook.com/%@/friends?access_token=%@”,fbuserId,oauthToken];</pre>
<p>For the purposes of this post, let’s take a quick look at my list of friends.</p>
<pre>NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:graphURL]];
NSURLResponse *response = NULL;
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error];
NSString *friendsList = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
regex = [NSRegularExpression regularExpressionWithPattern:@“id” options:0 error:&amp;error];
NSUInteger friendCount = [regex numberOfMatchesInString:friendsList options:0 range:NSMakeRange(0, [friendsList length])];</pre>
<p>Displaying the friend count in a UIAlertView on the screen shows how popular (or not!) I am:</p>
<p><img src="http://simonguest.com/wp-content/uploads/2011/11/myWPEdit_Image_1321046009.jpg" alt="myWPEdit Image" /></p>
<p>A simple example, but hopefully this shows not only that you can authenticate against Facebook using AppFabric ACS, but also how the returned Facebook User ID and OAuth Token can be used to make further calls to Facebook using the user’s credentials.</p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2011/11/11/extracting-and-using-facebook-oauth-token-from-acs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with the Windows Azure Toolkit for Android</title>
		<link>http://simonguest.com/2011/10/21/working-with-the-windows-azure-toolkit-for-android/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=working-with-the-windows-azure-toolkit-for-android</link>
		<comments>http://simonguest.com/2011/10/21/working-with-the-windows-azure-toolkit-for-android/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 15:16:18 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Neudesic]]></category>

		<guid isPermaLink="false">http://simonguest.com/2011/10/21/working-with-the-windows-azure-toolkit-for-android/</guid>
		<description><![CDATA[At the end of August, Microsoft published the Windows Azure Toolkit for Android. At Neudesic, the partner behind developing the both toolkits for iOS and Android, we&#8217;ve been working with customers that use the toolkit to connect mobile applications to the cloud. One of the recent requests however has been to provide a walkthrough of [...]]]></description>
			<content:encoded><![CDATA[<p><small>At the end of August, Microsoft </small><a href="http://www.zdnet.com/blog/microsoft/microsoft-rolls-out-windows-azure-toolkit-for-android/10503"><small>published</small></a><small> the Windows Azure Toolkit for Android. At Neudesic, the partner behind developing the both toolkits for iOS and Android, we&#8217;ve been working with customers that use the toolkit to connect mobile applications to the cloud. One of the recent requests however has been to provide a walkthrough of getting started with the toolkit. The current build on </small><a href="http://github.com/microsoft-dpe"><small>GitHub</small></a><small> was released for a specific version of Eclipse and the Android tools, and as a result, can be a little challenging getting the library and sample code up and running.<br />
</small> <small> </small><br />
<small>In this post, I&#8217;ll explain what it takes to download the toolkit, create a brand new environment in Eclipse, and get started quickly with the toolkit.<br />
</small> <strong><small> </small></strong><br />
<strong><small>Getting Started – What You&#8217;ll Need</small></strong><small><br />
</small> <small> </small><br />
<small>Firstly, there is a list of tools that you&#8217;ll need to download.<br />
</small> <small> </small><br />
<small>1. </small><strong><small>Eclipse.</small></strong><small> Download from http://eclipse.org – we&#8217;ll be using Helios in this tutorial.<br />
</small><br />
<small>2. </small><strong><small>JDK. </small></strong><small> We&#8217;ll be using the default that ships with Mac OSX, but if you are on a PC, you&#8217;ll need JDK 1.6 or higher.<br />
</small><br />
<small>3. </small><strong><small>Android SDK and Eclipse Tooling.</small></strong><small> Download the Android SDK from http://developer.android.com (we are using r14 for this walkthrough). Also follow the instructions for configuring the Android tooling within Eclipse. After you have installed everything, use the AVD manager to setup a new AVD for an Android 2.3.3 device.<br />
</small> <small> </small><br />
<strong><small>Setting Up the Library in Eclipse<br />
</small></strong> <strong><small> </small></strong><br />
<small>To import and build the library in Eclipse, perform the following steps.<br />
</small> <small> </small><br />
<small>1. Download the Windows Azure Toolkit for Android from GitHub. If you have the Git client installed, you can use this command:<br />
</small> <small> </small><br />
<small>git clone https://github.com/microsoft-dpe/wa-toolkit-android<br />
</small> <small> </small><br />
<small>Otherwise, go to the site and pull down the zip file of the repo.<br />
</small> <small> </small><br />
<small>2. Create a new directory for your Eclipse workspace:<br />
</small> <small> </small><br />
<small>mkdir wa-toolkit-android-workspace<br />
</small> <small> </small><br />
<small>3. Launch Eclipse, and point the default workspace to this newly created directory:<br />
</small> <small> </small><br />
<small><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234031.jpg" alt="myWPEdit Image" /></small><small>￼</small></p>
<ol>
<li>Create a new Android project called <strong>AzureLibrary</strong>, set the target to Android 2.3.3, use <strong>com.microsoft.cloud.android</strong> as the package name, but do not create an activity or test project.</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234174.jpg" alt="myWPEdit Image" /></p>
<ol>
<li>Right click on the AzureLibrary project and select <strong>Import</strong>. Choose <strong>General</strong> / <strong>File System</strong> as the import source, and click on <strong>Next</strong>.</li>
<li>Browse to the /library/src/com folder in the toolkit folder that you downloaded from GitHub.</li>
<li>Click on the <strong>Browse (into folder) </strong>button and select the src folder under your project. Expand the <strong>src</strong> folder, and check the <strong>com </strong>folder as shown in this screenshot:</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234318.jpg" alt="myWPEdit Image" /></p>
<ol>
<li>Click on the Finish button. The import will complete.</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234368.jpg" alt="myWPEdit Image" /></p>
<ol>
<li>Right click on the project, select properties, and change the Java compiler version from 1.5 to 1.6. (The default is 1.5, yet the toolkit uses many constructs only supported in 1.6)</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234440.jpg" alt="myWPEdit Image" /></p>
<ol>
<li>Click OK, and say <strong>yes</strong> to rebuilding the project. The project should now build with no errors.</li>
<li>Assuming everything builds correctly, right click on the project, and select Properties again. Go to the Android setting, and click on the <strong>Is Library</strong> check box.</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234507.jpg" alt="myWPEdit Image" /></p>
<p><strong>Setting Up the Sample Application in Eclipse<br />
</strong></p>
<p>To import and build the sample application in Eclipse, perform the following steps:</p>
<ol>
<li>Create a new Android project called <strong>AzureSample</strong>. Select Android 2.3.3, set the namespace to <strong>com.windowsazure.samples.sample</strong>, and choose not to create an activity.</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234644.jpg" alt="myWPEdit Image" /></p>
<ol>
<li>As you did with the library, right click on the project, and select <strong>Import</strong>. Select the <strong>/samples/simple/src</strong> as the source and import into the <strong>AzureSample/src</strong> folder.</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234748.jpg" alt="myWPEdit Image" /></p>
<ol>
<li>Right click on the project, select <strong>Properties</strong>, select <strong>Android</strong> and add a reference to the <strong>AzureLibrary</strong> project:</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234806.jpg" alt="myWPEdit Image" /></p>
<ol>
<li>Right click on the project, select <strong>Import</strong>. Import from the <strong>/samples/simple/res</strong> folder into the <strong>AzureSample/res</strong> folder. This will import the resources required for the sample application.</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234884.jpg" alt="myWPEdit Image" /></p>
<p>Answer <strong>yes </strong>when prompted to overwrite the <strong>main.xml</strong> file.</p>
<ol>
<li>Right click on project, select <strong>Import</strong> and select the file system again. Select the <strong>AndroidManifest.xml</strong> from the root of the source directory and import into the root of the destination project.</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319234988.jpg" alt="myWPEdit Image" /></p>
<p>The Sample project should now build with no errors.</p>
<p><strong><br />
</strong><br />
<strong>Configuring your Windows Azure Account Name and Key<br />
</strong></p>
<p>In order to setup the sample project, you need to supply your account name and key, as provided by Windows Azure. You can obtain this by logging into the Windows Azure Portal (http://windows.azure.com) and navigating to Storage Accounts to obtain the details.</p>
<p>When you have the name and key, perform the following:</p>
<ol>
<li>In the sample project, open <strong>ProxySelector.java</strong> from the <strong>src/com.windowsazure.samples.sample</strong> package.</li>
<li>At the top of the file replace the <strong>ACCOUNT</strong> and <strong>ACCESS_KEY</strong> values with the account name and access key for your Azure storage account.</li>
</ol>
<p>&nbsp;</p>
<p><strong>Running the Sample</strong><strong><br />
</strong><br />
1. To run the sample, right click on the sample project, select <strong>Run As / Android Application.</strong></p>
<ol>
<li>Once the emulator is up and running, unlock the device.</li>
<li>Refer to the LogCat/Console window in Eclipse if there are any errors.</li>
<li>Click on the Start button in the sample application.</li>
<li>Select either table, blob, or queue storage and browse the storage associated with your Windows Azure account.</li>
</ol>
<p><img src="http://simonguest.com/wp-content/uploads/2011/10/myWPEdit_Image_1319235204.jpg" alt="myWPEdit Image" /></p>
<p>That’s it! Your sample application is now up and running, and you are able to browse Windows Azure storage!</p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2011/10/21/working-with-the-windows-azure-toolkit-for-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading your Windows Phone 7 to Mango RC</title>
		<link>http://simonguest.com/2011/08/23/upgrading-your-windows-phone-7-to-mango-rc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=upgrading-your-windows-phone-7-to-mango-rc</link>
		<comments>http://simonguest.com/2011/08/23/upgrading-your-windows-phone-7-to-mango-rc/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 21:41:50 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Neudesic]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://simonguest.com/?p=428</guid>
		<description><![CDATA[In late July, Microsoft announced availability of a new build of Mango, build 7712 – also commonly known as the RC Build.  Given that we are close to RTM, yet it may still take carriers some time before deploying Mango to your device, you might be itching to try out the new bits.  If you [...]]]></description>
			<content:encoded><![CDATA[<p>In late July, Microsoft <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/07/27/wpsdk-beta-2-refresh-for-mango-devs.aspx">announced</a> availability of a new build of Mango, build 7712 – also commonly known as the RC Build.  Given that we are close to RTM, yet it may still take carriers some time before deploying Mango to your device, you might be itching to try out the new bits.  If you are, but don’t know where to start, I’ve put together this quick guide based on my own experience of updating my phone, an AT&amp;T Samsung Focus.  Note: As you would expect, if you do decide to upgrade your phone, this is entirely at your own risk.</p>
<p>Before you begin, you’ll need a few things:</p>
<p>1.  A Windows Phone 7 device with all of the current updates (a.k.a. NoDo) installed.  Double check the updates in the Zune application to make sure everything is up to date.  You should see that your WP7 build number is 7390.</p>
<p>2.  Zune Software 4.7.1404.  Although 4.8 was released yesterday, you won’t be able to do the update with this version (yet).  Download 4.7.1404 from <a href="http://www.microsoft.com/download/en/details.aspx?id=23771">here</a> if needed.</p>
<p>3.  Windows Phone 7 Support Tools.  You can download this from here (<a href="http://download.microsoft.com/download/1/5/4/15427EAF-AD42-4E4A-8179-9A3C5483E366/WPSupportTool-x86.msi">32bit</a>, <a href="http://download.microsoft.com/download/1/5/4/15427EAF-AD42-4E4A-8179-9A3C5483E366/WPSupportTool-amd64.msi">64bit</a>).  Run the installer, but you don’t need to run the application.</p>
<p>4.  Enough battery power to get you through several updates (when the phone is updating, your device isn’t being charged).  I would avoid trying this with anything less than 50% charge.</p>
<p>5.  The mango update tools.  If you are a registered Windows Phone 7 developer, you can supposedly download these from the Microsoft Connect site.  If you are not (or like me you are, but couldn’t find the tools on Connect), you can find a version of the tools on <a href="http://windowsphonehacker.com/articles/how_to_get_mango_beta_2_for_nondevelopers-07-31-11">this site</a>.  (Note:  Follow Step 1, and yes, you have to wait for 45 seconds for the download link to work).</p>
<p>With all of the above in place, run the <strong>Update.bat</strong> from the Mango update tool download.  Assuming there are no errors, you should see something similar to the following.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/image2.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://simonguest.com/wp-content/uploads/2011/08/image_thumb2.png" alt="image" width="244" height="164" border="0" /></a></p>
<p>Firstly, the tool will make a backup of your device to the c:\PreMangoState2 directory, and install the updates necessary for your device to receive the pre-release Mango bits.  The time this will take may vary, but on my machine it took 112 seconds to backup, and 70 seconds to update the device.</p>
<p>Once the batch file completes, and the device reboots, the Zune software should automatically launch.  You’ll be shown that an update is available (likely build 7403).</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/image3.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://simonguest.com/wp-content/uploads/2011/08/image_thumb3.png" alt="image" width="244" height="168" border="0" /></a></p>
<p>Choose to install this, which will then download the Zune 4.8 software.  After the Zune software has been updated, the phone will be updated to 7403, which should be a fairly quick update.</p>
<p>As the phone reboots once more, the Zune software will do another check – and this time will pick up the 7712 build, which is Mango RC.  Choose to download and install this one.  This is where the battery power is important, as this install can take quite a bit of time to complete (let’s just say that I’ve been able to pen this blog post, and it’s still not 75% of the way there!).</p>
<p>Be patient though – one final reboot, and you’ll be running the latest Mango RC (Build 7712) bits!  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2011/08/23/upgrading-your-windows-phone-7-to-mango-rc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Authenticating with Google, Facebook, and others from your jQueryMobile Application</title>
		<link>http://simonguest.com/2011/08/13/authenticating-with-google-facebook-and-others-from-your-jquerymobile-application/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=authenticating-with-google-facebook-and-others-from-your-jquerymobile-application</link>
		<comments>http://simonguest.com/2011/08/13/authenticating-with-google-facebook-and-others-from-your-jquerymobile-application/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 05:13:20 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://simonguest.com/2011/08/13/authenticating-with-google-facebook-and-others-from-your-jquerymobile-application/</guid>
		<description><![CDATA[In my last post, I showed how to implement authentication using Google, Facebook, etc. for your iOS application – using the Windows Azure Toolkit for iOS.&#160; This works well for iPhone applications written in Objective C, but what if you are developing a Web based mobile applications that span multiple platforms?&#160; Given that everything is [...]]]></description>
			<content:encoded><![CDATA[<p>In my last post, I showed how to implement authentication using Google, Facebook, etc. for your iOS application – using the <a href="http://github.com/microsoft-dpe">Windows Azure Toolkit for iOS</a>.&#160; This works well for iPhone applications written in Objective C, but what if you are developing a Web based mobile applications that span multiple platforms?&#160; Given that everything is using Web pages, you would hope that it would be a little easier, but things can get tricky &#8211; especially if you are using jQueryMobile.&#160; </p>
<p>Having implemented this a couple of times now, here is a rough guide of how to integrate AppFabric ACS (Access Control Service) authentication into a jQueryMobile application. (There is already a ton of documentation of both jQueryMobile and ACS, so I’m assuming that you understand the basics of how these both work).&#160;&#160;&#160; </p>
<p><strong>Step 1:&#160; Create your own provider selection screen</strong></p>
<p>When you first start playing around with using ACS on mobile web browsers, the first thing you&#8217;ll notice is that the default login page isn&#8217;t that nice.&#160; </p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/image.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://simonguest.com/wp-content/uploads/2011/08/image_thumb.png" width="129" height="244" /></a></p>
<p>While the functionality of logging in will work, users have to pinch zoom to be able to read the buttons, which isn&#8217;t a great experience.&#160; It also doesn&#8217;t fit in with any jQueryMobile theme that you may have created.&#160; To overcome this, we can create our own provider screen.&#160; </p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/image1.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://simonguest.com/wp-content/uploads/2011/08/image_thumb1.png" width="132" height="244" /></a></p>
<p>To build something similar to the above, I&#8217;ve used a jQueryMobile <a href="http://jquerymobile.com/test/docs/pages/dialog-alt.html">Dialog</a> (which has an automatic border as well as a background effect).&#160; The basic code for the screen looks like the following:</p>
<pre class="brush:html">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Select Login Provider&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div data-role=&quot;dialog&quot;&gt;
        &lt;div data-role=&quot;header&quot;&gt;
            &lt;h1&gt;Select Login Provider&lt;/h1&gt;
        &lt;/div&gt;
        &lt;div data-role=&quot;content&quot;&gt;
            @{
                if (ViewBag.JSONProviders != null)
                    {
                    var providers = Json.Decode(ViewBag.JSONProviders);
                    foreach (var provider in providers)
                    {
                        &lt;button type=&quot;button&quot; onclick=&quot;javascript:window.location.href='@provider.LoginUrl'&quot;&gt;@provider.Name&lt;/button&gt;
                    }
                }
            }
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>As you can see from the above, the form is built by parsing a JSON object containing a list of identity providers and creating buttons for each provider – setting a name for a button and setting an on click action to the URL.&#160; (The above code uses the Razor-based syntax for&#160; ASP.NET MVC, but the same will work just by using JSON calls in regular Javascript).&#160; </p>
<p>Two things to note here:</p>
<p>1.&#160; It&#8217;s really important to use <strong>window.location.href</strong> instead of an &lt;a&gt; anchor when linking to the provider – otherwise you&#8217;ll break the AJAX model of your jQueryMobile app and a new browser window will be launched (which looks horrible, especially in full screen web applications).</p>
<p>2.&#160; You are probably asking yourself where the JSON objects actually come from.&#160; This brings us to our next point…</p>
<p><strong>Step 2:&#160; Make a call to the ACS JSON endpoint</strong></p>
<p>The buttons in the form are based on identity providers, which you likely setup when you configured ACS.&#160; These providers can be extracted as JSON objects using a JSON based endpoint that the ACS service providers.&#160; </p>
<p>Here&#8217;s the URL of the JSON endpoint for ACS v2.</p>
<p><a href="https://{0}.accesscontrol.windows.net/v2/metadata/IdentityProviders.js?protocol=wsfederation&amp;realm={1}&amp;reply_to={2}&amp;context=&amp;request_id=&amp;version=1.0">https://{0}.accesscontrol.windows.net/v2/metadata/IdentityProviders.js?protocol=wsfederation&amp;realm={1}&amp;reply_to={2}&amp;context=&amp;request_id=&amp;version=1.0</a></p>
<p>{0} is the namespace of your ACS service<br />
  <br />{1} is the realm within your ACS service </p>
<p>{2} is an optional URL (which must be HTML encoded) that specifies where to return the browser once authentication has been completed.&#160; Remember, if you are using AJAX navigation, then you&#8217;ll want to pass in the correct #-prefixed syntax.&#160; For example a return URL of the following:</p>
<p><a href="http://localhost/MyWebApp#/MyWebApp/Accounts">http://localhost/MyWebApp#/MyWebApp/Accounts</a></p>
<p>Will instruct the ACS service to return to the Accounts page in your jQueryMobile app.</p>
<p>Again, you can make the call to the JSON endpoint using Javascript, or if you are using ASP.NET MVC like in Step 1 I would recommend creating a controller action called Providers which passes the return JSON object in a ViewBag.&#160; </p>
<p><strong>Step 3:&#160; Launch the providers screen from your app</strong></p>
<p>Finally, once you have your provider screen created, you&#8217;ll need to call it when authentication is required.&#160; There are a couple of different ways of doing this – if you are using Javascript only, then create and maintain a variable called claims – which corresponds to the claims bag returned from the service (when the ACS service returns it does a post back to your application so that you can capture the claims).&#160; Secondly, if you are using ASP.NET MVC then you can create a second action on the Account controller called claims with something similar to the following:</p>
<pre class="brush:csharp">

public JsonResult Claims()
  {

&#160;&#160;&#160; return Json(string.Join(&quot;n&quot;, ((IClaimsIdentity)this.User.Identity).Claims.Select(c =&gt; c.ClaimType + &quot;: &quot; + c.Value).ToArray()));

}
</pre>
<p>This will return the claims bag directly from the User.Identity property from the controller.</p>
<p>Well, just a short overview, but if you are thinking of implementing Google and Facebook authentication in your jQueryMobile application, hopefully this has been of some help.</p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2011/08/13/authenticating-with-google-facebook-and-others-from-your-jquerymobile-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Federated Identity for iOS Applications</title>
		<link>http://simonguest.com/2011/08/01/using-federated-identity-for-ios-applications/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-federated-identity-for-ios-applications</link>
		<comments>http://simonguest.com/2011/08/01/using-federated-identity-for-ios-applications/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 08:45:42 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://simonguest.com/2011/08/01/using-federated-identity-for-ios-applications/</guid>
		<description><![CDATA[Last week, Microsoft released v1.2 of the Windows Azure Toolkit for iOS.&#160; As development partner for the toolkit, Neudesic has been working with several customers on implementing ACS for iPhone and iPad applications.&#160; Due to popular demand, I wanted to share a short overview of how simple it is to get this up and working [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, Microsoft released v1.2 of the Windows Azure Toolkit for iOS.&#160; As development partner for the toolkit, <a href="http://www.neudesic.com">Neudesic</a> has been working with several customers on implementing ACS for iPhone and iPad applications.&#160; Due to popular demand, I wanted to share a short overview of how simple it is to get this up and working for your own iOS projects.</p>
<p><b>First, some background…</b></p>
<p>Many iPhone and iPad applications have a need to authenticate.&#160; Maybe it&#8217;s to access sensitive information or record a particular high score against your name.&#160; Implementing an authentication scheme for iOS can however be time consuming and tricky – you often have to create an authentication service, host it, expose the service through REST, and consume it on the device.&#160; And afterwards you are responsible for backing up the user database and dealing with lost passwords, etc.</p>
<p>To help overcome this many applications are now turning to external providers.&#160; For example, to identify yourself when playing Zynga Poker, instead of creating a new account, you simply sign into Facebook (when launching the application for the first time) and the game uses these credentials as you play. This type of sign in method is called federated identity. This prevents Zynga from having to maintain a complex and large set of user accounts and passwords, and also prevents the player from having to remember yet another username and password.&#160; </p>
<p>Adding federated identity to your iPhone or iPad application can be difficult, requiring knowledge of exchange secure tokens with a set of providers, and creating and sending the right OAuth headers in your application.&#160; Removing this difficultly is exactly what we are trying to address in v1.2 of the Windows Azure Toolkit for iOS.&#160; </p>
<p><b>Sounds great – how do I use it?</b></p>
<p>To implement ACS in your application, you&#8217;ll first need to access the Windows Azure portal by navigating to <a href="http://windows.azure.com/">http://windows.azure.com</a> and signing in with your credentials. </p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image002.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image002_thumb.png" width="209" height="244" /></a></p>
<p>Click on the <b>Service Bus, Access Control &amp; </b>Caching menu item and select the <b>Access Control</b> menu item under the <b>AppFabric</b> folder.&#160; Select an active Windows Azure subscription and click on the <b>New</b> button in the toolbar.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image004.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image004_thumb.png" width="216" height="244" /></a></p>
<p>The new service namespace dialog will open.&#160; Ensure that <b>Access Control</b> is selected, and enter a unique namespace and country/region for the service.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image006.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image006_thumb.png" width="244" height="117" /></a></p>
<p>The ACS namespace will now be created.&#160; This might take a few minutes.&#160; Wait until the namespace is showing in an <b>Active</b> state.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image008.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image008_thumb.png" width="244" height="16" /></a></p>
<p>Once this is complete, highlight the newly created service and click on the <b>Access Control Service</b> button in the toolbar.&#160; This will launch the Access Control Service portal. </p>
<p>Within the portal, click on<b> Identity Providers </b>and add the identity providers you would like to use for your application.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image010.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image010_thumb.png" width="244" height="111" /></a></p>
<p>The default is Windows Live ID, but you can add other preconfigured providers (such as Google and Yahoo!) as well as external identity systems configured to use WS-Federation.</p>
<p>Once you have added the required providers, click on the <b>Relying Parties</b> section of the portal.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image012.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image012_thumb.png" width="244" height="76" /></a></p>
<p>Click on the <b>Add</b> button and enter the following information for the relying party application:</p>
<p><b>Name</b> – a given name for your application</p>
<p><b>Realm</b> – a unique ID for your application.&#160; For this walkthrough, we’ll be using uri:wazmobiletoolkit</p>
<p><b>Return URL</b> – you can leave this blank</p>
<p><b>Error URL</b> – you can leave this blank</p>
<p><b>Token Format</b> – select SWT</p>
<p><b>Token Lifetime</b> – Feel free to change the default from 600 seconds. </p>
<p>Select the identity providers that you would like to use, and then under the <b>Token Signing Settings</b> section, click on the <b>Generate</b> button to create a new symmetric key that will be used for this application.</p>
<p>Finally, click on the <b>Save</b> button.&#160; This will create the Relying Party Application.</p>
<p>Next, go into the <b>Rule Groups</b> section of the portal and select the default rule group that was created for the application.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image014.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image014_thumb.png" width="244" height="85" /></a></p>
<p>Click on the <b>Generate</b> link in order to generate a set of default rules for this rule group.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image016.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image016_thumb.png" width="244" height="39" /></a></p>
<p>Select the providers that you wish to use, and click on the <b>Generate</b> button.&#160; Once this is complete, you should see a set of rules.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image018.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image018" border="0" alt="clip_image018" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image018_thumb.png" width="244" height="82" /></a></p>
<p>After this step is complete, ACS has now been configured correctly to be used with your iOS application.&#160; Make a note of your Service Namespace (found at the top of the portal) and Realm.</p>
<p><b>Ok, the service is now setup.&#160; How do I use it in my Xcode project?</b></p>
<p>To start, launch Xcode (4.02 or higher) and create a new project.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image020.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image020" border="0" alt="clip_image020" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image020_thumb.png" width="244" height="167" /></a></p>
<p>From the project template dialog, select a <b>View-based application</b> and click on the <b>Next</b> button.&#160; Enter a <b>Product Name</b> and <b>Company Identifier</b> and click on the <b>Next</b> button to continue.&#160; Select a directory to use for the project file and return to the IDE.</p>
<p>Next, download the latest version of the Windows Azure Toolkit for iOS library from <a href="http://github.com/microsoft-dpe/watoolkitios-lib">http://github.com/microsoft-dpe/watoolkitios-lib</a>. In the download will be a zip file containing two versions of the library (one for the device, one for the simulator) and some header files for the project.</p>
<p>Right click on your project and select the <b>Add Files to…</b> menu option.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image022.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image022" border="0" alt="clip_image022" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image022_thumb.png" width="244" height="204" /></a></p>
<p>Locate the .a file (for the simulator) and header files and add them to your project.&#160; You may want to create a new group (called lib) to store these in.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image024.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image024" border="0" alt="clip_image024" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image024_thumb.png" width="244" height="198" /></a></p>
<p>Now we need to add a reference to a library required for XML parsing.&#160; To do this, click on the top most project file, click on the target in the 2nd column of the IDE, and select <b>Build Phases</b> from the tab menu. </p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image026.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image026" border="0" alt="clip_image026" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image026_thumb.png" width="244" height="44" /></a></p>
<p>In the main window, expand the <b>Link Binary with Libraries</b> option.</p>
<p>Ensure that the libwatoolkitios.a file has been automatically added as a reference, click the + button to add a new library, and select the libxml2.dylib library from the drop down list.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image028.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image028" border="0" alt="clip_image028" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image028_thumb.png" width="171" height="244" /></a></p>
<p>Click on the <b>Add</b> button to add a reference to this library for your project.</p>
<p>Before we start adding any code, we need to add a couple of required linker flags to the project.&#160; To do this, click on the <b>Build Settings</b> tab (next to Build Phases).</p>
<p>In the search box, type “other linker” to filter the settings.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image030.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image030" border="0" alt="clip_image030" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image030_thumb.png" width="244" height="36" /></a></p>
<p>You should see a setting called <b>Other Linker Flags</b>.&#160; Double click on the right side of this row to add new flags.</p>
<p>Click on the + button to add two flags.&#160; The first is <b>–ObjC</b> and the second is <b>–all_load</b>.&#160; Once complete, your linker flags should look like the following screenshot:</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image032.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image032" border="0" alt="clip_image032" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image032_thumb.png" width="244" height="58" /></a></p>
<p>Click on the <b>Done</b> button to save these settings.&#160; The project is now configured correctly to reference the Windows Azure Toolkit library.</p>
<p>To test that the library works, click on the project’s <b>[ProjectName]AppDelegate.m</b> file.&#160; Add the following #import statement at the top of the class:</p>
<p>#import &quot;WACloudAccessControlClient.h&quot;</p>
<p>Next, search for a method called <b>didFinishLaunchingWithOptions </b>and after the <b>[self.window makeKeyAndVisible]</b> line, enter the following code.</p>
<pre class="brush:c">

NSLog(@&quot;Intializing the Access Control Client...&quot;);

WACloudAccessControlClient *acsClient = [WACloudAccessControlClient accessControlClientForNamespace:@&quot;iostest-walkthrough&quot; realm:@&quot;uri:wazmobiletoolkit&quot;];

[acsClient showInViewController:self.viewController allowsClose:NO withCompletionHandler:^(BOOL authenticated) {

if (!authenticated)

&#160;&#160;&#160; {

NSLog(@&quot;Error authenticating&quot;);

&#160;&#160;&#160; }

else

&#160;&#160;&#160; {

NSLog(@&quot;Creating the authentication token...&quot;);

WACloudAccessToken *token = [WACloudAccessControlClient sharedToken];

/* Do something with the token here! */

&#160;&#160;&#160; }

}];
</pre>
<p>Replace the namespace and realm in the first line with the service namespace and realm for your own service.</p>
<p>As you can see from the above, the code creates a new instance of the access control client, requests that the client shows itself in the current view controller, and then extracts a token. </p>
<p>Build and run the application in the iOS Simulator. </p>
<p>Once the application starts, you should be prompted to select an identity provider from the list that you configured in your ACS service.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image034.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image034" border="0" alt="clip_image034" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image034_thumb.png" width="132" height="244" /></a></p>
<p>Pick one of the providers, and enter a valid set of credentials.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image036.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image036" border="0" alt="clip_image036" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image036_thumb.png" width="132" height="244" /></a></p>
<p>Click on the <b>Remember me</b> checkbox if you want to skip this step when running this application again, and click on the <b>Sign in</b> button.</p>
<p>The first time the application is run, you’ll be prompted to authorize the application to access your provider data.</p>
<p><a href="http://simonguest.com/wp-content/uploads/2011/08/clip_image038.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image038" border="0" alt="clip_image038" src="http://simonguest.com/wp-content/uploads/2011/08/clip_image038_thumb.png" width="132" height="244" /></a></p>
<p>Click on the <b>Allow</b> button to continue.&#160; The login window will now disappear and you’ll be returned to your application.</p>
<p>In the debug window, you should see the following two logs:</p>
<p>2011-07-22 10:12:26.284 iostest-walkthrough[25838:207] Intializing the Access Control Client&#8230;</p>
<p>2011-07-22 10:12:36.359 iostest-walkthrough[25838:207] Creating the authentication token&#8230;</p>
<p>If you are seeing this, congratulations!&#160; You&#8217;ve successfully setup federated identity for your application.&#160; The final message indicates that the access token was retrieved and can be used for further use.&#160; The <b>WACloudAccessToken</b> (derived from <b>[WACloudAccessControlClient sharedToken]</b>) contains an NSDictionary of claims and other properties that can be stored within your application.&#160; Using these properties on future calls can be used to identify returning users to your application.</p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2011/08/01/using-federated-identity-for-ios-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Visual Studio 2010 on the Mac</title>
		<link>http://simonguest.com/2011/05/27/running-visual-studio-2010-on-the-mac/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=running-visual-studio-2010-on-the-mac</link>
		<comments>http://simonguest.com/2011/05/27/running-visual-studio-2010-on-the-mac/#comments</comments>
		<pubDate>Fri, 27 May 2011 16:11:29 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://simonguest.com/2011/05/27/running-visual-studio-2010-on-the-mac/</guid>
		<description><![CDATA[Following a few recent presentations, I&#8217;ve had a couple of people ask how I run Visual Studio on the Mac. You&#8217;ll be sad to hear that I don&#8217;t have a special version of Visual Studio for Mac OSX &#8211; instead I am using VMWare Fusion 3.1 to run a copy of Windows 7 in a [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both">Following a few recent presentations, I&#8217;ve had a couple of people ask how I run Visual Studio on the Mac. </p>
<p style="clear: both">You&#8217;ll be sad to hear that I don&#8217;t have a special version of Visual Studio for Mac OSX &#8211; instead I am using VMWare Fusion 3.1 to run a copy of Windows 7 in a virtual machine. Fusion has a mode called &#8220;Unity&#8221; which allows windows from the virtual machine to interact with windows on the host operating system (even to the point where I can put icons for Windows-based applications in the dock on the Mac). There is a little performance hit running applications in this way vs. a full screen virtual machine, but it&#8217;s certainly useful for presentations where you are flipping between both environments. </p>
<p style="clear: both"><a href="http://simonguest.com/wp-content/uploads/2011/05/VSMac.png" class="image-link"><img class="linked-to-original" src="http://simonguest.com/wp-content/uploads/2011/05/VSMac-thumb.png" height="216" width="380" style=" text-align: center; display: block; margin: 0 auto 10px;" /></a></p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2011/05/27/running-visual-studio-2010-on-the-mac/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>More Slides from TechEd</title>
		<link>http://simonguest.com/2011/05/19/more-slides-from-teched/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=more-slides-from-teched</link>
		<comments>http://simonguest.com/2011/05/19/more-slides-from-teched/#comments</comments>
		<pubDate>Thu, 19 May 2011 20:59:43 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Neudesic]]></category>
		<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">http://simonguest.com/2011/05/19/more-slides-from-teched/</guid>
		<description><![CDATA[Additional thanks to those who attended my session this morning (DPR303 &#8211; Developing Enterprise-Grade Mobile Applications). I&#8217;ve uploaded the deck to SlideShare &#8211; you can find it at the bottom of this post.]]></description>
			<content:encoded><![CDATA[<p style="clear: both">Additional thanks to those who attended my session this morning (DPR303 &#8211; Developing Enterprise-Grade Mobile Applications). I&#8217;ve uploaded the deck to SlideShare &#8211; you can find it at the bottom of this post. </p>
<p style="clear: both"><span style=" display: inline; float: left; margin: 0 10px 10px 0;"><iframe src="http://www.slideshare.net/slideshow/embed_code/8027410" marginwidth="0" frameborder="0" height="317" scrolling="no" marginheight="0" width="380"></iframe></span></p>
<p><br class="final-break" style="clear: both" /></p>
]]></content:encoded>
			<wfw:commentRss>http://simonguest.com/2011/05/19/more-slides-from-teched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

