Windows Platform New App Versioning style #wpdev #uwp

Windows Store unification started a few days before the release of Windows 10. On 29th, I pushed an update out while waiting for Windows 10 upgrade – I had reserved by copy of Windows 10. While waiting, I continued with updates and having lost all patience, forced an update on the 30th.

I continued development using newly install VS 2015 and wanted to make an install I suddenly got this error “The version attribute of the Identity element must have a higher version number than ‘2015.729.2036.5893’

WTF ?? I tweeted angrily asking @VisualStudio what the heck was being added to StoreAssociation file..

Later that day, I reset my device and went back to VS 2013..nope it wouldn’t have any of it.. would still give me the same error as VS 2015. Who knows what the heck was happening.. I had little time and I haven’t heard from anyone so I continued with whatever it suggested.

On 1st August I encountered yet another problem with store.. this time.. “MakeAppx failed to open the package”. This time I asked on of the Microsofties to pull a few strings. They fixed that issue (AnyCPU was being read as ARM and ARM package wasn’t found so it failed) and in the thank you note, I mentioned that store was forcing timestamp based version. Non of those on the list commented so I assumed it was a cockup on my app since SL based 1Shot has no such issues.

store version error

Fast forward yesterday. I pushed on a new beta on a newly created store account. Today I wanted to update it and it fails with a similar message. I find support pages and chat with one of the support people. What am I told.. yes Timestamp based versioning is the new way in unified store. Sorry it wasn’t communicated and don’t know why it doesn’t hit SL apps but its all fine.

So it any of you lot develop with WinRT (many do I presume, you will face this issue soon).. just don’t format your machine like I did :)

Why can’t they just inform the developers ?? they find enough time to write boat loads of blogs about various things..

Coding4Fun Toolkit 2.1.1 released #wpdev #uwp

Coding4Fun toolkit 2.1.1 is now available for download.

Changes include

  • WinRT version of David Anson’s PlaceImage control
  • ToastPrompt control for Windows 8.1
  • Added SL 8 binaries though no new functionality is added

SL lib was added purely to just provide backward compat and to stop nuget manager from updating to latest version and removing support for it. Annoyed myself a few times already!

Happy coding

Edit: @Scottisafool the creator of SuperImage pointed out that it was built on top of PlaceImage and for that reason I have removed PlaceImage for now.

Custom Uri Scheme List – Old Nokia Dev cached copy #wpdev


Apps that register to handle (are associated with) a particular URI scheme can be launched from email, NFC tags, and other apps using the URI. Apps can additionally use parameters specified with their URI to open with additional context – for example a calendar app might open in the view for a specific month, a map app might open at a specific location, or a music app might open with song for a particular artist.

At time of writing the URI-to-app associations for the inbuilt apps and operating system have been documented. However there is no central registry for finding out URI associations and parameters for marketplace applications.

This article is intended as a place where developers can both find out URI schemes for other apps, and also link to the documentation for their own app schema.

Marketplace app schemes

Developer-supported schemes

This section is for URI schemes that developers have documented and committed to maintain. Add schemes with official documentation (and your own apps!)

