3
votes

I'm new to iOS, have been developing in Delphi for many years.

I don't know FPC well and i find it very hard to figure out which classes are available on iOS.

is there any FireMonkey classes for calling web services and parsing xml?

2
According to me FireMonkey is only a user interface library. If you want to use Web services as client you may look at :danieleteti.it/2011/08/24/… and stackoverflow.com/questions/3959851/using-rest-with-delphi - philnext
agreed, FireMonkey is just a user interface library. i hope they up their game soon or we will have to drop Delphi and rewrite everything in c# - i would not want that. the header files seems like they might be able to do the job, can you please send me an example of using a NSURL and NSString to call a web service. I just don't know how to create instances of these classes? the code insight in Xcode is not very help full, and the all the code examples i've seen so far is for obj-c. So my actual question is how do i use NSString and NSURL in a pas file that i compile with FPC..? - Sam Spotting

2 Answers

1
votes

Yes you can call a webservice :)

No it is not simple :(

You need to access the iOS framework directly...

The following code fragments will help...

First a pascal example of how to send/receive data via TCP

https://forums.embarcadero.com/thread.jspa?messageID=397346

Secondly, you will need to wrap the call using the relevant headers. See...

http://books.google.com.au/books?id=0nTYIL3-0yoC&pg=PT518&lpg=PT518&dq=beginning+ipad+development+webservices&source=bl&ots=cYniLvL8z2&sig=Ci6HskHgMvUeIrjyUbDecd7fBCQ&hl=en&ei=0_KdTpzBB4nOrQfwzM29CQ&sa=X&oi=book_result&ct=result&resnum=6&ved=0CEAQ6AEwBQ#v=onepage&q&f=true

It is a fair bit of work, but it can be done. Good luck!

1
votes

You can also try to use RealThinClient (RTC) SDK to allow your Delphi XE2 FireMonkey iOS client to connect to a RTC SDK server. Not SOAP, but I've managed to send data back and forth between the two layers (just in case you do not have to use SOAP, but are merely looking for some way to connect an iOS client to a server)...