https://github.com/possen/hostapp
Demonstrate issue with swiftinterface files not generated with Defines Module on.
https://github.com/possen/hostapp
Last synced: 3 months ago
JSON representation
Demonstrate issue with swiftinterface files not generated with Defines Module on.
- Host: GitHub
- URL: https://github.com/possen/hostapp
- Owner: possen
- Created: 2020-04-06T08:22:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-04T19:34:02.000Z (over 4 years ago)
- Last Synced: 2025-01-06T02:24:22.302Z (5 months ago)
- Language: Swift
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Update: Xcode 12 has a fix that allows this project to work as expected.
This is project which demonstrates that the `Defines Module` flag on the BarKit target does not allow `swiftinterface` files to be generated.
`FooKit` has it enabled and they are generated.
Use script `./create_xcframework.sh` to create the xcframeworkNote that `BarKit` does not compile when using the `HostAppXC` version which links against the `XCFramework`.
Disabling `Defines module`, then regenerating the `XCFramework`, on `BarKit` allows `HostAppXC` to compile and run.See the enclosed project. Open the project and build, there are 4 targets, of those there are two frameworks, the main difference between the `BarKit` and `FooKit` frameworks is that `BarKit` has the `Defines Module` flag set to true. First build the HostApp target, this will generate `FooKit.framework` and `Bar.framework`. Next, run the `./create_xcframework` script included in the root of the project. Look at the generated XCFramework. Foo.framework does not define a module and therefore generates swiftinterface files, `BarKit.framework` does defines a module, it does not generate swiftinterface files. Now, build the HostAppXC target, it will fail to build because the `BarKit.framework` has no swiftinterface files. If you turn off `Defines Module` for `BarKit.framework`, rerun `./create_xcframework`, then it compiles and runs.