Categorygithub.com/peacecwz/go-mac-imessage
modulepackage
0.1.0
Repository: https://github.com/peacecwz/go-mac-imessage.git
Documentation: pkg.go.dev

# README

Mac SMS Tracker

Easy way to send and receive SMS/iMessage on Mac OS

How it works

If you are using your same iCloud account on Mac and iPhone you can use it easily. iCloud can sync your message between iPhone, Mac and other devices on iMessage application. See how to configure and details about this feature

Use as CLI

Send SMS/iMessage to Phone Number


$ sms send -m "Hello, World" -t "+310638122497"

Receive SMS/iMessages


$ sms receive

And also you can set intervals like


$ sms receive -i 3000

Use as Library

Send SMS/iMessage


err := sms.Send("Hello, World", "+31063812249")
if err != nil {
    log.Fatal(err)
    return
}

fmt.Println("Sent")

Receive SMS/iMessage

interval := 3 * 1000
err := sms.TrackSMS(interval, func(sms []sms.SMS) {
    for _, s := range sms {
        fmt.Printf("Message: %s from %s\n", s.Content, s.From)
        err := s.Read()
        if err != nil {
            log.Fatalln(err)
        }
    }
})

License

Licensed under the MIT License

# Packages

No description provided by the author
No description provided by the author