Realm and Swift/iOS

I noticed that someone on the forum has been using Realm together with Fire/Elements. I was wondering if this person could give me tips how to get Realm working with Swift while creating an iOS application.

You need to download the framework file and create the fx file from that.

You then add the fx as a reference

Download the framework file from

I created a train script to run headerimport. Headerimport is the thing that creates the fx file.

https://docs.elementscompiler.com/Tools/Train/

If you want I can give you my trainscript, alternatively I can also give you the latest fx files I have.

It probably wouldn’t take me too long to create an example using swift and Fire.

1 Like

Great, I have giving it a shot but it looks like Train is a Windows only application? It’s compiling fine but Fire keeps crashing after it has been successfully build.

If you would be able to send me the headers and your fxscript that would be greatly appreciated. I have discovered some Objective-C and Swift libraries. I would love to use in my application e.g. Realm, IGList and Yalantis’ Koloda

No, Train is a .NET/Mono command line app, and works fine Mac.

sounds like a bug — bit I can’t report tis with what you emailed me; the crash seems to be in debugging, not building, from the log file. what are there exact steps that leads to the crash?

(fwiw, here it crashes neither when building nor when running/debugging from Fire)

Well, the reproducible steps for me are:

  1. Open Fire
  2. Open Train.sln
  3. Click the Run-button
  4. Wait until starts the app and Fire will crash

Ah, the issue happens when you don’t have the Mono framework runtime installed. Crossbox said I was missing the Mono framework on my Mac. After installing Train runs as expected.

curious. i’ll see if/how i can simulate that to repro the crash.

libRealmFramework.train.zip (630 Bytes)

This is the train script I use. You would need to correct the paths.

1 Like