Thursday, September 26, 2013
An update about Firebird on iOS
Based on a comment I made in response to someone asking about the availability of Firebird on IOS (after someone mentioned that the recent release of Delphi XE5 has support for an embedded version of InterBase for iOS and Android), I thought I would write a few more details of the hows and wherefores here.
1. I can confirm that yes, I have managed to cross-compile Firebird for iOS on my Mac. But note, cross-compiling in Firebird 2.5 is difficult and not for the faint hearted (especially ICU). The ability to cross-compile is only really available in the Firebird 3.0 tree.
2. The current build I have created is a normal Mac framework, and it needs to be finessed into an embedded bundle using this script.
Firebird embedded on MacOSX
The script is available in svn in the B2_5_Release tree, located in the builds/install/arch-specific/darwin directory. This will take an existing new build of Firebird 2.5 and convert it into an appropriate bundle format. However the current code still has a few issues. The current (2.5.2) code expects Firebird to be created as a framework, so the config_root module for darwin doesn't have the necessary "smarts" to be able to work out where things are automatically depending on whether the install is a framework, or if its embedded. However new code committed recently to B2_5_Release does. The build I currently have doesn't use this new code and as such requires that the environment variable FIREBIRD must me set.
3. I had planned to rebuild the code using the new embedded support for locating various important files that embedded needs, when my Mac died. The Mac is now currently being repaired and having a new motherboard fitted. Cost 600.00 Euros. It seems this is common fault on Macs of this age. So any further work will have to wait.
4. To test the build currently, it seems you will need an iOS device (iPhone or iPad) running iOS 6.1+ as the code was compiled with the following switch -miphonos-version-min=6.1. You also need to be need to be registered as a developer at Apple, and you will need to get the relevant certificate ids from them for the devices that you will test or use. Firebird like InterBase will never be availble via the App Store as it relies on dynamically linked libraries. Only statically linked applications are allowed in the App Store (security issues).
5. I now have an iPad I can use to start testing (thanks to a very generous donation), but haven't yet signed up as an official Apple developer and logged my devices.
If anyone wants to help/assist in anyway, please feel free to contact me.
18th December 2013
An updated build of embedded Firebird for IOS can now be downloaded from
http://www.ibphoenix.com/downloads/FirebirdIOSembed.tar
There were some issues with loading dylibs, these have been corrected using the install_name_tool -change
command. The default embedded script I used to build the embedded package forgets that I had to cross compile ICU 5.1 rather than build ICU with Firebird.
isql/gbak (or any other firebired utility) can now find the relevant libs they need by searching the directory above them i.e. MacOS. There was however an issue if you used
symbolic links, symbolic links, extra ``/'' characters, and references to /./ and /../ in the file_name.
This has now been corrected using the realpath function.
I haven't tested this myself yet on IOS, so once again feedback would be appreciated.
Subscribe to:
Post Comments (Atom)
4 comments:
Solution for no 4 distribution on appstore is to create a static linked binary
I am aware of that. Have you considered a, how big Firebird would be if it was compiled statically and b, that I don't think you will be able to compile Firebird statically from Firebird 3.0
Hello,
Is there any news about the iOS version?
Why don't you download it and try it. There is a link to the tar file on the post above.
Post a Comment