'net-http' issue with iphone simulator

M Madhusudhan Reddy 2 years 11 months ago
0 2 0

Hi All,

I'm calling web-services in my rhomobile application, am able to get the result in rhosimulator(iPhone) with no errors, but when am trying to run the application on device(iPhone and iPhone simulator(using rake run:iphone)) my controller is working.
I tried by removing the 'net-http' extension and require 'net/http' so it is working. but I cant call web-services.
How to make it run on iPhone.
Please suggest solutions.

-Thanks.

Please register or login to post a reply

2 Replies

M Madhusudhan Reddy

No, it was working on simulator but not on the device.

Thanks for the advise finally I made it work on device.

J Jon Tara

You don't need net-http to access web services. That's what the Net API is for. (Or the old AsyncHTTP). It's a much better choice, because net-http is blocking and as a practical matter you need to use it in a separate thread. And that's only supported on some platforms. (Works on iOS, doesn't on Android.)

The Net API is much better for general use because it uses Rhodes callbacks and doesn't need a separate thread to run asynchronously.

net-http is useful if you are porting some existing software that needs net-http.

In fact, I use net-http in an app (I ported XMPP4R to Rhodes: watusi/xmpp4r · GitHub ). I haven't tried this with recent Rhodes versions, though.

Unclear from your post what is/isn't working. The heading says issue with simulator. The body of your post seems to say it works on simulator and also that it works on the device. Can you clarify?

CONTACT
Can’t find what you’re looking for?