Archived Forum Post

Index of archived forum posts

Question:

Can Chilkat be used with Xojo for iOS?

Jun 05 '17 at 09:30

Is it possible for the Chilkat Xojo plugin to be used with Xojo iOS projects?


Answer

The quick answer is No.

It could be possible, but some simple features would be needed in Xojo to make it possible. I can explain.

An iOS app is not allowed to use a dynamic shared object (i.e. a dynamic library such as a .dylib). Therefore, an iOS app can only link with static libraries. The current Xojo plugin format is a dynamic library (.dll on Windows, .so on Linux, and .dylib on MacOSX). This is not possible on iOS.

Xojo allows for iOS "plugins" to be written in Xojo itself, but this skirts the issue. You're ultimately limited to whatever functionality is provided by the underlying iOS C/C++ runtime libs, or whatever has been directly implemented in Xojo itself. For most of the types of functionality offered by Chilkat, you would never want to implement it in a higher-level language because the performance would be awful The functionality found in Chilkat is usually best implemented closer to the hardware, and the functionality in Chilkat is typically what is NOT already provided by the system C/C++ runtime libs. (Also, Chilkat's implementation is cross-platform, which means the C++ native implementation runs the same across different operating systems such as Windows, MacOSX, Android, Linux, etc.)

The following information was received at the 2016 Xojo Developer Conference Also see Xojo 2017 RoadMap

This is true, but it also means the plugins written in Xojo are limited in functionality to what is directly provided by iOS. (Chilkat provides much that iOS does not provide. Also, other plugin vendors are typically just wrappers, and are also limited to what the local OS can provide, whereas Chilkat is not a wrapper, but an actual cross-platform native implementation.)

If the new plugin format becomes available later this year, or sometime next year, then it will become possible to use Chilkat with Xojo on iOS. Whatever the plugin format, on iOS it will require something additional to the Build Settings to be added to specify local static libs to be linked. In actuality, the existing Chilkat iOS static lib is already in the needed format because it's just a lib with exported functions, just like the system's static libs. It's just a matter of defining a plugin format that allows for a mapping from a Xojo function to the exported static lib function, combined with a Build Setting to allow the 3rd party static lib to be included when linking.