Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Deployment HELP !!!!!

i have made an iPhone application that consumes a Local LAN web service for my client and now i am stuck up getting the app published…..

As the web server is deployed locally on the clients LAN the Apple team that tests my app will not be happy with the app as it cannot find the local server IP(it will crash)….

hey somebody help me out with a solution….

And can somebody explain the uses of these Attributes…

1.address.
2.netmask.

under Titanium.Platform ????

— asked November 25th 2010 by Satta Ravi
  • apple
  • iphone
  • lan
0 Comments

3 Answers

  • Accepted Answer

    Sattanaathan

    As long as you gracefully handle the error, so that no exception occurs, I don't think there will be any problem with your app. Put a try / catch construct around the code that is attempting to connect to the local server, and show an alert/warning after a given timeout to the user to inform them of the probem.

    I hesitate to answer your second question, as it seems strange you have asked what an address/netmask is after you already seem to have an understanding of more advanced topics such as connecting to local webservers. Hence, please excuse me if I have missed your point:

    "address" is the IP address. Every device connected to a TCP/IP network must have a unique IP address in order communicate with other devices.

    "netmask" is used to differentiate between devices on local and remote networks. Those on a local network can be communicated with directly, but communications with those on remote networks must be routed via a gateway. You will find more information here, here and here.

    According to the API docs, the two Ti.Platform properties are useful only when the device is connected to a wifi network. Use Ti.API.info('Address = '+Ti.Platform.address) and Ti.API.info('Netmask = '+Ti.Platform.netmask) to discover whether then are automatically set. Alternatively, try setting them using valid values such as Ti.Platform.address = '192.168.1.10' and Ti.Platform.netmask = '255.255.255.0' to see if they are writable.

    Hope this helps

    — answered November 25th 2010 by Paul Dowsett
    permalink
    0 Comments
  • thanks for the Reply Hal…

    — answered November 25th 2010 by Satta Ravi
    permalink
    0 Comments
  • Sattanaathan

    If an answer has moved you any closer to a solution, a nicer way to show thanks is to simply mark an answer with "best answer". :)

    This has the advantage that it helps other people find your question, and the answer, in future.

    — answered November 25th 2010 by Paul Dowsett
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.