Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* maintenance: interface builder integration #788

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkimitsa
Copy link
Contributor

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:

  • propagate XCFrameworks instead of its framework.
  • clang modules are enabled now;
  • not all frameworks have umbrella header with same name, e.g. FrameworkName/FrameworkName.h, logic added to look for Swift umbrellas as well.
  • if umbrella header is not found -- framework is not included into pre-compiled headers.

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

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:
- propagate XCFrameworks instead of its framework.
- clang modules are enabled now;
- not all frameworks have umbrella header with same name, e.g. `FrameworkName/FrameworkName.h`, logic added to look for Swift umbrellas as well.
- if umbrella header is not found -- framework is not included into pre-compiled headers.

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:
```xml
<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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant