Retargeting your MobileFirst Windows Phone apps to 8.1
If you're developing Hybrid applications for Windows Phone, you might have noticed that Visual Studio allows you to retarget your apps to Windows Phone 8.1. If your using the Visual Studio 2013 Profession Edition (Update 2 or higher), you have the choice on whether your can retarget your app or not. However, if you are using the Express edition of Visual Studio, you will be forced to retarget your app.
If you are one of those who has retargeted your MobileFirst Windows Phone app, you might find that the app is stuck and does not proceed beyond the splash screen. Read on to understand why...
So, what happens when you retarget your app ?
Among other things, the underlying WebView control that runs your app's code is different - it is now Internet Explorer 11 engine instead of Internet Explorer 10.
There is a known incompatibility between jQuery and IE 11. Although this issue has been fixed in a later version of jQuery, the jQuery that is shipped with MobileFirst apps have this bug. Due to this bug and the fact that retargeted apps use IE 11, retargeted MobileFirst apps can appear to be non-responsive.
So, what is the solution ?
Here are some solutions to overcome this issue
- Do not retarget - The simplest solution is not to retarget your app. This will keep your app compatible with both Windows Phone 8.0 and Windows Phone 8.1.
- Use the IE 10 engine for your app - In the index.html page of your app, add this meta tag to ensure that the Windows Phone OS runs your app on a WebView running the IE 10 engine instead of IE 11.
- Back-port the jQuery fix - Another option is to backport the fix to the jQuery bug into your MobileFirst application.
Have you encountered this issue when you retargeted your apps to Windows Phone 8.1 ? If you have any comments about this, feel free to write about it below.