URI App name Description/Link to documentation
AroundMe AroundMe Launches app to search for pictures at a specific locations
melodia melodia Alerts for Windows Phone 8.1, each app will need one.
super8 Super 8 More than 50 tools in one, and start menu is back.
cooltiles Cool Tiles More than 40 tools in one, and you can design tiles for tools.
metrotube Metrotube Launch Metrotube’s YouTube player from within your app
pocketbrain pocketBRAIN A beautiful and light-weight note-taking app.App launch: pocketbrain:
Create a new note: pocketbrain:newNote?title=…&text=…
Create a note with image attachement: pocketbrain:newNote?title={…}&text={…}&mediaLibIndex={index}
noteplus Note+ Launches MainPage. A simple yet delightful note-taking app.
stopwatchplus Stopwatch+ Launches MainPage. A simple yet delightful time-keeping app.
counterplus Counter+ Launches MainPage. A simple yet delightful tally counter app.
Foundbite Foundbite Foundbite URI Scheme
GeoPhoto GeoPhoto Launch to show photos on map
photoinfo Photo-Info A beautiful photo-hub extension app for image information
App launch: photoinfo:
Show image information: photoinfo:show?mediaLibIndex={index}
instagraph Instagraph Instagraph (Instagram™ sharing app) custom URI schema
wpcentral WPCentral Windows Phone Central direct URI schema
metrotour MetroTour MetroTour URI Protocol
spotify Spotify Linking to Spotify
mehdoh Mehdoh Mehdoh URI schema
flitsnav Flitsservice FlitsNav Launches Flitsservice FlitsNav (no parameters available yet).
pictureslab Pictures Lab Pictures Lab URI schema
gmaps gMaps gMaps URI schema
Geosense Geosense Geo URI schema
ts-keyring Keyring Keyring URI schema – your private password safe on your phone, doesn’t need a data connection so no one can spoof – now with NFC.
me-zeitungen Newspapers Newspapers URI schema – read newspapers around the world
sixtag 6tag How to upload a picture on instagram from your app using 6tag
reedability Reedability Reedability URI schema/protocol – unofficial client
My 500px My 500px My 500px Free My 500px URI schema View/search/upload photos to 500px
tiwahu-lma Live Music Access Live Music Access direct URI schema/protocol – Browse, search, and stream 100K+ concert recordings from the Live Music Archive (etree) collection.
pcast P | Cast P | Cast direct URI schema/protocol – Normal or Car Mode, start or play immediately a recent or random track. Also supports the common wp-podcast URI scheme for play/pause/skip next/skip previous control, available on NuGet and GitHub.
mix-play-share Mix Play & Share simple launch with no parameters of Mix Play & Share app
car-starter Car Starter Parameterless Launch URI for Windows Phone Dashboard App Car Starter
domainchecker Domain Checker Domain Checker URI schema Note: Available from version 2.0.0
podcastlounge Podcast Lounge Podcast Lounge URI Schema Note: Available from version 1.9.7 onwards
carstand CarStand Launch with parameter “carstand:?mainpage” to open startup page.
tasks Tasks Tasks Uri Schema Note: Available from version 1.81 onwards.
nfctoolkit NFC Toolkit with version 0.9.8 app allows other developers to add their app to the launch app list in profiles – version introduces nfctoolkit:writeapp to enable writing on NFC tags from your app/ plain launch: nfctoolkit:home – documentation:
ProShot ProShot Documentation
BringCast BringCast Supports the common wp-podcast URI scheme for play/pause/skip next/skip previous control, available on NuGet and GitHub.
weathertogo Weather To-Go Launch: “weathertogo:”; Select layout: “weathertogo:weather?layout=[0-1]”; Settings: “weathertogo:settings”
settingstogo Settings To-Go Launch: “settingstogo:”; Open setting: “settingstogo:open?setting[1-9]”; Open flashlight: “settingstogo:open?setting=100”
I’m Here I’m Here Launch app “imhere:”, launch and share options “imhere://share/text”, “imhere://share/email”, “imhere://share/social”, “imhere://share/whatsapp”
enlesssoft-battery Battery Documentation
enlesssoft-flashlight Flashlight Documentation
enlesssoft-birthdays Birthdays Documentation
enlesssoft-history History Documentation
enlesssoft-holidays Holidays Documentation
conference-calleague Conference Calleague Documentation Parse meeting invites for conference call dial-in information and initiate dialing
GPS monitor GPS monitor Documentation Show webcam retrieved through webcams-travel. Through the schema uri, you can open the apps, and see webcam nearby a point.
mxm musiXmatch lyrics player Documentation
Cineworld cineworld cinemas app The following Uri schemas are supported.
the film requires use of cineword EDI

Community Schemes

This section is for URI schemes that are used by more then one app, usually apps that share some similar functionality. These schemes should be well documented.

URI Apps Description/Link to documentation
Pocket Squirrel Poki Pouch OwlReader Pock8 Common uri scheme to use for adding links to Pocket. Learn more:
wp-podcast BringCastP Cast The common wp-podcast URI scheme for play/pause/skip next/skip previous control, available on NuGet and GitHub.

Unofficial schemes

This page is for schemes where the support of the developer has not been verified (for example, a scheme found on the Internet). Note that these are used at your own risk, and may change without notice.

Nokia URI Schemes

