I expect there is for the very reasons you said but [quote=357531:@Norman Palardy] I am not 100% sure[/quote]
@Norman Palardy – Xojo support god Jason is presently researching the answer on C/C++ library (dylib, framework, et al) inclusion as part of an IOS app submitted to the Apple App Store. But seeing as this very basic question has taken two days (so far) to research, I’m getting a bit nervous…
The App submission guidelines are usually very thorough about what is / isn’t permitted
They don’t explicitly say this is or is not allowed
I havent spoken to Jason so it could be he’s put the question to our Apple Support Rep and that can take time to get an answer
I’m reasonably sure this is OK (google “ios using a dylib in your app” and you get a pile of hits)
Plus
- Apple gives you “how to’s” on doing this with a “framework” which is a header + dylibs (and maybe other resources like images)(https://developer.apple.com/library/content/technotes/tn2435/_index.html)
At the very least I suspect you could make this a framework and then its certainly OK and the declares are not much different just the location - there are several discussions on StackOverFlow about this https://stackoverflow.com/questions/4733847/can-you-build-dynamic-libraries-for-ios-and-load-them-at-runtime , https://stackoverflow.com/questions/37257763/can-i-compile-c-library-into-dylib-and-use-them-in-ios-9-project (and several others)
Now Apple may have changed the rules and require an app extension (that I’m not sure of)
But I sure cannot find anything from them that says a dylib loaded this way is NOT ok
App submission with library is not a problem.
I did submit a FileMaker based iOS app with my plugins.
If you follow all the rules, they allow that.
@Christian Schmitz – Thanks – I didn’t see this before I emailed you earlier.
I wonder if the rules for what is permitted is different for FILEMAKER (because Apple owns FIleMaker, Inc) than for Xojo? Do your own MBS IOS plug-ins make calls into a custom IOS Framework during IOS runtime?
As I am beginning to understand the picture, a Xojo use must:
-
generate a Framework – not a bare dylib – which gets included in the Xojo app “package”. Of course, it must be properly signed.
-
To make calls into that Framework, Xojo IOS uses MUST use soft declare and NOT External Method definitions, correct?
-
Callbacks into the main Xojo code from the Framework are permitted by Apple?
Xojo has no plugin SDK for iOS, but FileMaker has one.
The plugin is just another framework the app loads.
@Christian Schmitz –
So your MBS functions for IOS are via your own IOS Framework? And those are called via soft declares?
my iOS stuff for Xojo is only Xojo source code without a library/framework.
Thanks, Christian – then I guess I need to find someone else that has actually made calls into their own IOS Framework!
I thin Jean Paul Devulder did some stuff for iOS that uses his own dylib
BUT I could be wrong
You could PM him
He’s on here reasonably frequently
@Norman Palardy – yes, Paul Devulder has created his own Framework that integrates into an IOS project. He has shared that with me, and I think I see the process involved.
However, he hasn’t tried submitting a Xojo-generated IOS app containing his Framework to the IOS App Store. I’m not certain if anyone has.
However, as @Christian Schmitz states above, he has submitted an app to the IOS App store that contains his own Framework(s). So it seems doable.
@Garth Hjelle – You mentioned earlier:
[quote]I use a “callback” - I send the AddressOf of a Xojo function to the DLL, and call that.
[/quote]
Do you have a simple example of this process? When calling from a Windows DLL vs a macOS dylib, is there a different calling convention to pass parameters back from the C-API code to the Xojo callback function?
#Pragma Directives Keyword
Scroll to X86CallingConvention.
Cool! So stdCall on Windows – but for macOS? CCDecl?