Objective-C Library for Sunrise and Sunset?

前端 未结 7 479
没有蜡笔的小新
没有蜡笔的小新 2021-02-01 06:14

Is there an Objective-C (or C) library (that is compatible with core location) that can tell me the time of sunrise and sunset for any given calendar day?

相关标签:
7条回答
  • 2021-02-01 06:48

    EDSunriseSet is an open source and free Objective-C wrapper for the C languages routines created by Paul Schlyter.

    Calculation is done entirely by the C-code routines. EDSunrisetSet bridges those calculations to common Cocoa classes (NSDate, NSTimeZone, ...)

    0 讨论(0)
  • 2021-02-01 06:48

    I've actually ported the KosherJava Library and plan to make it available soon on GitHub!

    Edit:

    KosherCocoa is now live on GitHub! If you don't need the hebrew calendar related code, you can delete the "calendar" file. The class files are separated nicely into folders based on the kinds of calculations that they do.

    Edit: KosherCocoa us due to be replaced with a modern and more complete update as soon as I can. The above link now points at a legacy repo.

    0 讨论(0)
  • 2021-02-01 06:49

    try this one: https://github.com/berkley/ObjectiveCUtil

    0 讨论(0)
  • 2021-02-01 07:00

    After not finding a simple Swift alternative, I created Solar: a Swift built micro-library for Sunrise / Sunset.

    0 讨论(0)
  • 2021-02-01 07:04

    Try this: https://github.com/mourner/suncalc/

    Very clear and easy to implement, although it writen by javascript but it is easy to convert it to
    objective-C

    It also support for calculate sun, moon position and coordinate.

    0 讨论(0)
  • 2021-02-01 07:12

    I have used a library called SUNWAIT. Very simple, effective - easy to use!

    0 讨论(0)
提交回复
热议问题