URI App name Description/Link to documentation
nokia-music Nokia MixRadio Launch the Nokia MixRadio app. Parameters can be used to specify artists, genre etc to be searched on open. See Nokia MixRadio app-to-app protocol for Windows Phone 8 and official documentation for the API in the Nokia Lumia Developer Library
directions HERE Maps For routing use cases. See HERE Launchers API documentation in the Nokia Lumia Developer Library.
explore-maps HERE Maps For exploring map and map services. See HERE Launchers API documentation in the Nokia Lumia Developer Library.
guidance-drive HERE Drive For drive navigation. See HERE Launchers API documentation in the Nokia Lumia Developer Library.
guidance-walk HERE Drive For walk navigation. See HERE Launchers API documentation in the Nokia Lumia Developer Library.
places HERE Maps For showing places. See HERE Launchers API documentation in the Nokia Lumia Developer Library.
public-transit HERE Transit For public transit related use cases. See HERE Launchers API documentation in the Nokia Lumia Developer Library.
nokia-xpress: Nokia Xpress (min v1.5.1.773) This URI allows 3rd party apps to start the Nokia Xpress browser. If the browser is started for the first time, the user is presented with an End User License Agreement (EULA) which the user must accept, after which the app loads its home page.
nokia-xpress:Pageload?Url= Nokia Xpress (min v1.5.1.773) The “page load” protocol implemented on top of the Nokia Xpress URI allows 3rd party applications to start the browser in order to load the specified URL. The URL of the page to be loaded may include the http:// specifier or omit it. You can also specify https:// if needed.If the provided URL does not appear to be valid (contains invalid characters, out of IP range(sorry, no IPV6 yet), no domain suffix, etc.), Nokia Xpress will perform a search based on user settings.

Official “General” URI schemes

This is for URI schemes that are not necessarily reserved for a particular app, but which are known to be launched by them.

URI App name Description/Link to documentation
ms-drive-to:? HERE Drive + Beta How to request driving or walking directions for Windows Phone 8
ms-walk-to:? HERE Maps How to request driving or walking directions for Windows Phone 8

Reserved URL name schemes

Reserved URL names schemes for the in-built apps and operating system are documented in Reserved file and URI associations for Windows Phone 8#Reserved URI scheme names and URI schemes for launching built-in apps for Windows Phone 8 on the Dev Center. Note that when a reserved URI is launched only the built-in app or handler will launch. Any attempt to register an app with one of the following URI scheme names is ignored.

The information is reproduced below for completeness (but has been “collapsed”). We recommend you check the above links.

Reserved for built-in apps

URI Description
http:[URL] Launches web browser and navigates to specified URL
https:[URL] Launches web browser and navigates to specified URL
mailto:[email address] – Launches the email app and creates a new message with the specified

Use case for ContainerView #xamarin #iosdev

Think of a scenario where you have multiple subviews within a view in your application. The screen below shows Cinema Details view in my Cineworld app for iOS

iOS Simulator Screen Shot 23 Apr 2015 15.23.01 iOS Simulator Screen Shot 23 Apr 2015 15.23.06 iOS Simulator Screen Shot 23 Apr 2015 15.23.11 iOS Simulator Screen Shot 23 Apr 2015 15.23.18


The screen originally consisted of

  • Segment Control
  • Label (Date display)
  • Calendar Button
  • TableView (List by Date)
  • TableView (Current and Upcoming)
  • RatingView
  • Rate count Label
  • Address and Telephone labels
  • Walking / Driving Direction buttons
  • RateView Button
  • Cinema reviews TableView
  • Ad View

The first iteration of this view used Autosizing and as you can imagine there was some cropping for iPhone 4s. To get around it, I started using Autolayout. Can you imagine managing and creating constraints for this many controls ? I tried.. not once but a few times however it never seemed to fully work.

A few times I moaned how in Windows Phone I have above controls in Panorama and how crappy iOS is. I tried both Xamarin Studio and Xcode to set the constraints.. Nada.. It was explained to me that I am using too many controls and I should simplify my view.. was told have a look at ContainerView. So I did

A container view is a view that can host other views. So i got rid of most controls to have

  • Segment control
  • container view
  • Ad control

Screen Shot 2015-04-23 at 15.42.55   Screen Shot 2015-04-23 at 15.41.28

At this point adding constraints to this view was very very simple. Now simplify by adding new View Controllers for each subviews

Screen Shot 2015-04-23 at 15.49.21


Screen Shot 2015-04-23 at 15.51.59

They layouts of each subviews is lot simpler now and auto layout was much easier. Now lets look at how we show / hide desired subviews.

private void ShowContainerView(UIViewController vc)



private void HideContainerView(UIViewController vc)
	vc.WillMoveToParentViewController (null);

	vc.View.RemoveFromSuperview ();

	vc.RemoveFromParentViewController ();

The above methods can be used to add / remove view / view controllers from current view.

FilmsByDateViewController GetFilmsByDateViewController()
	if (this.filmsByDateVC == null) 
		var vc = this.Storyboard.InstantiateViewController ("FilmsByDateViewController") as FilmsByDateViewController;

		vc.FilmPerformaceDictionary = this.dateFilms;
		vc.Cinema = this.Cinema;

		vc.View.Frame = new CoreGraphics.CGRect(0, 0, CinemaDetailsContainer.Frame.Width, CinemaDetailsContainer.Frame.Height);

		this.filmsByDateVC = vc;

	return this.filmsByDateVC;

