I’m working on a cross-platform plugin (macOS, iOS) and still figuring out the SDK. I’ve hit a snag with trying to convert a REALString to a CFString/NSString: It doesn’t look like the REALstring → CFString conversion functions are supported for iOS targets?
Perhaps that’s where my problem is. I have an xcode setup with two targets and a packaging schema:
When the target is the macOS plugin, TARGET_CARBON and TARGET_COCOA resolve to the macOS ConditionalMacros.h file, but when the target is the iOS plugin, the TARGET_CARBON and TARGET_COCOA resolve to REALplugin.h, where these two flags are not set because the target is iOS. I will try to dig a little more and see why things aren’t resolving to the iOS ConditionalMacros.h file.
Did some more testing: TARGET_CARBON and TARGET_COCOA don’t resolve to the definitions in iOS SDK’s ConditionalMacros.h even in the sample XOJO SDK project with an iOS target: EyeControl (EyeControl_iOS_Simulator target—even after the project is updated with the correct SDK)
To summarize, There doesn’t seem to be a way to access the cocoa XOJO SDK functions in iOS plugin targets because REALplugin.h disables a lot of functionality if the plugin target is iOS.
For the time being, since that functionality does exist in our iOS framework, you should be able to just remove the #if TARGET_CARBON || TARGET_COCOA from there, and probably from rb_plugin.h as well. Or add an additional || TARGET_OS_IPHONE to that.