I'm trying to add a basic NavigationWindow to my Alloy project for iOS. My index.xml and index.js code is below:
<Alloy> <NavigationWindow id="IndexNavWindow" platform="ios"> <Window id="LogonWindow" title="Title Here"> </Window> </NavigationWindow> </Alloy>
$.LogonWindow.open(); if(OS_IOS) { $.IndexNavWindow.open(); } function openContactTest() { if (OS_IOS) { var contactView = Alloy.createController('contact').getView(); $.IndexNavWindow.openWindow(contactView); } else { openContactView(); } }This code works how I expect for iOS. In Android however, I get an error when my app is loaded: "Cannot call method 'open' of undefined" Source: $.LogonWindow.open()
If I comment out the NavigationWindow the app runs as expected on Android. I'm confused as to why the NavigationWindow would be causing an issue as the platform is set for "ios" only. Any help is appreciated.