-
Notifications
You must be signed in to change notification settings - Fork 22
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
SWIFTPM_MODULE_BUNDLE is not defined by rules_swift_package_manager for ObjC targets #774
Comments
Interesting. I had not run into this one. Thanks for reporting. We should be able to get this added shortly. |
Just for clarification. |
Possible duplicate of #372. |
Well, as a quick fix I put the .plist it searches into main bundle (the lib tries to load it from main bundle if SWIFTPM_MODULE_BUNDLE is not defined) As to example which didn't worked - I simply imported the lib in my Package.swift file. |
It looks the tiger.svg image you imported from PocketSVG example is not using color aliases (only html-style colors, such as |
…th resources (#781) - Generate `SWIFTPM_MODULE_BUNDLE` macro [inspired by the one provided by SPM](https://github.com/apple/swift-package-manager/blob/8387798811c6cc43761c5e1b48df2d3412dc5de4/Sources/Build/BuildDescription/ClangTargetBuildDescription.swift#L390). - Ensure that the macro is available to all of the ObjC code by adding the `-include` flag to the `copts` with the location of the resource accessor header file. - Update the `resources_example` to use a vendored version of [AppLovin-MAX-Swift-Package](https://github.com/AppLovin/AppLovin-MAX-Swift-Package). This package has an ObjC target with resources that expects the `SWIFTPM_MODULE_BUNDLE` macro to be present. Closes #372. Closes #774.
Apparently SWIFTPM_MODULE_BUNDLE is thing, it is C precompiller flag defined for SMP packages
https://github.com/apple/swift-evolution/blob/main/proposals/0271-package-manager-resources.md#runtime-access-to-resources-bundle (at the end of the section)
Usage example
https://github.com/pocketsvg/PocketSVG/blob/10c6885e427e88d35fbb64010fbd6385cb58fef7/Sources/SVGEngine.mm#L899
There is similar bugreport for Tuist:
tuist/tuist#3785
The text was updated successfully, but these errors were encountered: