Windows 8 and Clay.io Integration

1

Index

Stats

6,569 visits, 13,054 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 1 Mar, 2013. Last updated 19 Feb, 2019

Setting up your Visual Studio Project

Now that we have the files required for Clay.io to work with Visual Studio we can now get the project up and running!

You will want to go into your package.appxmanifest file in your solution explorer (double click on it) so we can fix 2 problems.

First we want to set up a certificate for testing purposes. Go to the Packaging tab and click on Choose Certificate.

Click on Configure Certificate and choose Create Test Certificate

Then click OK to create a Test Certificate. None of the info on the Certificate matters since this is for local testing only and if you publish to the store will be written over later.

The final thing we need to change is to give the app permission to access the internet as without this it will crash when you try and access the Clay.io servers. Go to the Capabilities tab in your package.appxmanifest file and check the Internet (Client) option.

Now that we have the package.appxmanifest file fixed if we ran the project we would still run into a problem. The project has the 3 Clay.io files but it has no idea what to do with them. We will need to update the index.html file with the following 3 lines of code.

    <!-- Clay.io References -->

<script src="socket.io.js"></script>

<script src="api.js"></script>

<link rel="stylesheet" href="api.css"/>

You can add these lines anywhere in the <head> section of the file but you might want to add these lines below the WinJS references to keep them clean and organized.

  • 0 Comments

Want to leave a comment? Login or Register an account!