onekiloparsec / SwiftAA

The most comprehensive collection of accurate astronomical algorithms in (C++, Objective-C and) Swift.
http://www.onekiloparsec.dev/
MIT License
171 stars 31 forks source link

Earth.riseTransitSetTimes broken for SwiftAA package? #102

Closed treaves closed 1 year ago

treaves commented 3 years ago

In my application I've added SwiftAA via Xcode's Swift Package Manager. This does make the Swift code available. However, I can't call riseTransitSetTimes on an Earth instance, as the planetaryObject parameter of type KPCPlanetaryObject is not part of the SwiftAA package. If I understand the way the packages are set up, it would be part of the ObjCAA package.

Am I misunderstanding something? If not, this would be a bug.

Thanks.

onekiloparsec commented 3 years ago

Sorry for the late reply. I am away from my Xcode right now, and couldn't check. I couldn't remember whether you need to also include ObjCAA too or not. Did you manage to find a solution ?

treaves commented 3 years ago

No worries.

If I include ObjCAA then the issue goes away. I guess I'd assume that if all a user was doing was using the Swift interface, that should be all that is needed to include. In this case, where there is C++, Obj-C, and Swift, keeping the interfaces clean is difficult.