Martin Suchan – BloQ Random #WPdev stuff

6May/150

tl;dw Build 2015 – Developing Universal Windows Apps in Visual Studio 2015

Another too long; did not watch summary of the Build 2015 session I just watched: Developing Universal Windows Apps in Visual Studio 2015

Developer tools are available now - Visual Studio 2015 RC and Universal Windows App Development Tools

Windows 10 is finally one Universal Windows platform for all device types.

Single project, single package, works across all Windows devices. It's still possible to use separate package for separate platforms, if required.

Supported operating systems for Universal Windows development - Windows 10, Windows 8.1 and Windows 7 too (in VS 2015 RTM, not yet)

Capture

 

Important Windows 10 project properties:

Target Version - highest API version used in the app. Example, if the app uses API from OS version 10.0.10100 and it's known that there is breaking change in this API in Windows 10.0.10250, then this package won't be available on Windows 10.0.10250 and higher until the developer publishes new package for the new API version.

Min Version - min API version required. The package won't be available on Windows with lower OS version than the MinVersion.

Capture

Windows Device Family Extension SDKs - used for accessing platform specific features like phone SIM card features, the vibrator, etc.

Since there is usually only single project and single assembly, it's not possible to use conditional compilation using #if. Solution: Windows.Foundation.Metadata.ApiInformation, reflection-like API for checking if specific type/method/property is available on current device

if (ApiInformation.IsTypePresent("Windows.Phone.UI.HardwareButtons"))
{
    HardwareButtons.BackPressed += HardwareButtons_BackPressed;
}

 

Developers can create custom Extension SDKs. Currently it's possible to reference Windows 8.1 libraries in Windows Universal Apps, either from NuGet o directly. In VS2015 RTM it will be possible to reference Windows Phone 8.1 libraries as well.

App Insights - new analytics framework from Microsoft for monitoring app users, sessions, page views, crashes and real time usage, basically better Flurry Analytics 🙂 It's possible to use custom events for additional telemetry.

How to migrate from Windows/Phone 8.1 to Universal Apps? Typically by creating single new UWP project, using adaptive code for platform specific stuff and platform specific views for different form factors. It's still possible to have one project for tablet and one for phone (or for Xbox, IoT...) and share code using linked files, or using Portable Class Libraries, or using Shared Code project, it's up to developer and the target app.

Windows 10 Samples on GitHub

 

Filed under: WPdev Leave a comment