FilmListViewController GetCurrentFilmsViewController ()
	if (this.currentFilmsVC == null) 
		var vc = this.Storyboard.InstantiateViewController ("FilmListViewController") as FilmListViewController;
		var currentFilms = new AllFilmsTableSource (AllFilmsTableSource.FilmListingType.Current, this.Films);
		vc.FilmSource = currentFilms;
		vc.Cinema = this.Cinema;

		vc.View.Frame = new CoreGraphics.CGRect(0, 0, CinemaDetailsContainer.Frame.Width, CinemaDetailsContainer.Frame.Height);

		this.currentFilmsVC = vc;

	return this.currentFilmsVC;

FilmListViewController GetUpcomingFilmsViewController ()
	if (this.upcomingFilmsVC == null) 
		var vc = this.Storyboard.InstantiateViewController ("FilmListViewController") as FilmListViewController;
		var upcomingFilms = new AllFilmsTableSource (AllFilmsTableSource.FilmListingType.Upcoming, this.Films);
		vc.FilmSource = upcomingFilms;
		vc.Cinema = this.Cinema;

		vc.View.Frame = new CoreGraphics.CGRect(0, 0, CinemaDetailsContainer.Frame.Width, CinemaDetailsContainer.Frame.Height);

		this.upcomingFilmsVC = vc;

	return this.upcomingFilmsVC;

CinemaInfoViewController GetCinemaInfoViewController()
	if (this.cinemaInfoVC == null) 
		var vc = this.Storyboard.InstantiateViewController("CinemaInfoViewController") as CinemaInfoViewController;
		vc.Cinema = this.Cinema;
		vc.View.Frame = new CoreGraphics.CGRect(0, 0, CinemaDetailsContainer.Frame.Width, CinemaDetailsContainer.Frame.Height);

		this.cinemaInfoVC = vc;

	return this.cinemaInfoVC;

The above methods are helpers to instantiate contained view controllers and the code below is the ViewDidLoad showing how Segment control’s ValueChanged shows the correct contained view

public override async void ViewDidLoad ()
	base.ViewDidLoad ();

	this.CinemaSegments.Enabled = false;

	// page init code...

	var filmsDateVC = this.GetFilmsByDateViewController();

	this.CinemaSegments.ValueChanged += (sender, e) => 
		var currentVC = this.GetCurrentFilmsViewController();
		var upcomingVC = this.GetUpcomingFilmsViewController();
		var cinemaVC = this.GetCinemaInfoViewController();


		case 0:

		case 1:

		case 2:

		case 3:

	this.CinemaSegments.Enabled = true;

	this.ShowContainerView (filmsDateVC);


I similarly simplified a few other views and job done.

Getting started with iOS dev using #Xamarin Part 2

In early days, iPhones sported a resolution of 320 x 480.. everything was rosy.. Eventually it grew taller by 88px when iPhone 5 came out.. since then for dev purposes the resolution sported by newer devices 5, 5s, 6, 6Plus sport 320×568 res with varying pixel densities.

iPhone 4s is still supported with iOS 8.x this means that developers need to continue supporting 320×480 res while filling the space (88px) for newer devices.

iOS supports 2 layout mechanism

  • Autosizing
  • Autolayout

With Autosizing think of the view as a canvas. You can draw other (sub)views by setting X, Y and Width & Height. If you only have a single subview, resizing subviews isn’t a problem and happens easily (table view, collection view, map view) as long as they expand to fill all available space. But what happens if you have a complex view ? Say a Label, Button, TableView and another Button at the very bottom !

If we used a designer to design the view in storyboard, the view would be rendered as shown below

Screen Shot 2015-04-22 at 11.07.01 iOS Simulator Screen Shot 22 Apr 2015 11.03.22  iOS Simulator Screen Shot 22 Apr 2015 11.03.51

The screenshots show the view in iOS Designer, app running on iPhone 4s and iPhone 5. Its clear that iPhone4s cropped the view as designer had layout set to iPhone5. Now many developers prefer designing the view in code and yes you could look at this.View.Bounds and then create all controls in code but i personally prefer to use designer.

To overcome this issue with Autosizing, Apple introduced Autolayout. Auto layout isn’t something that makes full sense until you battle it out. What one needs to do is define constraints that span across the width and height of the view. You can’t leave one bit otherwise the whole thing falls over.If you tap on a control twice on iOS designer, the design switches auto layout mode (pin-spacing) for the control. Lets have a look. As you can see, the Label control now shows 4 T shaped handles and 2 I shaped handles. You can drag the T shaped handles left, top, right and bottom and associate them with the view border and controls at the top and bottom.

Screen Shot 2015-04-22 at 11.15.15

