I have been trying to check the mac battery level programmatically.it can be done on ios but i want to do it in mac.i found some resources on stackoverflow but those links were deprecated. Any Ideas?
First create a "Umbrella-Bridging-Header.h" with the content:
then in main.swift
import Foundation println("Hello, World!") let timeRemaining = IOPSGetTimeRemainingEstimate () println("timeRemaining: \(timeRemaining)")