Io Astrology Software For Mac Here

func saveBirthData(_ data: BirthData) if let encoded = try? JSONEncoder().encode(data) savedData = encoded

var zodiacSign: String let signs = ["Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces"] let index = Int((longitude / 30).rounded(.down)) % 12 return signs[index]

static let example = BirthData( name: "Example", date: Date(), latitude: 40.7128, longitude: -74.0060, timezone: .current ) enum Planet: String, CaseIterable case sun, moon, mercury, venus, mars, jupiter, saturn, uranus, neptune, pluto case chiron, northNode, trueLilith var symbol: String switch self case .sun: return "☉" case .moon: return "☽" case .mercury: return "☿" case .venus: return "♀" case .mars: return "♂" case .jupiter: return "♃" case .saturn: return "♄" case .uranus: return "♅" case .neptune: return "♆" case .pluto: return "♇" case .chiron: return "⚷" case .northNode: return "☊" case .trueLilith: return "⚸"

var body: some View Form Section("Personal Data") TextField("Name", text: $name) DatePicker("Birth Date", selection: $birthDate, displayedComponents: [.date, .hourAndMinute]) Section("Location") HStack Text("Latitude") TextField("Latitude", value: $latitude, format: .number) HStack Text("Longitude") TextField("Longitude", value: $longitude, format: .number) Section("House System") Picker("System", selection: $selectedHouseSystem) ForEach(HouseSystem.allCases, id: \.self) system in Text(system.rawValue).tag(system) .pickerStyle(.radioGroup) Button("Generate Chart") let birth = BirthData(name: name, date: birthDate, latitude: latitude, longitude: longitude, timezone: .current) saveBirthData(birth) .buttonStyle(.borderedProminent) .padding() .frame(width: 400) io astrology software for mac

var formattedPosition: String let degrees = Int(degreeInSign) let minutes = Int((degreeInSign.truncatingRemainder(dividingBy: 1)) * 60) return "\(zodiacSign) \(degrees)°\(minutes)'"

let item = CSSearchableItem(uniqueIdentifier: birthData.id.uuidString, domainIdentifier: "io.astrology.charts", attributeSet: attributeSet) CSSearchableIndex.default().indexSearchableItems([item]) error in if let error = error print("Index error: \(error)")

func updateNSView(_ nsView: MTKView, context: Context) context.coordinator.positions = positions func saveBirthData(_ data: BirthData) if let encoded = try

func updateMenubarText() let now = Date() let moonPhase = getMoonPhase(date: now) statusItem?.button?.title = "🌙 \(moonPhase) ☉ Io"

.padding() .frame(width: 200)

func applicationDidFinishLaunching(_ notification: Notification) statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) if let button = statusItem?.button button.title = "☉ Io" button.action = #selector(togglePopover) // Update planetary hour every minute Timer.scheduledTimer(withTimeInterval: 60, repeats: true) _ in self.updateMenubarText() updateMenubarText() timezone: .current ) enum Planet: String

static func calculatePositions(for date: Date, birthData: BirthData? = nil) -> [PlanetaryPosition] return Planet.allCases.map planet in let lon = approximatePosition(planet: planet, date: date) return PlanetaryPosition( planet: planet, longitude: lon, latitude: 0, speed: 1.0, isRetrograde: false )

var degreeInSign: Double longitude.truncatingRemainder(dividingBy: 30)

var name: String rawValue.capitalized import Foundation struct PlanetaryPosition: Identifiable let id = UUID() let planet: Planet let longitude: Double // 0-360° let latitude: Double let speed: Double // degrees per day let isRetrograde: Bool