The screenshots below show the constraints i have set. I modified the size of table to 333 (88 px) less than before and then i added a greater than or equal to constraint with a value 333. This ensure that it will fill the available space.

Screen Shot 2015-04-22 at 11.28.58 iOS Simulator Screen Shot 22 Apr 2015 11.26.01 iOS Simulator Screen Shot 22 Apr 2015 11.54.03

You can also add constraints programmatically and modify them programmatically but i haven’t had the need to go there yet.

For more info on how to use Autolayout and a better primer, have a look at 

Getting started with iOS dev using #Xamarin Part 1

.NET developers wishing to develop for iOS should look at Xamarin Studio. It offers an experience similar to that offered by Visual Studio from the comfort of OS X. If you are a Visual Studio fanatic, Xamarin offers a package with deep integration with Visual Studio that allows you to develop using Visual Studio on Windows (you still need a mac somewhere to be able to compile). Over the last month, I have primarily used Xamarin Studio on MacBook Pro. This is what it looks like on launch

Screen Shot 2015-04-01 at 10.19.21

Just like Visual Studio, Xamarin Studio offers many stock templates. Here is what iOS Unified API templates look like.

Screen Shot 2015-04-01 at 10.21.43

We will start with Single View Application targeting iPhone. Once we add a name, the template creates the project with required files.. main, AppDelegate, Storyboard and the ViewController. The arrow as shown in storyboard indicates the ViewController that is launched.

Screen Shot 2015-04-01 at 10.26.13

There is little you can do with a single View and for that reason let us add NavigationController and set the XiOSDemoViewController as the root view controller (the process is very visual and click oriented and Xamarin Studio makes it less so than Xcode)

Screen Shot 2015-04-01 at 10.37.00

Click and Drag (while holding Ctrl key) from Navigation Controller to the ViewController and set relationship as Root.As you can see we have set the App to delegate control to Navigation Controller which now has the XiOSViewController as the Root controller. Lets drop a few controls.. Navigation Item for Page Title, a label and a couple of buttons. A few things to remember is that if you want set anything during view lifecycle, the view controller provides a few handy methods that can be overridden. Screen Shot 2015-04-01 at 11.03.45 Let’s wire up button’s TouchUpInside Event. This is equivalent Click / Tap event in Windows world. We will wire it up in the view’s load event as shown below

int clickCount = 0;

public override void ViewDidLoad ()
    base.ViewDidLoad ();

    // Perform any additional setup after loading the view, typically from a nib.
    this.btnClickMe.TouchUpInside += (sender, e) => 
        this.lblClickMessage.Text = String.Format("You clicked {0} times", clickCount);

Running the project in simulator and clicking the button increments the count and displays the message. Note that you did not have to associate the controls with ViewControllers.. that was done for you as you would have expected with Visual Studio. Xcode developers have to do lot of click drag from storyboard on to ViewControllers to make them available. This might seem trivial but it is very useful and a no-brainer from IDE perspective.

Screen Shot 2015-04-01 at 11.30.00

Finally lets add a button to the view and a view controller to storyboard. Another nice feature unlike Xcode is that when you set the class name for ViewController in storyboard, Xamarin Studio creates the class for you. You don’t need to create one.. similarly any controls you add are automatically available as i mentioned before. Screen Shot 2015-04-01 at 11.36.51 Screen Shot 2015-04-01 at 11.38.21 To navigate from one view to another, you can add a segue from button to view controller or you can do so in code. I have added a visual segue and chose action as push. Thats it.. now when you run the app navigation is in place.

Coding4Fun toolkit 2.1.0 released #WinRT #wpdev #windev


This is the 3rd iteration of toolkit updates I am pushing out. Like the other 2, this one builds on Windows Runtime WinRT app support for Windows Platform development.

This release also brings WinRT support close to what Silverlight version supported and finally drops support for Silverlight apps. The SL version is still available on nuget but it is unlikely to receive any updates.

SuperSlider (ColorSlider + ColorPicker) has a gotcha and its gonna need some clever work. Internally it uses code that monitors movement for updates and movements to prevent scrolling when the control is contained within Pivot, Hub or FlipView containers however lack of Touch class has forced me to use PointerPressed / PointerMoved and PointerReleased for these and in my tests, Pivot does not bubble those events and control doesn’t work correctly. Keep this in mind

Sample apps available in stores will be updated to reflect the changes

258x67_WP_Store_cyan WindowsStore

Control Windows Phone 8.1 Windows 8.1
AboutPrompt ×
InputPrompt ×
MessagePrompt ×
ToastPrompt ×
PasswordInputPrompt ×

Happy coding