Page 1 of 1

using a dylib in an iOS app

Posted: Wed May 21, 2025 12:40 am
by bamakojeff
I am trying to get the external .dylib file from the following project working in an iOS app: https://github.com/trevordevore/iosclipboard

The included "iosclipboard.livecode" project makes it seem very simple. It includes the .dylib file in the "Copy Files" section of the Standalone Application Settings and then calls the function "copyTextToClipboard" from the external library.

The problem is that the dylib file is never included in the application that is created. The folder it is in shows up, but it's empty. No matter how I specify the dylib to be included, it never is. So, of course, the function call fails.

What do I need to do use this dylib in my iOS app? There's a lot on the internet about using dylibs on MacOS and dlls on Windows, but I can't figure out how to make any of that work in my iOS application. I even tried copying the dylib into the .app after the standalone was created and then running "set the externals of this stack..." when it opens to point to the dylib. The function call still fails.

viewtopic.php?t=19625 and viewtopic.php?t=15767 both seem to say that folks have gotten this very dylib working. If anyone knows what I need to do, I would so appreciate hearing it.

TIA

PS - per the discussion in viewtopic.php?f=49&t=15767, unfortunately, the "copy" command does not place the text on the Mobile clipboard, even though the documentation says that it does.

Re: using a dylib in an iOS app

Posted: Wed May 21, 2025 4:04 am
by PaulDaMacMan
bamakojeff wrote:
Wed May 21, 2025 12:40 am
I am trying to get the external .dylib file from the following project working in an iOS app: https://github.com/trevordevore/iosclipboard

The included "iosclipboard.livecode" project makes it seem very simple. It includes the .dylib file in the "Copy Files" section of the Standalone Application Settings and then calls the function "copyTextToClipboard" from the external library.

The problem is that the dylib file is never included in the application that is created. The folder it is in shows up, but it's empty. No matter how I specify the dylib to be included, it never is. So, of course, the function call fails.

What do I need to do use this dylib in my iOS app? There's a lot on the internet about using dylibs on MacOS and dlls on Windows, but I can't figure out how to make any of that work in my iOS application. I even tried copying the dylib into the .app after the standalone was created and then running "set the externals of this stack..." when it opens to point to the dylib. The function call still fails.

viewtopic.php?t=19625 and viewtopic.php?t=15767 both seem to say that folks have gotten this very dylib working. If anyone knows what I need to do, I would so appreciate hearing it.

TIA

PS - per the discussion in viewtopic.php?f=49&t=15767, unfortunately, the "copy" command does not place the text on the Mobile clipboard, even though the documentation says that it does.
This is a now very old External which I don't think Trevore has updated in more than a decade (perhaps he'll chime in?). it's is probably not compatible with today's iOS much more strict sandboxing. I think the External was compiled for old (32bit?) iOS Devices.