8

Looking at the new Delphi XE2 with Firemonkey. Considering that it compiles for Windows, Mac OSX and iOS, VCL components are useless in a FireMonkey application.

My question is: Is there/will there be an Indy Firemonkey Edition? Cause I seriously need the IdHTTP.Post();. If not, is there a way to do this in FireMonkey?

I have been googling for quite awhile now, not finding anything. :S

RRUZ
  • 134,889
  • 20
  • 356
  • 483
Jeff
  • 12,085
  • 12
  • 82
  • 152

4 Answers4

11

VCL means Visual Component Library. There's nothing about Indy that is "visual" (meaning "seen at runtime"), meaning that "VCL components are useless in a FireMonkey application" has no relevance to Indy.

You can create a new FireMonkey HD application in Delphi XE2, target OS X, and the Indy component pages are still available in the IDE, meaning that they are compatible with supported FireMonkey cross-platform targets. They're also available for FireMonkey HD Windows targets (32 and 64 bit).

Ken White
  • 123,280
  • 14
  • 225
  • 444
  • My bad, I just thought Indy was a VCL component. However, doesen't Indy use Windows Sockets at some point? Are they available in Firemonkey for Mac OSX and iOS as well then? – Jeff Sep 09 '11 at 17:59
  • As I mentioned, they're available for *supported* operating systems (I specifically mentioned OS X). I don't know about iOS, but I'd suspect so, as AFAIK Indy supports FreePascal. As far as "VCL", it's common for it to be used for non-visual as well as visual components; the incompatibility between FireMonkey and the VCL is primarily (not strictly) related to visual components, as they rely on the underlying API. Indy doesn't always use Windows Sockets; there was a version of Indy for Kylix, which ran on Linux and therefore didn't have WinSock available either. – Ken White Sep 09 '11 at 18:07
  • Awesome, that means I can start looking for a Delphi XE2 Copy! :) – Jeff Sep 09 '11 at 18:13
  • Right, I'd like a physical copy tho, and I dont know if they sell to 17-year old kids. :P – Jeff Sep 09 '11 at 18:21
  • They'll sell to anyone who has the money, and you can download the ISO and make your physical copy. (How did you get the copy of Delphi you're using now?) – Ken White Sep 09 '11 at 18:23
  • A guy who hired me to develop an app for him helped me out with the cash. – Jeff Sep 09 '11 at 18:36
  • 2
    I can confirm that iOS is NOT supported by Indy. There is currently no internet option in iOS FireMonkey as standard. There is at least one third party option though. – mj2008 Sep 11 '11 at 19:20
  • Indy DOES support iOS. – Remy Lebeau Jan 05 '14 at 05:28
  • Well it does now, not sure about back then though (2011). However, be advised that if you need to add OpenSSL, there are no OpenSSL binaries in iOS, which means you have to acquire copies of these binaries and deploy them with your iOS app yourself. – Jerry Dodge Aug 03 '15 at 20:23
  • @JerryDodge: You cannot deploy external OpenSSL binaries with an iOS app. Apple does not allow it. OpenSSL has to be statically linked into the app itself. There are static OpenSSL `.a` files available at https://github.com/st3fan/ios-openssl and https://indy.fulgan.com/SSL/OpenSSLStaticLibs.7z. This is documented on [Embarcadero's DocWiki](http://docwiki.embarcadero.com/RADStudio/XE8/en/OpenSSL) and [Marco Cantu's blog](http://blog.marcocantu.com/blog/using_ssl_delphi_ios.html). – Remy Lebeau Aug 03 '15 at 21:51
  • @Remy Yes I know this, just got done doing it myself. Just thought I'd put a heads up here in case anyone else faces that issue. Of course "deploy with" was a bad choice of words on my part. REF: http://community.embarcadero.com/index.php/blogs/entry/openssl-and-https-support-for-ios-devices – Jerry Dodge Aug 03 '15 at 21:55
4

Indy ships with the IDE (and has since D6) so there is nothing extra to buy if you already have XE2 installed. Also, Indy is open-source, so you can upgrade an Indy installation using source code from Indy's public access SVN server or mirror.

Regarding FireMonkey, Indy does work in FireMonkey. Indy uses whatever the native socket API is on a given platform (WinSock on Windows, Posix on Mac, libc on Kylix, etc).

The only known gotcha with Indy under FireMonkey at the moment is the TIdAntiFreeze component is not available at design-time. The IDE cannot resolve it correctly due to the non-standard way it is packaged (to be adressed in Indy 11). You can instantiate it programmably in code at run-time, though.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • TIdAntiFreeze? Never heard of it, I always create a thread for my Indy stuff :) – Jeff Sep 10 '11 at 13:41
  • Remy, what about iOS? I know it's currently not "supported", but is this a permanent thing, or will we see in the future Indy on iOS? – Misha Sep 11 '11 at 23:15
  • 2
    We will likely see Indy on iOS since it is an official FireMonkey platform. It is just a matter of setting up Indy's backend to support the necessary OS calls. – Remy Lebeau Sep 13 '11 at 01:35
  • @Jeff : `TIdAntiFreeze` allows to keep the application usable and not busy when using Indy. – Beny Sep 15 '11 at 21:27
  • @Jeff: more specifically, when using Indy *in the context of the main thread* only. – Remy Lebeau Sep 15 '11 at 21:30
  • @Remy - So I've been making threads when I could have used TIdAntifreeze eh? – Jeff Sep 16 '11 at 08:33
  • @Jeff: Indy is better suited for use in threads, but TIdAntiFreeze does allow the main thread to stay responsive by calling Application.ProcessMessages() during blocking Indy operations. Any use of ProcessMessages() has to done carefully as it can lead to issues in code that is not meant to be reentrant, for instance. – Remy Lebeau Sep 17 '11 at 14:51
  • @remy - awesome, so that means I've been doing it the right way all along! :) – Jeff Sep 18 '11 at 08:49
  • 1
    @Jeff Any use of `Application.ProcessMessages` is a very weak way of making an application "just work". A `TIdAntiFreeze` may be ideal for small personal tools or mock-ups, but not advised for professional builds. Using threads is always an ideal solution for blocking components. – Jerry Dodge Aug 03 '15 at 20:27
0

I made a client server example using tcp indy http://www.freelancecode.net/community/viewtopic.php?f=35&t=246

0

The Components Not Used in iOS Apps DocWiki page for Delphi XE2 lists most of the Indy classes:

The following list is the set of components (along with the used units) that might be available in the Tool Palette for iOS applications, but are not supported for iOS applications.

mjn
  • 36,362
  • 28
  • 176
  • 378