I'd like to verify the way my app is working correctly by logging debug data.
What I usually do is build and deploy an app to the iPad. When it's deployed, XCode leaves a console window open. For the most part I see messages like this:
fps: 60.0324
Which obviously shows that something is logging data.
Is there a log or debug object that writes strings to this console?
Comments
You usually use print(...) function to write your messages to the output window of Gideros Studio. (this is the preferred and easy way)
On the other hand, any data directed to stdout and stderr is written to the Xcode's console. Therefore, if you want, you can use io.write(...) (default output file is stdout) to display your messages at Xcode's console.
Thankfully the Export->Switch to XCode->Build process is pretty quick for me.
Btw, did you install Gideros Player on your iPad? (there is a file GiderosiPadPlayer.zip comes with the installation). Without it, developing a multitouch application can be really discouraging.
Likes: atilim
Likes: atilim
No wait for build, open itunes copy file across and then find its just failed.
Its just the way I imagined it should be. No more imagining.
Mike
Likes: atilim, gorkem
http://www.sharksoupstudios.com
I am using third party libraries in my app that are only linked in eclipse and xcode project's and I need the ability to log info in order to debug my program.
Alternatively is there a way to differentiate an app running on gideros player on a real device from an app running on its own on real device?
Once again, I would still like to use Gideros player for things that do not require third party libraries.
Thanks.
But you can easily swith your app to player (which will have preinstalled plugins that your app project have)
http://docs.giderosmobile.com/deployment.html
check Device player with plugins
Wow... you just saved me a ton of time! Device player with plugins is the greatest thing since sliced bread!
I'm near the end of my first self published project and a slew of Gamekit testing is headed my way. This is is life saver!
For those of you who don't know, simply turning on the gdr_initialize switch in your Xcode project allows you to use the Gideros player within your app environment.
Truly a Genius feature, big thanks to the Gideros team for this one!
Thanks for the link about player with Plugins, it makes perfect sense!
As for the the io.write("Some Stuff"), I cannot make it work.
When I put it in my Gideros code, I don't see anything in my XCode console, while running the exported project, maybe Xcode does some kind of message filtering to show only log relative to current app, but I don't know how to "tag" my message to make it look like one coming from my app.
I also tried using io.output:write("Stuff") but does not work...
I will try to use print() on a real device running gideros player with the appropriate plugins to see I can make it work.
I gave up on the io.write once I found out about the custom player. I could never get any output to the Xcode console.
Likes: ar2rsawseen