Closed odrobnik closed 4 years ago
For what it's worth, the issue I ran into was only at runtime. It was not detected at build time.
@colejd please explain.
The file is definitely part of the Package:
It even gets compiled:
But seemingly all the UIKit-based extensions are missing:
Although, some are there, like NSURL+DTAppLinks which is also in the same Core/Source/iOS subfolder:
let bla = NSURL.appStoreReview(forApplicationIdentifier: "123")
This works.
I found that adding #import <TargetConditionals.h>
to the header and moving the import for the header in the .m to above the #if TARGET_OS_IPHONE
resolved the problem.
It might be that adding these defines manually to the Package file doesn't always work, and the import in the PCH file seems to be ignored for Packages.
Thanks. That seems to have done the trick on my end.
The runtime issues I mentioned earlier seem to be internal to DTCoreText, so I've made a new issue above.
I am looking for an explanation and/or fix why category extensions in
UIView+DTFoundation.h/m
cannot be used when importing this Package via SPM