3

How can I log all system information about Titanium and Alloy configuration and all other information about the current build, version numbers etc?

I'm looking for something similar to PHP's phpinfo.

shrewdbeans
  • 11,971
  • 23
  • 69
  • 115

4 Answers4

3

You can log it using the methods mentioned from @daniula and @Wahhas_mirza. But you can use the command line tools if needed to display information that relates to Alloy and Titanium.

If you open the Terminal Window, enter the keyword alloy, you will then see the usage for the command.

alloy

To view what version of alloy your project is using enter:

alloy -version

For Titanium related information use the keyword ti

ti 

which then displays the usage for:

 Titanium Command-Line Interface

As an example: ti info will display all relevant information that pertains to your Titanium setup

I hope this helps.

Nando
  • 223
  • 1
  • 11
1

There is nothing like phpinfo() in Titanium. If you really want to print all information about your platform you can try something like this:

for (var i in Titanium.Platform) {
    if Titanium.Platform.hasOwnProperty(i) {
        Ti.API.info(i + ': ' + Titanium.Platform[i]);
    }   
}
daniula
  • 6,898
  • 4
  • 32
  • 49
1

Start a terminal session in studio ( or switch to app's directory in a console). Type ti info. You'll get output similar to the following

Titanium Command-Line Interface, CLI version 3.2.3, Titanium SDK version 3.2.3.GA
Copyright (c) 2012-2014, Appcelerator, Inc.  All Rights Reserved.

Please report bugs to http://jira.appcelerator.org/

Operating System
  Name                        = Mac OS X
  Version                     = 10.9.3
  Architecture                = 64bit
  # CPUs                      = 8
  Memory                      = 8.0GB

Node.js
  Node.js Version             = 0.10.28
  npm Version                 = 1.4.9

Titanium CLI
  CLI Version                 = 3.2.3
  node-appc Version           = 0.2.1

Additionally, you'll get a list of all your simulator/emulator configurations, certificates, provisioning profiles and any config errors (if any).

Mike S.
  • 2,048
  • 1
  • 32
  • 55
0

Here you go

Ti.API.info('I want to show the data in console');

Thanks

Wahhab_mirza
  • 1,484
  • 2
  • 10
  • 17
  • Thanks but I'm not looking how to log a message to the console, I need to display all the configuration information about Titanium and Alloy, such as version numbers, setup and so on. Please take a look at this for an example in PHP: https://php.net/phpinfo – shrewdbeans May 20 '14 at 10:56