Skip to content

Instantly share code, notes, and snippets.

@rakhimoni
Last active November 1, 2017 08:33
Show Gist options
  • Save rakhimoni/e15cc150f82dbf0d5d5ff7ddd31b40a8 to your computer and use it in GitHub Desktop.
Save rakhimoni/e15cc150f82dbf0d5d5ff7ddd31b40a8 to your computer and use it in GitHub Desktop.
iOS - functions declared in alloy.js are not globally visible
function test() {
Ti.API.info("Hello!");
}
// console logs:
[INFO] : Invoking xcodebuild
[INFO] : Finished building the application in 54s 766ms
[INFO] : Launching iOS Simulator
[INFO] : ttttt/1.0 (6.2.2.42c7196)
[INFO] : Hello!
[INFO] : Hello!
[INFO] : Hello!
$.index.open();
<Alloy>
<Window class="container">
<Label id="label" onClick="test">Hello, World</Label>
</Window>
</Alloy>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment