readium / readium-sdk

A C++ ePub renderer SDK
BSD 3-Clause "New" or "Revised" License
386 stars 164 forks source link

Windows Phone 8 Support #98

Open rkwright opened 9 years ago

rkwright commented 9 years ago

This issue began in the IDPF Readium Forum here: http://idpf.org/forum/topic-1764 by adesbois --------------Forum post-------------------------------------- Submitted by adesbois on September 5, 2014 - 4:30am

Hello I try to use the readium SDK on Windows phone 8.0 (I use Visual Studio 2013) I've downloaded the source of the WinPhone8 branch (https://github.com/readium/readium-sdk/tree/WinPhone8). The ReadiumWP8, PhoneSupport and PhoneSupportInterfaces projects build correctly.

I've created a small Windows phone 8.0 application (C#) (with a reference on the projet ReadiumWP8) which calls a Readium method : Readium.Initialization ri = new Readium.Initialization();

The application build correctly, but the exception System.NotSupportedException is thrown, when Readium method is called on the emulator (x86).

How I can use the Readium SDK on a Windows Phone App ?

Thank you very much for your answers! --------------Forum post-------------------------------------- Submitted by adesbois on September 8, 2014 - 3:42am I found the solution, the generated .dll and .winmd must have the same name as the namespace : Readium.dll and Readium.winmd (not ReadiumWP8.dll and ReadiumWP8.winmd ) --------------Forum post-------------------------------------- Submitted by adesbois on September 10, 2014 - 4:10am I have an other problem when I load an epub. The container.xml is correctly parsed but when it try to evaluate the xpath expression to extract the rootfile, I've this error :

Informations WinRT : System.NullReferenceException: Object reference not set to an instance of an object. at ReadiumPhoneSupport.XPathProcessor.ProcessNextXPathComponent(Object current, IEnumerator`1 remainingXPathNodes, IXmlNamespaceResolver nsResolver) at ReadiumPhoneSupport.XPathProcessor.ProcessXPathExpression(XNode node, String xpath, IXmlNamespaceResolver nsResolver) at ReadiumPhoneSupport.XmlDocument.SelectNodesNS(String xpath, Object namespaces) at ReadiumPhoneSupport.XmlDocument.SelectNodes(String xpath

rkwright commented 9 years ago

I have copied the relevant content to the Readium-SDK github issues section, here: https://github.com/readium/readium-sdk/issues/98 I would strongly suggest that you post there instead of the forum as you may well get some help directly from the developers who contribute to the Readium open-source effort.