Search code examples
iostitaniumappceleratorappcelerator-titanium

can we use appcelerator titanium liveview in iOS devices?


I tried to run my app in live view mode on an iPhone device from appcelerator studio and get the error :

[LiveView] File Server unavailable. Host Unreachable @ 192.168.1.122:8324
[LiveView]Please ensure your device and computer are on the same network and the port is not blocked.

conditions :
1. Device : iPhone 5S with IOS 9.2.1
2. Titanium SDK 5.1.1.GA
3. Firewall off and connected to the same wifi
4. xcode 7.2
5. Appcelerator Studio 4.4.0
6. Latest appcelerator CLI

can't we use live view when deploying to iOS device?

nb : it works when i use iOS simulator and android devices


Solution

  • I just looked through the LiveView code and confirmed this issue happens when the LiveView code inside your iOS app can't see the LiveView server running on your computer. You claim that both your computer and your device are on the same network and the firewall is off. I suppose the next thing to check is the LiveView server even running?

    LiveView lives inside the Appcelerator Studio directory. On my machine it's located at /Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.1.0.1445037865.

    You can manually check the server status by running:

    /Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.1.0.1445037865/node_modules/liveview/bin/liveview server status
    

    There's actually a couple other subcommands you can pass in: start, stop, and restart. If the status command above says that the server is running, stop it using:

    /Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.1.0.1445037865/node_modules/liveview/bin/liveview server stop
    

    Build your app again and Studio will start the LiveView server again and hopefully this time it works. I don't think you need to manually start the LiveView server. I'm not even sure if that would work.

    I hope that fixes your problem.