I am able to run the HelloWorld sample within the Wikitude PhoneGap Plugin package for iOS.
However, when I carefully copy the necessary files and frameworks to my own vanilla PhoneGap project, I experience the following when trying to load the same HelloWorld world:
- Whenever I leave
<script src="architect://architect.js"></script>
in my code, the app crashes at the big Wikitude logo (right before is minimizes to the lower left corner) - When I delete that line, the app does not crash but does not display Hello World.
I have tried loading the ade.js, but I understand now the D stands for Desktop. I have looked for the architect.js file all over my Mac and the internet, but cannot find it. I do not understand what the difference is between the sample project and mine.
Can anyone help me getting a world in my own project?
(I have asked this here (http://forum.wikitude.com/home/-/message_boards/message/260302) as well. I will post any answer I get wherever I posted the question with credit and linkback to the original answer giver)
For completeness, this is the code from the HelloWorld world:
<!-- Include the ARchitect library -->
<script src="architect://architect.js"></script>
<script type="text/javascript">
var label = null;
function createLabelAtLocation(geoLocation)
{
label = new AR.Label("No Text", 2, {onClick : function(){
document.location = 'architectsdk://labelClick?text='+label.text;
}});
var geoObject = new AR.GeoObject(geoLocation, {drawables: {cam: label}});
}
function setupScene()
{
createLabelAtLocation( new AR.RelativeLocation(null, 100, 0, 0) );
}
function didReceivedNewTextForLabel(text)
{
if(label)
{
label.text = text;
}
}
function clickedClose() {
document.location = 'architectsdk://actionButton?action=close';
}
function clickedHide() {
document.location = 'architectsdk://hideButton?status=hide';
}
</script>
</head>
<body onload="setupScene()">
<!-- Button to close AR view, you may use this to hide arView and navigate back to familiar phoneGap environment -->
<button title="close" onclick="clickedClose()">Close AR View</button>
<button title="hide" onclick="clickedHide()">Hide AR View</button>
</body>