Skip to content

A handy Java API for extracting macOS Messages

License

Notifications You must be signed in to change notification settings

pavel-alay/messages-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

messages-extractor

A handy tool for extracting Messages on macOS if you setup sync with iOS.

Set up iPhone to get SMS texts on Mac

Examples:

String dbLocation = System.getProperty("user.home") + "/Library/Messages/chat.db";
extractor = new MessagesExtractor(dbLocation);

Map<String, List<Message>> allChats = extractor.getMessages();

Map<String, List<Message>> lastThreeDays = extractor.getMessages(LocalDate.now().minusDays(3).atStartOfDay());

Map<String, List<Message>> selectedChatsLastYear = extractor.getMessages(Arrays.asList("Google", "Apple"),
                LocalDate.now().minusYears(1).atStartOfDay());
                
Map<String, List<Message>> selectedChats = extractor.getMessages(Arrays.asList("Google", "Apple"));              

Note, by default you cannot access ~/Library/Messages/chat.db. You may copy it to ~/Messages/chat.db with mycopier or grant full access to java.

About

A handy Java API for extracting macOS Messages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages