MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
942 stars 132 forks source link

* maintenance: interface builder integration #788

Open dkimitsa opened 1 month ago

dkimitsa commented 1 month ago

Main reason -- to be able to compile Stub in Xcode without errors.

What was fixed:

Cannot code sign because the target does not have an Info.plist file

Info.plist is now generated and included into xcode project.

Undefined symbols for architecture arm64: "_main"

Stub int main() {} is now generated and included into xcode project.

multiple FrameworkName/FrameworkName.h not found

Error while compiling pre-compiled header file where all framework are being referenced. XCode doesn't seem to recognise single arch framework. Changes where done:

To have manual control over the logic and to be able to add extra imports and filter out not required config was extended with following section:

<config>
    <tools>
        <ibx>
            <pch>
                <include>MyFramework/MyFramework.h</include>
                <include import="true">MyModule</include>
                <filter exclude="true">*Promises*</filter>
            </pch>
        </ibx>
    </tools>
</config>

pch section allow to include additional frameworks with include tags. if import attribute is specified -- @import will be used instead of #import (works for modules). filter tag allows to exclude from pre-compiled header files reference to not required framework. For example FBLPromises causes following error:

fatal error: module 'PromisesObjC' in AST file

Also thumbv7 removed from default iOS target